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

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 | 17 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 | 202 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 | 257 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 | 364 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 | 246 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 | 287 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 | 468 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 | 177 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 | 423 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 | 307 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 | 205 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 | 353 reads

Database Refresh Sync

Sync users and roles after restore/refresh  Read more...
By Jason Givens 2017/05/01 | Source: SQLServerCentral.com | Category: users
Rating: |  Discuss |   Briefcase | 494 reads

Quick and dirty script to ascertain datafile headroom

This is quick script to ascertain datafile headroom based on current size of the data in a file against the max size (which needs to be set for this to work!)  Read more...
Rating: (not yet rated) |  Discuss |   Briefcase | 271 reads

PowerShell 3rd Party tool Memory Alert

Keeps a memory leak under control until the bug fix is developed and applied. Short term band aid.  Read more...
By Edward Pochinski 2017/04/25 | Source: SQLServerCentral.com | Category: sql
Rating: |  Discuss |   Briefcase | 286 reads

PowerShell for Server/DB/Object level Permissions/Logins/Roles/Users

PowerShell to generate Server Level Permissions/Logins/Roles, Object/Database Level Permissions.  Read more...
Rating: |  Discuss |   Briefcase | 369 reads

Index Utilization Summary

This report shows all the Indexes on user defined table or view and how effectively they are being used in our project.  Read more...
By Devendra Thakur 2017/04/20 | Source: SQLServerCentral.com | Category: index
Rating: |  Discuss |   Briefcase | 554 reads

Find and Replace a value across all tables in database

End user has entered ‘goodmorning’ and ‘good morning’ interchangeably and it was causing logic failure at application level. So task was to replace ‘goodmorning’ with ‘good morning’ in database wherever it is there.  Read more...
By Devendra Thakur 2017/04/28 | Source: SQLServerCentral.com | Category: search database
Rating: |  Discuss |   Briefcase | 510 reads

Change Column datatype

This script is for converting Char to nChar and varchar to nVarchar with the same length. This process has reduced the manual work by 80% (approximately) in our case.  Read more...
By Devendra Thakur 2017/04/24 | Source: SQLServerCentral.com | Category: alter table
Rating: |  Discuss |   Briefcase | 353 reads

Table Valued Function to factorize numbers up to 100 trillion

This table valued function will quickly find the prime factors of any number up to 10 trillion  Read more...
By Jonathan Roberts 2017/04/26 | Source: SQLServerCentral.com | Category: prime numbers
Rating: (not yet rated) |  Discuss |   Briefcase | 243 reads
   Items 1 to 20 of 3437    Older >>