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 3021    Older >>
 

PowerShell script to check last backup date for Databases

PowerShell script to check last full backup, transaction log backup date for SQL Server databases.  Read more...
By Mashrur Shuvo 2014/08/22 | Source: SQLServerCentral.com | Category: daily dba task
Rating: (not yet rated) |  Discuss |   Briefcase | 10 reads

Calculate gregorian easter sunday using a table valued function

Calculate gregorian easter sunday using a table valued function.  Read more...
By Robin Langell 2014/08/22 | Source: SQLServerCentral.com | Category: easter sunday
Rating: (not yet rated) |  Discuss |   Briefcase | 4 reads

Change password for user 'sa'

Last week one of my team members was supposed to create a SQL Authenticated ID on a SQL Server 2005 instance. This was as per the request of the Application team who would be using it for an Application.   Read more...
By gogulatorul 2014/08/20 | Source: SQLServerCentral.com | Category: security
Rating: |  Discuss |   Briefcase | 891 reads

Powershell script to read Windows 2012 R2 Failover cluster log for Sql

I was having a hard time to reading the Windows 2012 R2 Failover cluster log from my live server. That is why I just wrote a simple PowerShell script to get the job done for me.  Read more...
By Mashrur Shuvo 2014/08/21 | Source: SQLServerCentral.com | Category: powershell
Rating: (not yet rated) |  Discuss |   Briefcase | 322 reads

Aging report GP Dynamics

Using Pivot, coalesce, datediff  Read more...
By M Reale 2014/08/18 | Source: SQLServerCentral.com | Category: pivot
Rating: |  Discuss |   Briefcase | 649 reads

Restore All Backups

This is a script to restore all databases from backups places in a folder.  Read more...
Rating: |  Discuss |   Briefcase | 697 reads

Accurate Time between Two Dates in Year, Month,Day Format

This script shows the total time between two dates.  Read more...
By Vimal Lohani 2014/08/13 | Source: SQLServerCentral.com | Category: date difference
Rating: |  Discuss |   Briefcase | 944 reads

Query block process report

This will let you query the block process report for detail on the blocker, the blocked process, apps, logins and more.  Read more...
By Wogderess Hailu 2014/08/04 | Source: SQLServerCentral.com | Category: reports
Rating: |  Discuss |   Briefcase | 964 reads

Get Client IP Address in SQL Server

A function for getting Client IP Address in SQL Server  Read more...
By Sarvesh Gupta 2014/08/05 | Source: SQLServerCentral.com | Category: ip address
Rating: |  Discuss |   Briefcase | 1,328 reads

Code For Truncating Table with foreign Key Constraints

This can be used for data warehouses as well as truncating table with foreign key constraints.  Read more...
By Vimal Lohani 2014/08/06 | Source: SQLServerCentral.com | Category: truncating tables
Rating: |  Discuss |   Briefcase | 1,220 reads

Rename a SQL Server database

This script allows you to rename a database.  Read more...
By v.raguram1989 2014/08/08 | Source: SQLServerCentral.com
Rating: |  Discuss |   Briefcase | 976 reads

Script to generate the SQL to create a fulltext catalog and its underlying fulltext index

This script was published originally on http://humakhurshid.blog.com/2011/07/14/script_out_fulltext_catalog/ The author has tweaked it little bit to improve it.  Read more...
By awais9981 2014/08/07 | Source: SQLServerCentral.com
Rating: |  Discuss |   Briefcase | 592 reads

Simple script to list out SPID, Program_name and login details

If you have any requirement where you want to find out all the SPIDs running on a database along with the program/application name of the SPID and the login details. You can run the procedure to get the details very easily.  Read more...
By Sourav Mukherjee 2014/08/12 | Source: SQLServerCentral.com | Category: spid
Rating: |  Discuss |   Briefcase | 986 reads

Find Most Expensive Stored PROCEDURE

SQL Server Stored Procedure Execute Count Script ..   Read more...
By Yusuf Kahveci 2014/08/19 | Source: SQLServerCentral.com | Category: performance
Rating: |  Discuss |   Briefcase | 1,655 reads

Report overlapping jobs

This script reports jobs which are running when another job is also running. This could be a reason for performance degradations.  Read more...
By Wilfred van Dijk 2014/07/31 | Source: SQLServerCentral.com | Category: sqlagent
Rating: |  Discuss |   Briefcase | 859 reads

Find Data in Alpha Columns

Given a bit of Alpha data, this script looks in all alpha columns in the database. It returns simple queries that produced rows in order to allow you to verify that the data that was sought was actually found.  Read more...
By Kevin Herr 2014/08/01 | Source: SQLServerCentral.com | Category: search database
Rating: |  Discuss |   Briefcase | 509 reads

CTE DML

This script is an example explaining how to write DML using CTE.  Read more...
By kbhanu15 2014/07/23 | Source: SQLServerCentral.com | Category: dml
Rating: |  Discuss |   Briefcase | 1,078 reads

Move End of Month file from source to destination

The script below executes on the first of every month and moves files from source to destination location.   Read more...
By Prem Kumar 2014/07/24 | Source: SQLServerCentral.com | Category: move files
Rating: |  Discuss |   Briefcase | 705 reads

Yet another way to defrag indexes

A script we use in our company, that rebuilds online=on by default, but takes care of special exceptions.  Read more...
By Gaby Abed 2014/07/25 | Source: SQLServerCentral.com | Category: defragmentation
Rating: |  Discuss |   Briefcase | 1,093 reads

Find server in complex CMS hierarchy

List all the instances with their paths as stored on CMS.  Read more...
By Cheetah 2014/07/28 | Source: SQLServerCentral.com | Category: list
Rating: (not yet rated) |  Discuss |   Briefcase | 331 reads
   Items 1 to 20 of 3021    Older >>