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 21 to 40 of 3246    Older >>

List Expressions and Values of Variables in SSIS package

Variables can be direct text or Expressions. It's handy to be able to get both at one pass. This little script does that.  Read more...
By Wayne Findley 2015/11/17 | Source: | Category: variables
Rating: (not yet rated) |  Discuss |   Briefcase | 790 reads

Mirroring Automation

Automating the Mirroring configuration for new databases 
By Vasan Balu 2015/11/16 | Source: | Category: mirroring
Rating: |  Discuss |   Briefcase | 904 reads

Who are connecting to database and disconnect ...

When you want gain exclusive access to database in order to restore database  Read more...
By Michael Zhang 2015/11/06 | Source: | Category: who
Rating: |  Discuss |   Briefcase | 1,437 reads

First day and last day of a week

This scripts calculates the first day and the last day of a given week  Read more...
By Kamel AL GAZZAH 2015/11/10 | Source: | Category: date calculations
Rating: |  Discuss |   Briefcase | 902 reads

Drop All Temp Tables For Connection

Stored Procedure that will drop all temporary tables for your connection.  Read more...
Rating: |  Discuss |   Briefcase | 1,083 reads

Data Compression

This script is used to compress tables and indexes. It is designed for page compression on all. Just a little ditty to help with our EDW storage and processing.  Read more...
By Eric Blake 2015/11/11 | Source: | Category: compression
Rating: |  Discuss |   Briefcase | 976 reads

Get FirstDate and LastDate of Every month from two Dates

Get FirstDate and LastDate of Every month from two Dates. Like IF we have @date1='05/02/2015' and @date2= '11/25/2015' then we will get list of first date and last date from month 5 to 11. SELECT ID,FirstDate,LastDate,Month,Year FROM [GetFLDatelist](@date1,@date2)  Read more...
Rating: |  Discuss |   Briefcase | 1,055 reads

Alter all/specific columns by double dynamic SQL

The script uses dynamic SQL twice first to get the detail about the database structure and create ddl out of it second to execute each DDL created  Read more...
By Ashish Shevale 2015/11/03 | Source: | Category: alter
Rating: |  Discuss |   Briefcase | 789 reads

Rebuild index selectively

Rebuild index is expensive most time. So you don't rebuild all index blindly.  Read more...
Rating: |  Discuss |   Briefcase | 1,282 reads

Update statistics

Update statistics older 1 day 
By Dmitriy Ivanov 2015/10/07 | Source:
Rating: (not yet rated) |  Discuss |   Briefcase | 1,240 reads

copy and rename multiple databases

This is to clone multiple databases using a list with oldname,newname. optionally the original database can be deleted in the process.  Read more...
Rating: |  Discuss |   Briefcase | 853 reads

Capture the tasks performed in a text file

Creates a record of all or part of a Windows PowerShell session in a text file.  Read more...
Rating: |  Discuss |   Briefcase | 892 reads

Calculate relative time

dynamically calculates a timestamp 
By Wilfred van Dijk 2015/09/30 | Source: | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,295 reads

Open Transaction details

sql server blocking, open transaction 
By S M 2015/10/01 | Source: | Category: transactions
Rating: |  Discuss |   Briefcase | 1,467 reads

Get Server version Info

Yet another Script To get Sql server version Info. Run From Central Management server to get all your environment servers  Read more...
By Mark Huber 2015/09/29 | Source: | Category: version
Rating: |  Discuss |   Briefcase | 1,343 reads

PoSh: Get-WhoInstallSQL

Useful function that finds who installed SQL Server 
By Miguel Quintana 2015/09/28 | Source: | Category: powershell
Rating: |  Discuss |   Briefcase | 926 reads

Show solving arithmetic expression step by step

A script to show how to solve arithmetic expressions step-by-step, for my 9-year old daughter.  Read more...
By Kevin Duan 2015/09/25 | Source: | Category: arithmetic expression
Rating: |  Discuss |   Briefcase | 1,036 reads

Document the output of all the SPs in HTML fashion

A script to document the output columns of all the SPs in a given database, with a HTML formatted document  Read more...
By Enrico Di Cesare 2015/09/24 | Source: | Category: documentation
Rating: |  Discuss |   Briefcase | 1,532 reads

Block altering indexed views.

Altering an indexed view will drop all indexes on it without warning, even if nothing is changed. This will prevent accidental alters. Script is divided into 4 parts, included testing and cleanup scripts.  Read more...
By Dennis Post 2015/09/01 | Source: | Category: alter index
Rating: |  Discuss |   Briefcase | 721 reads

Generate Login Script(2008R2 And Older)

Generate Script from Logins of Sql Server to recreate in another instance  Read more...
By Bahram Shayan 2015/08/25 | Source: | Category: logins
Rating: |  Discuss |   Briefcase | 1,523 reads
<< Newer    Items 21 to 40 of 3246    Older >>