A SQL script library saves you from solving the same problem twice. This post shows a folder layout by task, a header block with the tested version, naming habits, a safe history, tests on a scratch server and a way to retire old scripts, with one small read-only script as an example.
SQL SERVER – Disable IntelliSense in SQL Server Management Studio
A client with over 350,000 tables in one database saw metadata locking every time SSMS opened. Disabling IntelliSense in SQL Server Management Studio fixed it.
SQL SERVER – Finding Compression Ratio of Backup
Is there a way to know the compression ratio of backup files in SQL Server? Here is a quick script on msdb backupset that compares backup size with compressed size.
SQL SERVER – How to Get List of SQL Server Instances Installed on a Machine Via T-SQL?
A registry query lists SQL Server Instances recorded on the Windows host. A customer wanted a T-SQL-only method.
Drop Multiple Tables with One DROP TABLE Statement
To drop multiple tables in SQL Server, list them in one DROP TABLE statement, referencing tables first. This post tests the order rule on a parent and child table and shows what happens after an error. It also covers IF EXISTS, drops by name pattern and temporary tables.






