Category Archives: Utilities

How is Fill Factor Impacting My Indexes?

The theme for this month’s T-SQL Tuesday is indexes so it seemed like the perfect excuse to blog about a script that I have written to see what choices for fill factors on indexes actually does to the structure of those indexes. Continue reading

Posted in Utilities | Tagged , , , , , , , | 13 Comments

A Stored Procedure to Move SSIS Packages Between Servers

This post provides the code for a stored procedure to move SSIS packages between SQL 2005 SSIS servers. Continue reading

Posted in Utilities | Tagged , , , | 3 Comments

Great News! SSMS Tools Pack 1.9 is Coming Out!

Mladen Prajdic recently announced that the newest version of SSMS Tools Pack is coming out and I am excited.
Continue reading

Posted in Utilities | Tagged , , , , , | 2 Comments

How Can I Quickly Script Out Replication?

This script takes a distribution server name and an output directory as parameters then works through all publications on each of the servers that connects to the distribution server, scripting them out. Continue reading

Posted in PowerShell, Utilities | Tagged , | 9 Comments

What is a Good Way to Run CheckDB on a VLDB?

Today’s script is one that I wrote based on the logic outlined in a post by Paul Randal. This script is written for SQL 2000 but, as Paul notes, the logic will work on SQL 2005. Continue reading

Posted in Utilities | Tagged | Leave a comment

How Do I Move SQL Database Files Around?

Here is a script that will generate a script to move database files around in SQL 2005/2008. Continue reading

Posted in Utilities | Tagged , , , , , , | Comments Off on How Do I Move SQL Database Files Around?

How Can I Tell if SQL Agent is Running via SQL?

Today’s post is a continuation in my on-going effort to document all of the scripts I use to manage my environment. To date it has been a great exercise both in getting things written down and in getting feedback from others on better ways I could be doing things. To that end, here is a stored procedure that I use to tell if SQL Agent is running before trying to start a job programmatically. Continue reading

Posted in Utilities | Tagged | 5 Comments

What is a Good Way to Get the SQL Server Log Directory?

The script for today is one that I use in all of my job creation scripts as well as a script I have to go back and clean up job output file paths. It gets the location of master on a SQL 2005 or SQL 2008 server, using that to find the Log directory. Continue reading

Posted in Utilities | Tagged | Comments Off on What is a Good Way to Get the SQL Server Log Directory?

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 , , , , , , , | 5 Comments