VARCHAR diff function
Last month I posted another CTE blog entry Using a CTE to Split a String Into Rows with Line Numbers. Since then I have used it but, but realized that what I really needed was a diff tool to compare two …
Last month I posted another CTE blog entry Using a CTE to Split a String Into Rows with Line Numbers. Since then I have used it but, but realized that what I really needed was a diff tool to compare two …
One possible cause of the “Cannot resolve the collation conflict” error message is that your database collation doesn’t match the TempDB Collation. Recommendation It is recommended that the collation of your database match the collation TempDB. It is possible …
The OUTPUT clause is often times underappreciated by the TSQL programmer. There are many really interesting things that you can do with the OUTPUT clause, from inserting to two tables with one statement or to replace the SCOPE_IDENTITY option. For …
Here is a script that I created to get the size of all of the databases on one SQL Server. Generally I stay away from temp tables, especially global temp tables, but I didn’t see a good way to do …
After creating and deploying the duplicate indexes report earlier today I discovered that although the report did exactly what it says, it didn’t do what I needed. The earlier duplicate indexes report only found indexes that were an exact match on the …
This is a followup to my Whats more important than a backup plan article posted a couple of months ago. When you do a database restore, including log backups, it is very important to get the log chain in the …
Is it a good idea to run DBCC SHRINKDATABASE regularly? Download the sample file ShrinkSample. This article and samples apply to SQL Server 2005, 2008, and 2008R2. This really depends on a number of factors, but generally the answer is …
I needed a way to list of of the indexes for an entire database, but I was running into a problem using sys.indexes that I could only see the indexes for the current database. Below is the solution that I …
Finding the names of all indexes on a SQL Server Read more »
The quick and easy way to determine how much memory your SQL Server is using is to look at the Task Manager on the server and find “sqlservr.exe” in the process list, and look at the “Mem Usage” column. But …