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

Find Deprecated SQL Server Features with Extended Events

To find deprecated SQL Server features, capture the deprecation announcement and deprecation final support events with Extended Events. This post builds a small session, runs four kinds of deprecated code, reads the captured features and statements, and lists the replacements to use before a compatibility level change or an upgrade.

Continue Reading

Delete Old Backup Files in SQL Express with PowerShell

SQL Server Express has no SQL Server Agent, so nothing runs to delete old backup files and the disk slowly fills. This post gives a PowerShell script that removes backup files older than a set number of days, tests it with a dry run, refuses to delete when any backup type has no recent file, and shows how to schedule it with Task Scheduler.

Continue Reading