Gaps between SQL Server Agent Jobs
For a busy server, with lots of SQL Server Agent Jobs, it can be difficult to determine the optimal time to perform maintenance with the least impact on other operations. The code below inspects the…
Obtaining machine names for failed logins
The SQL Server error log contains invaluable details about failed logins, but only if you enable login auditing. Once enabled, the error log will provide the details of logins that failed including the name of…
Same plans, markedly different performance!
We all know the importance of looking at execution plans when doing performance optimization. However, just because the plan looks good doesn’t necessarily indicate the best outcome. It’s always important to consider the user-experience, and…
Allowing users to start and stop SQL Server Agent Jobs
I recently received a request to allow certain users to start and stop SQL Server Agent jobs, without giving them the ability to use the SQL Server Agent tools in SQL Server Management Studio. I…
Removing a filegroup that contains data.
Occasionally, you may find you have an extra filegroup that is no longer required for whatever reason. In order to remove that filegroup, you must move all data from that filegroup to a new filegroup….
Can individual filegroups be restored separately?
In this recent answer to a question on dba.stackexchange.com regarding the benefits of read-only filegroups, I posited that one might want to restore individual filegroups to enable a piece-meal approach to disaster recovery that allows…