SQL Clone
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 21 to 40 of 3425    Older >>
 

Missing index with change impact percentage

This script will list all missing indexes with create statements.  Read more...
By Arun Kumar 2017/03/01 | Source: SQLServerCentral.com | Category: indexing
Rating: |  Discuss |   Briefcase | 501 reads

Corrupt Page Notification

This trigger will send mail notification once a row is written in the suspect pages table  Read more...
By Henrico Bekker 2017/03/03 | Source: SQLServerCentral.com | Category: corruption
Rating: (not yet rated) |  Discuss |   Briefcase | 328 reads

Building calendar table using MTVF

This script is a small extension to this excellent article http://www.sqlservercentral.com/articles/calendar/145206/   Read more...
By Darko Martinovic 2017/03/28 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 958 reads

Getting resource content from blocked process report

This script serves to display the content of the waiting resource. It is divided in two parts. In first one I'm using t-sql, and in second one I accomplished the same task using SQLCRL.   Read more...
By Darko Martinovic 2017/02/27 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 323 reads

Getting resource name from blocked process report

The Resource name is most important information in the blocked process report. The purpose of this script is to decode this information. The script is divided in two parts. In first one I'm using t-sql, and in second one I accomplished the same task using SQLCLR.   Read more...
By Darko Martinovic 2017/04/21 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 598 reads

Tally Generator

Inline function generating the set of numbers based on submitted parameters.   Read more...
By Sergiy Floka 2017/03/08 | Source: SQLServerCentral.com | Category: tally
Rating: |  Discuss |   Briefcase | 974 reads

Check if xp_cmdshell is turned on and flip the bit

The code works well for an automation process that needs to have xp_cmdhsell turned on.  Read more...
By Edward Pochinski 2017/02/22 | Source: SQLServerCentral.com | Category: xp_cmdshell
Rating: (not yet rated) |  Discuss |   Briefcase | 267 reads

AdventureWorks2016CTP3 - JSON Sample scripts

Geting the JSON Sample Scripts to run   Read more...
By Mick Rust 2017/01/31 | Source: SQLServerCentral.com | Category: adventureworks2016ctp3
Rating: |  Discuss |   Briefcase | 277 reads

Find Text in All Databases

Search all databases for a particular string.  Read more...
By Jason Givens 2017/01/30 | Source: SQLServerCentral.com | Category: sp_msforeachdb
Rating: |  Discuss |   Briefcase | 582 reads

Powershell Script to find a SQL\Windows login in SQL Server

This script will help you to find out whether a particular id (SQL or Windows ID) is present in the SQL Server  Read more...
By Vishnu Gupthan 2017/01/26 | Source: SQLServerCentral.com | Category: sql server
Rating: |  Discuss |   Briefcase | 397 reads

Generic, parameterised, create DB script

A script to be used as part of development deployments where new databases are required, so as to provide standardisation.  Read more...
Rating: (not yet rated) |  Discuss |   Briefcase | 333 reads

TDE Decryption Timer Script

Decryption Timer to let you know when the removal of encryption for a TDE encrypted database has completed to perform a backup of the data after masking.  Read more...
By Edward Pochinski 2017/01/24 | Source: SQLServerCentral.com | Category: tde
Rating: |  Discuss |   Briefcase | 307 reads

Count Year,Month,Day

This Syntax will help you to search how many period left your data/assets must be followed up or changed or disposed  Read more...
By Deny Christian 2017/01/25 | Source: SQLServerCentral.com | Category: date manipulation
Rating: |  Discuss |   Briefcase | 508 reads

Powershell Script for regular DBA activities

This script will perfrom following tasks : 1. BackUp DB 2. Restore DB from BackUp File 3. Restore DB from DB 4. Create a new DB from Existing Db It takes care of all the possible failures during these operations, while done manually.   Read more...
By Mayank Shukla 2017/01/11 | Source: SQLServerCentral.com | Category: backup
Rating: |  Discuss |   Briefcase | 1,025 reads

Backup databases in an Availability Group

Use this script to backup databases based on their role in an availability group  Read more...
By Kevin Burgess 2017/01/12 | Source: SQLServerCentral.com | Category: availability
Rating: (not yet rated) |  Discuss |   Briefcase | 249 reads

PoorDBA Tools - 1: DB Log Space used

Evaluate and notify if database log file usage exceeds 15%.  Read more...
By Henrico Bekker 2017/01/10 | Source: SQLServerCentral.com | Category: alerts
Rating: |  Discuss |   Briefcase | 640 reads

Query details about objects allocated in TEMPDB.

TEMPDB doesn't have to be a black box. Know what objects and processes are causing it to bloat in size.  Read more...
By Eric Russell 2017/01/30 | Source: SQLServerCentral.com | Category: tempdb
Rating: |  Discuss |   Briefcase | 1,019 reads

SQL Server ErrorLog Archive Script

An ErrorLog Archive and Clean Script  Read more...
By Yusuf Kahveci 2017/01/02 | Source: SQLServerCentral.com | Category: error log
Rating: (not yet rated) |  Discuss |   Briefcase | 325 reads

View Autogrowth on a daily basis

Sends an HTML formatted Email with autogrowth Information for the last 24 hours.  Read more...
By Kevin Burgess 2017/01/03 | Source: SQLServerCentral.com | Category: autogrow
Rating: |  Discuss |   Briefcase | 555 reads

T-SQL implementation of FizzBuzz

A T-SQL implementation of FizzBuzz consisting of a single SELECT statement.  Read more...
By Eric Russell 2016/12/28 | Source: SQLServerCentral.com | Category: fizzbuzz
Rating: |  Discuss |   Briefcase | 536 reads
<< Newer    Items 21 to 40 of 3425    Older >>