To auto start SQL Server after a crash, set the Windows service to restart itself on failure, and set its start mode to Automatic for a reboot. This post checks what a server has today with T-SQL and the sc command, sets the three places that matter, and shows how to find the cause of the crash. A restart gets the server running again, and it doesn’t find the cause.
SQL SERVER – How to Remove TempDB File?
A DBA accidentally added an extra TempDB file and was not allowed to use SSMS to undo it. Here is how to remove a TempDB file with T-SQL only.
Mirrored Database: Move Files Without Breaking Mirroring
To move the files of a mirrored database, change the file paths on the principal with ALTER DATABASE, stop both instances, move the files, and start them again in the right order. This post tests the T-SQL steps on a demo database and describes the mirroring steps from the documented behavior. It also covers what to check afterward.
Pareto Analysis in T-SQL: Which Products Make 80 Percent of Sales
Build Pareto analysis in T-SQL with product totals, stable running sums, and explicit ABC thresholds that handle ties and boundary choices.
NOLOCK Without WITH: Table Hint or Table Alias?
NOLOCK without WITH and without parentheses is not a hint, because SQL Server reads it as a table alias. This post proves it with a lock test, shows why the compatibility level doesn’t change it, and gives a query that finds the bad syntax in your code. It ends with the safer ways to write the hint.
What are Forwarded Records in SQL Server? – Interview Question of the Week #145
What are forwarded records in SQL Server? It is an old concept, yet few new DBAs know it. Here is a short answer about heap rows that moved to a new page.
Create a Global Temporary Table in SQL Server
A global temporary table starts with two # signs, lives in tempdb, and any session can read it. This post creates one, reads it from a second window, and shows when SQL Server drops it. It also covers name collisions and the cases where a different table type is the better choice.







