I have recently been working on tuning a job that purges data out of various tables that are older than 13 months using GetDate(). Pretty straight forward right? Well originally the job consisted of 6 different statements like so: Except, the tables have become so large the generic deletes were
If you work or have worked, in a shop with lots of SQL servers then you either have or will, experience an issue with storage. Like for instance, you’re storage controllers go down, knocking down your SQL instances. As we all know, this is a good way to corrupt databases.
Recently came across a situation where reporting logins were interfering with nightly jobs due to blocking. After a number of attempts of trying to resolve the blocking, it was decided that a stored procedure that disabled the login and killed SPIDs was the most pragmatic solution. This is the code