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

SQL Server procedure to script tables

SQL Server procedure to script all tables in a given database to one or individual files on a given path.  Read more...
By Gerrit Mantel 2017/10/09 | Source: SQLServerCentral.com | Category: create table
Rating: (not yet rated) |  Discuss |   Briefcase | 292 reads

Rebuild or recompile all views

Simple script to refresh or recompile your business-level views.  Read more...
By Doug Deneau 2017/10/05 | Source: SQLServerCentral.com | Category: views
Rating: |  Discuss |   Briefcase | 288 reads

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 | 139 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 | 97 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 | 365 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 | 191 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 | 201 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 | 382 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 | 417 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 | 381 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 | 282 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 | 314 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 | 466 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 | 321 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 | 361 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 | 604 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 | 199 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 | 549 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 | 382 reads
   Items 1 to 20 of 3447    Older >>