Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
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 41 to 60 of 3033    Older >>

Column Exists or not?

Function to know column Exists or not in the Table?  Read more...
By Shiva N (AxSys) 2014/07/22 | Source:
Rating: |  Discuss |   Briefcase | 1,721 reads

Check Backups

Daily maintenance script to check on backups 
By Greg Ryan 2014/07/04 | Source: | Category: backups
Rating: |  Discuss |   Briefcase | 2,096 reads

SQL Server CPU Usage History Histogram

Returns a summary of CPU usage by SQL Server over the last 4 hours (default). Using the sample values collected in the dm_os_ring_buffers dmv, this query will show CPU usage by the SQL Server process for the last for hours even if you have no other benchmarking activities in place on your server yet.  Read more...
By Jonathan Allen 2014/07/07 | Source: | Category: performance
Rating: |  Discuss |   Briefcase | 2,468 reads

Avoid Transaction Logs volume from filling

Script for preventing the volumes of the transaction logs from filling.  Read more...
By Daniel Marques 2014/07/02 | Source: | Category: transaction logs
Rating: |  Discuss |   Briefcase | 2,139 reads

Find Transactional Replication Publisher

Finds the publisher, publisher database, and publication that your subscription table is replicated from.  Read more...
By Derik Hammer 2014/06/27 | Source: | Category: replication
Rating: (not yet rated) |  Discuss |   Briefcase | 337 reads

Find Transactional Replication Source from Destination Table

I wrote this script to help me locate the publisher, publication, published database, and source object for destination tables which might not be named the same or when you are in a large replication topology with dozens of publications.  Read more...
By Derik Hammer 2014/06/25 | Source: | Category: replication
Rating: |  Discuss |   Briefcase | 444 reads

Script out all alerts

Sometimes you want to copy all the alerts that you've got set up on one server to add them to another  Read more...
By Carolyn Richardson 2014/06/30 | Source: | Category: msdb
Rating: |  Discuss |   Briefcase | 1,475 reads

Productivity Keyboard Shortcuts

something to help working with ssms. 
By Emil Bialobrzeski 2014/06/23 | Source: | Category: shortcuts
Rating: |  Discuss |   Briefcase | 2,027 reads

All Index Size

All Index Size 
By mkl-1013783 2014/06/18 | Source: | Category: indexing
Rating: |  Discuss |   Briefcase | 795 reads

Dynamic pivoting

Dynamically create and/or execute a pivot sql statement against a provided table.  Read more...
By Trevor Makoni 2014/06/16 | Source: | Category: pivot
Rating: |  Discuss |   Briefcase | 2,674 reads

Powershell script to report old backup files

Get a report of backups older than 60 days.  Read more...
By Rolando Hernandez 2014/05/30 | Source: | Category: backups
Rating: |  Discuss |   Briefcase | 812 reads

Start a job at a defined step on another sql instance

this is a powershell script that can start a job at a defined step name (default will be step 1), on a network instance either on a network on locally.  Read more...
By az352001 2014/06/04 | Source: | Category: jobs
Rating: |  Discuss |   Briefcase | 657 reads

Caching and paging a SQL Result Set

This is an example of how to Cache Query results on the Server side then page though the results   Read more...
By Greg Ryan 2014/06/06 | Source: | Category: cashing
Rating: (not yet rated) |  Discuss |   Briefcase | 1,404 reads

Paginating a SQL query result set

How to Paginate a query result set to keep from pulling the whole result set to the client side   Read more...
By Greg Ryan 2014/06/09 | Source: | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,892 reads

How long will In-Recovery database take to come online 2005/2008/2008R

Ever get a database stuck inrecovery due to a crash in the middle of a transaction, the below script will help you find out how long it will take to finish the recovery process. This concerns sql server 2012  Read more...
By Patrick Akhamie 2014/07/30 | Source: | Category: database recovery
Rating: |  Discuss |   Briefcase | 1,043 reads

Droping Temporary Table if Exists

Query to Drop Temporary Table if exists in the Database  Read more...
By sansmash 2014/05/29 | Source:
Rating: |  Discuss |   Briefcase | 2,108 reads

Email Failed SQL Jobs

Report on failed SQL agent jobs 
By SQLAssAS 2014/05/28 | Source:
Rating: |  Discuss |   Briefcase | 1,718 reads


with this below script so you don't need to enable cmdshell..  Read more...
Rating: |  Discuss |   Briefcase | 829 reads

Query to Find Top CPU Queries

The query will find out what the top most cpu intensive queries are  Read more...
By Patrick Akhamie 2014/06/03 | Source: | Category: top cpu queries
Rating: |  Discuss |   Briefcase | 2,442 reads


Here's a quick query you can run across all your servers (2005_2008_2008R2) to find a wealth of information like service pack, edition, number of CPUs and RAM. Even more is available if you want to add additional SERVERPROPERTY attributes or fields from one of the DMVs.  Read more...
Rating: |  Discuss |   Briefcase | 1,429 reads
<< Newer    Items 41 to 60 of 3033    Older >>