Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Add a script

<< Newer    Items 61 to 80 of 3367    Older >>

Write to File

Stored procedure that writes @Text out to @File 
By Andie Letourneau 2016/06/14 | Source: | Category: ole
Rating: |  Discuss |   Briefcase | 861 reads

Script to Find String in Database object

Script that searches every object in a database for a specific string.  Read more...
By Andie Letourneau 2016/06/20 | Source: | Category: search
Rating: |  Discuss |   Briefcase | 709 reads

Space monitor on SQL Server

monitoring over server spacing 
By Jignesh Raiyani 2016/06/08 | Source: | Category: space monitoring
Rating: |  Discuss |   Briefcase | 650 reads

Agent Job Schedule Description

Yet another schedule description query with added grammatical improvements.  Read more...
By Michael McCormick 2016/05/06 | Source: | Category: sql server
Rating: |  Discuss |   Briefcase | 547 reads

Brute Force data search tool

searches entire db for a string, number, or date, returns list of results  Read more...
By John Imel 2016/05/02 | Source: | Category: bruteforce
Rating: |  Discuss |   Briefcase | 850 reads

Restore script for Ola Hallengren backup

Create a restore script based on backup files in a directory  Read more...
By Joe O'Connor 2016/05/03 | Source: | Category: restore
Rating: |  Discuss |   Briefcase | 644 reads

DBCC CHECKDB to a table

An enhanced version of a script originally posted by Robert Pearl some time ago. It now takes into account changes in the tabelresults for CHECKDB in latter versions of SQL Server.  Read more...
Rating: |  Discuss |   Briefcase | 571 reads

SQL server Agent - Status

As part of the application to monitor SQL health I created. The procedure returns status of the SQL server Agent  Read more...
By Kraai 2016/04/29 | Source: | Category: sql server agent .
Rating: (not yet rated) |  Discuss |   Briefcase | 507 reads

Get Space on SQL hardrive

I was recently asked to monitor the Database size on the SQL server, and display the results in a report.   Read more...
By Kraai 2016/05/05 | Source: | Category: space on hardrive
Rating: |  Discuss |   Briefcase | 670 reads

Pad length

Pad string with a lenght of characters at front or back  Read more...
By Kraai 2016/04/28 | Source: | Category: string manipulation
Rating: |  Discuss |   Briefcase | 443 reads

Calculate Age (in years)

An inline table valued function (iTVF) that can be used to calculate age in years.  Read more...
By Alan Burstein 2016/04/27 | Source: | Category: date
Rating: |  Discuss |   Briefcase | 826 reads

Database File Move Etc

A stored procedure to generate database file moves along with Robocopy script and the attach / detach scripts  Read more...
By M Higgins 2016/04/20 | Source: | Category: attach
Rating: |  Discuss |   Briefcase | 472 reads

Version independent spGetBackupDateFromFile

This is an version independent stored procedure to get the backup date from a backup file. It's tested for SQL 2005, 2008(R2), 2012 and 2014. Consider it a template to which you can add more output parameters from the headerinfo to meet your requirements.  Read more...
By Theo Ekelmans 2016/04/21 | Source: | Category: restore headeronly
Rating: (not yet rated) |  Discuss |   Briefcase | 294 reads

Open Transaction Alarm to Log to the Event log

If you have job that opens a transaction and hangs too long causing a Prod issue this will be a big help to let you know.  Read more...
By Edward Pochinski 2016/04/22 | Source: | Category: transactions
Rating: |  Discuss |   Briefcase | 505 reads

Determine Easter Sunday

Determine what day easter sunday will be based upon the year you pass the function   Read more...
By Kraai 2016/04/25 | Source: | Category: easter sunday
Rating: (not yet rated) |  Discuss |   Briefcase | 366 reads

Format Date Time Function

Function do return common datatime formats of a date. select dbo.[KDT_FN_FORMATDATETIME]('LASTDAY DDDD',getdate())   Read more...
By Kraai 2016/04/26 | Source: | Category: datetime
Rating: |  Discuss |   Briefcase | 879 reads


A brand new, high-performing, "GetNumbers" or "fnTallyTable" function that can be used for defeating RBAR.  Read more...
By Alan Burstein 2016/04/19 | Source: | Category: set based
Rating: |  Discuss |   Briefcase | 683 reads


A fun, but simple tally table for April 1.  Read more...
By Steve Jones 2016/04/01 | Source: | Category: tally table
Rating: |  Discuss |   Briefcase | 755 reads

Find missing index in the whole instance

This script scans all DB-s in the instance & send result to the email. I use sp_MSforechdb function & missing index finding script what i found here   Read more...
By Aksel Rohtsalu 2016/03/28 | Source: | Category: missing index finder
Rating: |  Discuss |   Briefcase | 949 reads

AD HOC Queries with Excel Output (Multiple Instances)

From a plain text containing multiple instance names you can deploy EXCEL files to report just changing your query text  Read more...
Rating: |  Discuss |   Briefcase | 1,047 reads
<< Newer    Items 61 to 80 of 3367    Older >>