Tag Info

New answers tagged

0

Repair MDF file with DBCC CHECKDB: Microsoft offers a command that is known as DBCC CHECKDB, when you run this then it try to detect & fix all the possible error message. If it fails to fix error message then it suggest repair clause. Re-run the command with suggest repair clause. Your problem might be solved. But, you may loss some amount of data after ...


5

when I try to use Management Studio to attach to the .mdf file There's not really a gentle way to say this: Stop doing that. The GUI is full of bugs and bad defaults; more importantly, unless you take a screencast, we have no way to identify exactly what steps you're taking as you point and click your way through the GUI. Log in as a system ...


1

Will suggest you to go through this whitepaper SQL Server 2012 Upgrade Technical Guide, to get a proper understanding on what all is needed for the activity. There are many points which would be need to be think upon, i.e. Just upgrading by keeping the compatibility level at a older version is not real upgrade. Evaluate at using some of the new features ...


0

I think that it is not good to uprgade only SQL Server. 2005 is out of support so I think you need to upgrade SSRS also. If you update only SQL server you must check you apps, bacuse there are some issues with SQLs between versions. For example we use SQLs generated in concatenated strings and we have some issues when upgrading from 2000 to 2008. In any ...


1

You can try selecting into a temp table with the zip criteria only, and then select from the temp table with the additional criteria. SELECT * INTO #MyTemp FROM (SELECT * FROM MyTable where zip='1234') data SELECT * from #MyTemp where other = 'Y' DROP Table #MyTemp Not sure if this will be faster, but since the zip-only query runs fast, then you're just ...


1

Is there a better way to write this type of query? No, the way you've written it is the "best" way. Unless, of course, that way doesn't work. The joy and frustration of using a declarative language is the optimiser. It is your best friend when it works and worst enemy when it doesn't. One way to kick the optimiser into doing the right thing is to ...


2

@AaronBertrand's answer is great. Here's a variation with a bit more info from here SELECT (physical_memory_in_use_kb/1024) AS Memory_usedby_Sqlserver_MB, (locked_page_allocations_kb/1024) AS Locked_pages_used_Sqlserver_MB, (total_virtual_address_space_kb/1024) AS Total_VAS_in_MB, process_physical_memory_low, process_virtual_memory_low FROM ...


0

I think this will get what you want. It may not be the best regarding efficiency (due to the unioned view): WITH LowestPrices AS ( SELECT UPC, Price1, SUM(Quantity) OVER (PARTITION BY UPC) AS Quantity, DBID AS PricingDBID, COUNT(*) OVER (PARTITION BY UPC) AS VendorCount, ROW_NUMBER() OVER ...


0

Decided to take a risk and test it in production. Took out 2 nodes from 4 node cluster without uninstalling SQL from those and I can confirm for the two weeks of being in this situation I haven't receive any complaint from users. Hope this helps others potentially dealing with same question


3

First add a row_number() value to the mix, because I'm guessing you can't rely on ID to have no gaps. WITH NumberedRows AS ( SELECT *, ROW_NUMBER() OVER (PARTITION BY Number, Name ORDER BY SubNumber) AS RowNum FROM [Table] ) --now compare RowNum to SubNumber. When the difference changes, there's been a gap in the sequence of SubNumber values. , Diffs ...


5

Check if another process has claimed port 1434: netstat -ano | findstr 1434 This will give you the process id of the offending process, which you can then identify: tasklist | findstr /c:"<process id>"


2

Please help me on how can i find for what could have been possibly going wrong where data does not match between both the DB. You can use tablediff utility to find out the difference in data between your Publisher and Subscriber server. Check How to run TableDiff utility for ALL replicated tables ? article by Chris Skorlinski on REPLTalk. This blog has ...


3

You're querying two different things here. xp_fixeddrives will show you the amount of free space on the disk. Using sys.dm views will tell you how much free space there is in the tempdb data file. If the data file is 50GB, then you're only using 5GB of it and the rest is empty. Even though it's empty, the file exists and is taking up 50GB of space on your ...


0

You should really consider upgrading to a more recent version, especially if you want to utilize some of the best parts of Full Text Search. To your question, the short answer is yes. From the documentation for 2005, you have two main features to customize in a thesaurus, Expansion Sets and Replacement Sets: An expansion set contains a group of ...



Top 50 recent answers are included