SQL Server 2012 adds two auditing enhancements: new options on audit log failure, like fail operation or continue, and a maximum rollover files setting.
EXISTS vs COUNT: The Right Way to Check If Rows Exist
Need a yes or no? Ask EXISTS. Need a number? Ask COUNT. Here is a small demo that shows why mixing them up can quietly give the wrong answer.
SQL SERVER – Explain Error:166 : does not allow specifying the database name as a prefix to the object name – Puzzle to Win SQL Server Interview Questions and Answers Book
Why does DROP PROCEDURE with the database name as a prefix give Error 166 when DROP TABLE works? Explain it and win my SQL Server Interview Questions and Answers book.
SQL SERVER – A Quick Look at Performance – A Quick Look at Configuration
Before I answer a performance question, I need to know the environment. Here is how I take a quick look at configuration to get the full picture fast.
Foreign Keys Across Databases: What to Use Instead
SQL Server will not create a foreign key to another database. Here is the real error, why a report is only detection, and a same-database option that enforces.
Diagnosing Connection Pool Exhaustion From the SQL Server Side
Diagnose connection pool exhaustion by grouping SQL Server sessions, finding sleeping open transactions, and reading their last command.
Error 3241 on Restore: Newer Version or Damaged Backup File
Error 3241 only says SQL Server could not read the file as a backup. Here are three broken files, three different messages, and the checks to run first.
SQL SERVER – Bad Practice of Using Keywords as an Object Name – Avoid Using Keywords as an Object
Why using keywords as an object name is a bad practice: a stored procedure named GO runs with EXEC GO, and the result can surprise you.
SQL SERVER – Error: Deleting Offline Database and Creating the Same Name
Deleted an offline database but the disk is still full, or you get an error creating a database with the same name? Here is why, and what to do.










