Script to delete a login and associated users from SQL Server
Occasionally, you might need to drop a single login from a SQL Server, however if that login has users in a lot of databases, it may be tedious to delete the associated user account from…
Log Backup Failures – Danger, Will Robinson!
For databases in Full Recovery Model, log backups should be taken at a frequency that ensures your recovery point objective can be met. So you schedule log backups to occur, setup email notifications so you…
Unreported SQL Server Agent Job Failures
SQL Server Agent provides an easy-to-configure framework for notifying DBAs when jobs fail to run for any reason. Unfortunately, there are circumstances where job failures may not result in SQL Server sending a notification. For…
How long since you ran DBCC CHECKDB?
If you’re not regularly looking for corrupt databases with DBCC CHECKDB, you’re putting your organization’s data at risk. I run DBCC CHECKDB once per day, or as is reasonably possible. Typically, DBCC CHECKDB is setup…
Index reorg/rebuild script
Index fragmentation may be causing more I/O than necessary for efficient query processing. Fragmentation occurs as a result of inserting items into the middle of the index instead of appending them to the end. Inserting…
Capturing Index Usage Stats
Overview Index usage stats are invaluable for evaluating performance of existing indexes. Every time an index is used by the query-engine, an internal table is updated reflecting that usage. So, every time a scan, seek,…