SQL Server emergency? Email pinal@sqlauthority.com with URGENT in the subject line.

Move the Master Database to a New Location in SQL Server

To move the master database, change its startup parameters in SQL Server Configuration Manager, stop SQL Server, move the files and start it again. This post explains why ALTER DATABASE can’t move master, reads the current paths with T-SQL, and lists the steps and the permission check that stops most failed moves. It also says what to do when the instance won’t start afterwards.

Continue Reading

Wait Stats Collection Script for Current SQL Server Versions

A wait stats collection script saves snapshots of sys.dm_os_wait_stats into a table, so you can compare two snapshots instead of reading totals since the last restart. This post builds the tables and a snapshot procedure, creates a small load, and reports the change with a category for each wait. It also covers idle waits, restarts and retention.

Continue Reading