Monthly Archives: April 2010

What is a Good Way to Quickly Disable SQL Agent Job Schedules?

This script has 2 major parts, disable the job schedules then notify SQL Agent of the change. Continue reading

Posted in Utilities | Tagged | 2 Comments

Whats a Good Rule for Max Degree of Parallelism?

I am one of those people that believes that believes that anything worth doing is worth having a script to do it. Setting the Max Degree of Parallelism is no exception. In this post I will go through the script I use as well as the metrics I watch to make sure the setting is correct. Continue reading

Posted in Utilities | Tagged , , , , , , , | 6 Comments

How Do I Find SSIS Packages that Exist in Multiple Folders?

A script to find duplicate packages deployed to different folders on the same server. Continue reading

Posted in Utilities | Tagged , | Leave a comment

How Do I Kill All Sessions from a Windows Group?

The stored procedure I am posting today will kill all sessions for users that are members of a given domain group. I use this stored procedure to keep ad-hoc (write down Access) users out of the way of nightly builds on my data warehouse. Continue reading

Posted in Security, User Management, Utilities | Tagged | Leave a comment

T-SQL Tuesday #005 – Self Service Performance Information

My T-SQL Tuesday #005 entry allows selected users of a server to see what is going on with it and react accordingly, freeing members of the DBA team from constant questions about why the server is running slow. Admittedly it does often just lead to more informed complaints but at least the time to resolution is quicker. Continue reading

Posted in Reporting | Tagged , , | 1 Comment

How Can I Tell if a Windows Login has Rights to My Server?

This is a great stored procedure to use for things like server dashboards where you only want people to see the dashboard for servers that they have access to without granting them all the rights that would go with the dashboard. Continue reading

Posted in Security, User Management, Utilities | Tagged | 5 Comments

Script to Create A TempDB File Per Processor

To satisfy my need to be lazy and protect me from myself I have written a script to add a TempDB file per processor. Continue reading

Posted in File Management, Utilities | Tagged | 6 Comments

What Do I Need to Do After Moving a Database to SQL 2005/2008?

I recently moved a database from SQL 2000 to SQL 2005. It was really just a matter of detaching the database, copying the files, attaching it on the new server, flip the compatibility mode and run a few queries. Thats it? Could it have been so easy? It turns out the answer is no. There are some steps that need to be taken after moving a database to SQL 2005 or 2008 from SQL 2000. Continue reading

Posted in Utilities | Tagged , , , , , | Leave a comment

How Do I Identify Invalid or Unneeded Logins?

I was looking at one of my servers and was caught off-guard by how many individual users had been granted rights. To make it worse I recognized a few user names as former coworkers. Clearly time for some house cleaning. Here is the script I came up with to do the analysis. Continue reading

Posted in User Management, Utilities | Tagged , , , , | Leave a comment

Is Anybody Using That Stored Procedure?

From time to time I get asked to check if a stored procedure is still used in preparation for dropping it. This post outlines some different ways to get after that information and how sometimes it can go horribly wrong. Continue reading

Posted in Tracing and Profiler | Tagged , , , | 5 Comments