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

   Items 1 to 20 of 3445    Older >>
 

Add new Databases to a AG Setup with PowerShell

Some short & sweet PS code to add databases on AG Node 1 to AG Node2 and snap them in.  Read more...
By Edward Pochinski 2017/09/12 | Source: SQLServerCentral.com | Category: availability groups
Rating: (not yet rated) |  Discuss |   Briefcase | 119 reads

Get SSAS Tabular Model (2016) Roles using Powershell `

Extract roles from 2016 Tabular Models using Powershell.   Read more...
By Thasigan Chetty 2017/09/14 | Source: SQLServerCentral.com | Category: powershell
Rating: (not yet rated) |  Discuss |   Briefcase | 88 reads

SQL Agent jobs that run SSIS packages

Lists the job names and package names for jobs that execute SSIS packages (for packages stored in msdb).  Read more...
By TD Knight 2017/09/13 | Source: SQLServerCentral.com | Category: sql agent
Rating: |  Discuss |   Briefcase | 331 reads

SQL Procedure for adding Database in existing Always-On HADR.

SQL Procedure for adding Database in existing Always-On HADR.  Read more...
Rating: |  Discuss |   Briefcase | 168 reads

CDC watchdog for databases in AlwaysOn AG

Stored procedure to ensure CDC job will be started once failover happen.  Read more...
By Emil Bialobrzeski 2017/08/25 | Source: SQLServerCentral.com | Category: cdc
Rating: |  Discuss |   Briefcase | 183 reads

ASCII ProperCase Function

Another ProperCase function that utilises the ASCII function  Read more...
By Simon Hundleby 2017/07/24 | Source: SQLServerCentral.com
Rating: |  Discuss |   Briefcase | 369 reads

Add a login to multiple SQL Servers

This is a simple powershell script that will add a particular login to multiple SQL Server instances in a go.   Read more...
By Vishnu Gupthan 2017/07/19 | Source: SQLServerCentral.com
Rating: |  Discuss |   Briefcase | 392 reads

Send Mail Task details from SSIS Package

This query will help you to fetch the information from Send Mail Task(To,CC,BCC,Subject) in SSIS packages.It also fetch the data for those tasks which are inactive.  Read more...
Rating: (not yet rated) |  Discuss |   Briefcase | 371 reads

XML import from a Cross-tab Report

Source xml is a rendition of a cross-tab report. I show the evolution of a Spackle solution for import as a SQL resultset.  Read more...
By Wayne Findley 2017/06/08 | Source: SQLServerCentral.com | Category: xml
Rating: |  Discuss |   Briefcase | 274 reads

Getting TEXT, NTEXT and IMAGE columns in Database

As per Microsoft documentation these types will be removed from future version   Read more...
By Sheraz Mirza 2017/06/02 | Source: SQLServerCentral.com
Rating: |  Discuss |   Briefcase | 306 reads

Function to Round or Truncate DateTime

This Function is used to round to Second, Minute, Hour or Day or to Truncate to Second, Minute, Hour, Day, Month or Year and return Datetime Value  Read more...
By Shane Clarke 2017/05/31 | Source: SQLServerCentral.com | Category: date manipulation
Rating: |  Discuss |   Briefcase | 457 reads

Transparent Database Encryption on all User Databases

How to apply Transparent Database encryption?  Read more...
By Prem Kumar 2017/05/25 | Source: SQLServerCentral.com | Category: tde
Rating: |  Discuss |   Briefcase | 308 reads

Compute Holiday Day of the Month for any Year

This script provides the day of the month for the standard bank holidays for any given year. This is especially useful for computing the workday after a holiday.  Read more...
By Eric Notheisen 2017/05/24 | Source: SQLServerCentral.com | Category: date computation
Rating: (not yet rated) |  Discuss |   Briefcase | 348 reads

Index Usage Stats

This script returns index usage stats along with drop and create DDL.  Read more...
By David Kranes 2017/05/16 | Source: SQLServerCentral.com | Category: tuning
Rating: |  Discuss |   Briefcase | 588 reads

Round Natural Numbers to the nearest Power of 10

An ITVF function that rounds a number to the nearest Power of 10   Read more...
By Hannan Kravitz 2017/05/15 | Source: SQLServerCentral.com | Category: round
Rating: (not yet rated) |  Discuss |   Briefcase | 196 reads

Date Dimension Script

T-SQL script that creates Date_Dim & populates it for any date-range.  Read more...
By Dave Bunch 2017/05/08 | Source: SQLServerCentral.com | Category: data warehousing
Rating: |  Discuss |   Briefcase | 531 reads

Find function dependencies

Produces a list of functions and the objects that use them.  Read more...
By Andy Robertson 2017/05/09 | Source: SQLServerCentral.com | Category: function
Rating: |  Discuss |   Briefcase | 366 reads

Faster Backuphistory delete

A faster backup history cleanup proc than the built in MSDB proc   Read more...
By Doran Mackay 2017/05/10 | Source: SQLServerCentral.com | Category: backuphistory
Rating: (not yet rated) |  Discuss |   Briefcase | 247 reads

Fix Orphan Users for All databases - Fixed Collation Problem

Most comman scenario which we face on everyday basis is to fix the orphan database users at the database level. You need to go to each database and fix the orphan users at the each databases.  Read more...
By Sivakumar Mohan 2017/05/03 | Source: SQLServerCentral.com
Rating: |  Discuss |   Briefcase | 433 reads
   Items 1 to 20 of 3445    Older >>