Click here to monitor SSC
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 3360    Older >>
 

DynamicDateRangeGenerator

Generates # of dates in before/after current year. No more hardcoded date ranges.  Read more...
By Mitch Spruill 2016/08/08 | Source: SQLServerCentral.com | Category: dynamic
Rating: |  Discuss |   Briefcase | 454 reads

Alert for low identities available

This script alert when a table on a DB has a low number of identities available  Read more...
By Gianmarco Angiolini 2016/07/25 | Source: SQLServerCentral.com | Category: identity property
Rating: (not yet rated) |  Discuss |   Briefcase | 398 reads

Random Lottery Number Generator

This script will generate 5 lottery numbers plus one mega and you can set how many tickets and the range for the numbers for the different types of lotteries.   Read more...
By Elaena Bakman 2016/07/22 | Source: SQLServerCentral.com | Category: lottery numbers
Rating: |  Discuss |   Briefcase | 625 reads

Using Powershell to run queries on remote server .

This is a function written in powershell , which can used to run queries remotely   Read more...
By himanshu.sinha 2016/07/20 | Source: SQLServerCentral.com | Category: powershell
Rating: (not yet rated) |  Discuss |   Briefcase | 601 reads

Missing Index Script with Create Statement

standard missing index script but has a create statement to copy and past  Read more...
By Andrew Lackenby 2016/07/21 | Source: SQLServerCentral.com | Category: indexes
Rating: |  Discuss |   Briefcase | 599 reads

Capture Linux Drive Space data with Powershell

Capture Linux Drive Space data with Powershell using Posh-SSH module   Read more...
By Michael D'Spain 2016/07/19 | Source: SQLServerCentral.com | Category: powershell
Rating: (not yet rated) |  Discuss |   Briefcase | 166 reads

Replication Monitor

Replication Alert Monitor  Read more...
By Jignesh Raiyani 2016/07/18 | Source: SQLServerCentral.com | Category: replication monitor
Rating: |  Discuss |   Briefcase | 406 reads

Find Orphan users for each database in a given SQL Instance

This script will give you an output in a well defined tabular format with Database name,Username, and usersid of orphan users.   Read more...
By Prime SQL 2016/07/15 | Source: SQLServerCentral.com | Category: orphan users
Rating: |  Discuss |   Briefcase | 594 reads

Find Missing Backups and send the report

This script is used to Find missing backups on an instance and send the report via email.   Read more...
Rating: |  Discuss |   Briefcase | 446 reads

Get earliest and latest date values in a database

Query the earliest and latest date values found in all datetime columns in the current database.  Read more...
By Steve Armistead 2016/07/12 | Source: SQLServerCentral.com | Category: database aging
Rating: |  Discuss |   Briefcase | 605 reads

Find Free Space by Database

This is one of the handy script to find the free space by each database. This is useful when you troubleshoot the database space issues.   Read more...
Rating: |  Discuss |   Briefcase | 541 reads

Get Blocking Details

Use this script to get blocking details in SQL Server.  Read more...
By Rahul Biswas 2016/07/06 | Source: SQLServerCentral.com | Category: blocking details
Rating: |  Discuss |   Briefcase | 912 reads

Database Snapshot Creat/Drop/Restore SQL Script.

Database Snapshot Creat/Drop/Restore SQL Script for Single or multiple data files of databases.  Read more...
Rating: |  Discuss |   Briefcase | 492 reads

Kill Connections for a specific database

This script will kill all connections for a database.  Read more...
By Rahul Biswas 2016/07/07 | Source: SQLServerCentral.com | Category: kill connections
Rating: |  Discuss |   Briefcase | 763 reads

Quick table size information

Uses a loop and sp_spaceused to populate a temp table with size info  Read more...
By Gabe Tower 2016/07/04 | Source: SQLServerCentral.com | Category: table size
Rating: |  Discuss |   Briefcase | 664 reads

Script to Generate Foreign Keys

Generate Script for existing Foreign Keys for any emergency.  Read more...
By Sheraz Mirza 2016/07/05 | Source: SQLServerCentral.com | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 602 reads

Procedure to Find Candidate Keys

This Procedure will Display all the keys in a Specified Table   Read more...
Rating: |  Discuss |   Briefcase | 508 reads

Job Step Log Output file path

If you have a requirement to carefully have the output file against each sql agent job step, you can use this script. If incase, there are many sql agent jobs and by any reason if any of the step does not have proper o/p file, this script can automatically create the o/p file.  Read more...
By S M 2016/06/30 | Source: SQLServerCentral.com | Category: agent jobs
Rating: |  Discuss |   Briefcase | 367 reads

Getting LEAD and LAG values manually

LEAD and LAG functions are new in SQL Server 2012 , This short Script could be used to get these values in Earlier versions also  Read more...
By Sheraz Mirza 2016/06/28 | Source: SQLServerCentral.com | Category: lead function in 2008
Rating: |  Discuss |   Briefcase | 609 reads

Index and Column Configuration

Returns the indexes in a database along with all of the columns in the index in a consolidated format  Read more...
By Tennery Press 2016/06/29 | Source: SQLServerCentral.com | Category: index
Rating: |  Discuss |   Briefcase | 615 reads
<< Newer    Items 21 to 40 of 3360    Older >>