A colleague’s @@ServerName returned NULL instead of the server name. Here is why the value can be wrong and how to fix the @@ServerName property.
SQL SERVER – Rewriting Database History – Notes from the Field #094
Kevin Hazzard tells the story of rewriting database history, a journey that starts and ends with ORM, in Notes from the Field #094.
SQL SERVER – How to Migrate Existing Database to Contained Databases
How do you convert an existing database to contained databases? I walk through the planning and use the DMV and XEvent that flag containment breaches.
SQL SERVER – PowerShell – Knowing SQL Server Information
A PowerShell script that reads SQL Server information from my localhost using SMO and writes it to a simple HTML page you can open in any browser.
SQL SERVER – How to Identify Locked Table in SQL Server?
Here is a quick script using sys.dm_tran_locks and sys.partitions to identify locked table names in SQL Server along with the lock type on each.






