SQL Server 2017 adds a new DMF, sys.dm_os_file_exists, a replacement of xp_fileexist that suits both Windows and Linux. Here is how to use it.
SQL SERVER – Msg 3013 – Cannot Create Worker Thread. BACKUP LOG is Terminating Abnormally
Msg 3013, cannot create worker thread, on a log backup. What the worker thread limit really is, and when raising it is the wrong fix.
Longest Streak of Consecutive Days in T-SQL: Gaps and Islands
Find the longest streak of consecutive days in T-SQL with gaps and islands: group dates with ROW_NUMBER, handle duplicates, and list gaps.
SQL SERVER – Adding New Database to AlwaysOn Replica is Slow
A client with five replicas said adding a new database to their AlwaysOn Replica setup was slow. Here is what we found while the issue was happening.
How to Auto Start SQL Server After a Crash
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.







