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 61 to 80 of 3304    Older >>
 

Estimate compression for all tables and indexes with both Row and Page

This will log output of estimate compression for both PAGE and ROW for all tables and indexes  Read more...
By Doran Mackay 2015/12/10 | Source: SQLServerCentral.com | Category: compression
Rating: (not yet rated) |  Discuss |   Briefcase | 601 reads

Getting transaction log space usage statistics for all databases.

Easy way to get the TLOg space Usage details  Read more...
By S M 2015/12/07 | Source: SQLServerCentral.com | Category: space usage
Rating: |  Discuss |   Briefcase | 1,124 reads

SQL Jobs on Always On

This script will check the status of the node in Always On and enable or disable the jobs according to our requirement.  Read more...
By Raghavender Chavva 2015/12/02 | Source: SQLServerCentral.com
Rating: |  Discuss |   Briefcase | 1,193 reads

proc to calculate DM_OS_PERFORMANCE_COUNTERS over time interval

This is a stored proc that gives you the calculated performance counters over a time interval you specify.  Read more...
By John Heimiller 2015/12/04 | Source: SQLServerCentral.com | Category: performance
Rating: |  Discuss |   Briefcase | 891 reads

View for Ola Hallengren CommandLog

Add 3 columns, duration in seconds,Pagecount and fragmentation. For people like me who don't enjoy querying XML.  Read more...
By Doran Mackay 2015/12/03 | Source: SQLServerCentral.com
Rating: |  Discuss |   Briefcase | 1,165 reads

AlwaysOn Replica Failover Status Check

Template script/stored proc for sending notification and performing post failover tasks  Read more...
By Stan Lin 2015/11/27 | Source: SQLServerCentral.com | Category: alwayson
Rating: |  Discuss |   Briefcase | 845 reads

Extarcting string after and before a Character/Pattern

Finding characters/string before and after some character or pattern  Read more...
Rating: |  Discuss |   Briefcase | 1,196 reads

HashBytes Nvarchar(MAX)

SQL SERVER Includes a Hashbytes function, however it's limited to VARCHAR(8000). This can cause a problem when trying to build hashes over wide datasets. Solution Expose the C# Hashbytes function using CLR  Read more...
By Simon Hundleby 2015/12/01 | Source: SQLServerCentral.com | Category: clr
Rating: |  Discuss |   Briefcase | 727 reads

Design Errors : PK's with multiple columns on table with identity

Find Tables with identity, which should have PK with 1 column but have a PK with multiple columns or where the unique identity is contained in other indexes.  Read more...
By Doran Mackay 2015/11/24 | Source: SQLServerCentral.com | Category: database design
Rating: (not yet rated) |  Discuss |   Briefcase | 90 reads

Design Errors : PK's with multiple columns on table with identity

Find Tables with identity, which should have PK with 1 column but have a PK which is clustered but has multiple columns.  Read more...
By Doran Mackay 2015/11/24 | Source: SQLServerCentral.com | Category: database design
Rating: |  Discuss |   Briefcase | 897 reads

Database Backup Information Scripts

Scripts used to validate the backups information as below 1) Database Backups for all databases For Previous Week 2) Most Recent Database Backup for Each Database 3) Most Recent Database Backup for Each Database - Detailed 4) Databases Missing a Back-Up Within Past 24 Hours  Read more...
By Sathya Praveen 2015/11/25 | Source: SQLServerCentral.com | Category: database
Rating: |  Discuss |   Briefcase | 1,383 reads

List file name, size of all databases

lists file name, size of all databases in sql server  Read more...
By Michael Zhang 2015/11/26 | Source: SQLServerCentral.com | Category: db name
Rating: |  Discuss |   Briefcase | 1,156 reads

Constraints renaming

Rename constraints to enforce naming conventions.  Read more...
By Luis Cazares 2015/11/18 | Source: SQLServerCentral.com | Category: constraints
Rating: |  Discuss |   Briefcase | 680 reads

Disk Space Alerts Based on Threshold Value

This script will drop a mail for sql drives if space on drives is below set threshold value. Log drives with 15 and data files drives with value of 10% as threshold value of free space.  Read more...
By Ajay Dwivedi 2015/11/19 | Source: SQLServerCentral.com | Category: space
Rating: |  Discuss |   Briefcase | 1,397 reads

Figure out recovery mode for each database

It is anoying that someone created a new database and left its recovery mode in simple and it caused your backup jobs to fail.  Read more...
By Michael Zhang 2015/11/23 | Source: SQLServerCentral.com | Category: database
Rating: |  Discuss |   Briefcase | 580 reads

Temporary exclusive database access

This simple script disconnects any other session that is connected to the specified database by temporarily switching the database to single user.  Read more...
By Tom Staab 2015/11/20 | Source: SQLServerCentral.com | Category: administration
Rating: |  Discuss |   Briefcase | 846 reads

Read SQL Error logs

Query to read error logs from current/archive files   Read more...
Rating: |  Discuss |   Briefcase | 1,811 reads

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: SQLServerCentral.com | Category: variables
Rating: (not yet rated) |  Discuss |   Briefcase | 906 reads

Mirroring Automation

Automating the Mirroring configuration for new databases  Read more...
By Vasan Balu 2015/11/16 | Source: SQLServerCentral.com | Category: mirroring
Rating: |  Discuss |   Briefcase | 1,068 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: SQLServerCentral.com | Category: who
Rating: |  Discuss |   Briefcase | 1,729 reads
<< Newer    Items 61 to 80 of 3304    Older >>