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

   Items 1 to 20 of 3122    Older >>
 

Generate password using PowerShell

If you want to generate temporary passwords, can use my script.  Read more...
Rating: (not yet rated) |  Discuss |   Briefcase

Search a string in a text with number of occurrences

IF you have a long string and if you want to search a specific input string, and number of timeS the string has occurred then it's helps  Read more...
Rating: (not yet rated) |  Discuss |   Briefcase | 3 reads

Check running SQL Services

Check all the running SQL services in different servers. You can use the details before you start implementing SQL Patch to the servers i.e. if you want to explicitly stop the SQL Services.  Read more...
Rating: |  Discuss |   Briefcase | 49 reads

Check Existence of Server and find Instance Type

Execute the function and pass only the SQL Server Name to check if the SQL Instance is available and if yes, what is the Instance Type.  Read more...
Rating: |  Discuss |   Briefcase | 20 reads

Get a CSV list of columns in a table

Short little script to get the columns in a table in order into a CSV format. Can be useful for select or insert statements.  Read more...
By Chris 2015/03/30 | Source: SQLServerCentral.com | Category: csv
Rating: |  Discuss |   Briefcase | 969 reads

Delete SQL Instancename from default backup location

IF you want to delete the SQL Instance folder of your SQL Named instance after uninstall of your SQL Server Instance, then the script will help you. Note: I did an extra step by using / taking data (INSTALLSHAREDDIR) from your .INI file.  Read more...
Rating: (not yet rated) |  Discuss |   Briefcase

Database Mirroring Setup Procedure generator

A script that generates all the commands for installing a new database mirroring between two servers  Read more...
By Jefferson Elias 2015/03/20 | Source: SQLServerCentral.com | Category: mirroring
Rating: (not yet rated) |  Discuss |   Briefcase | 539 reads

Database Mirroring Setup Procedure generator

A script that generates all the commands for installing a new database mirroring between two servers  Read more...
By Jefferson Elias 2015/03/17 | Source: SQLServerCentral.com | Category: mirroring
Rating: (not yet rated) |  Discuss |   Briefcase | 57 reads

SCRIPT TO DELETE OLDER THAN N' DAYS

/* SCRIPT TO DELETE OLDER THAN N' DAYS BACKUP FROM A DEFAULT BACKUP DIRECTORY. IF DAYS = 0, PROVIDED, IT WILL DELETE ALL BACKUP FILES FROM THE BACKUP LOCATION. */   Read more...
By S M 2015/03/23 | Source: SQLServerCentral.com | Category: backup related
Rating: |  Discuss |   Briefcase | 1,516 reads

Run a specific query across all servers using powershell

Run a specific query across all servers using powershell  Read more...
Rating: |  Discuss |   Briefcase | 908 reads

Show running queries

Identify the current statement and its line number within a running batch. Includes a link to the execution plan, if available.  Read more...
By Richard Swinbank 2015/03/19 | Source: SQLServerCentral.com | Category: performance tuning
Rating: |  Discuss |   Briefcase | 1,695 reads

Move DB roles

This script will script the role members for all roles on the database.  Read more...
By Shanjan Sapra 2015/03/10 | Source: SQLServerCentral.com | Category: restore
Rating: |  Discuss |   Briefcase | 941 reads

Kill Processes

Never recommended but always necessary script to kill some processes  Read more...
By Oscar Cervantes 2015/02/10 | Source: SQLServerCentral.com | Category: kill processes
Rating: |  Discuss |   Briefcase | 1,654 reads

SQL Database Migration :Lower version of SQL Server to Higher version

Database Migration - Lower version of Microsoft SQL Server to Higher version of SQL Server, with complete DBA Guide with Automated Scripts and Steps.  Read more...
By Dathuraj Pasarge 2015/02/16 | Source: SQLServerCentral.com | Category: database migration
Rating: |  Discuss |   Briefcase | 1,670 reads

Quick SQL Server Configuration Summary Report

This script will detect and display a quick summary of your SQL Server installation.   Read more...
By Rudy Panigas 2015/02/11 | Source: SQLServerCentral.com | Category: configuration
Rating: |  Discuss |   Briefcase | 1,941 reads

Unpivot SQL Select Data

Stored procedure to transform a 'select' result set such that each column value is presented on a separate row.  Read more...
By Ted Tabah 2015/02/02 | Source: SQLServerCentral.com | Category: unpivot
Rating: (not yet rated) |  Discuss |   Briefcase | 1,400 reads

Users , Roles and Logins

Useful script in cases where auditors would like to know roles for each user in each database of an instance as well as the status of associated logins.  Read more...
By Kenneth Igiri 2015/02/03 | Source: SQLServerCentral.com | Category: auditing
Rating: |  Discuss |   Briefcase | 1,959 reads

Alter database owner to SA from any user details on all user databases

Alter database owner to SA from any other user details against all user databases  Read more...
Rating: |  Discuss |   Briefcase | 1,167 reads

Find Null values on every column

with this script you will be able to see if you have a null value on every column of your table  Read more...
By Leonardo Campos 2015/01/28 | Source: SQLServerCentral.com | Category: null
Rating: |  Discuss |   Briefcase | 1,718 reads

Update Statistics for databases where you have access

Run this stored procudure to update statistics for those SQL Server databases where you have permission  Read more...
By Christopher Petrich 2015/01/27 | Source: SQLServerCentral.com | Category: update stats
Rating: |  Discuss |   Briefcase | 945 reads
   Items 1 to 20 of 3122    Older >>