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

<< Newer    Items 21 to 40 of 3547    Older >>

View Server Roles and Permissions per Login

obtain server roles and permissions by login 
By Perry Whittle 2018/10/12 | Source: SQLServerCentral.com | Category: server roles
Rating: |  Discuss |   Briefcase | 446 reads

How to Identify backup tables within production databases

How to identify backup tables within production databases that can be removed.   Read more...
Rating: |  Discuss |   Briefcase | 294 reads

Detect and Repair Non Trusted Foreign Keys

Create the code to detect and repair non trusted foreign keys  Read more...
By Ronald Hensbergen 2018/10/23 | Source: SQLServerCentral.com | Category: foreign keys
Rating: |  Discuss |   Briefcase | 246 reads

Purging table script

Script to purge big tables in small batches of 500  Read more...
By Abhishek Dwivedi 2018/09/26 | Source: SQLServerCentral.com | Category: purgingtable
Rating: |  Discuss |   Briefcase | 160 reads

Conditionally Order By Different Column

Order records based on a different column depending on which absolute value is greater.  Read more...
By Noel Scheaffer 2018/10/01 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 431 reads

Data Collections restart and clear cache files

Script to stop the default Data Collection sets, clear the cache files and then restart collection sets.  Read more...
By Matt Frend 2018/10/02 | Source: SQLServerCentral.com | Category: data collections
Rating: (not yet rated) |  Discuss |   Briefcase | 145 reads

number of rows and columns of an instance

Get the number of rows, columns, and space used by all tables in all databases  Read more...
By Fabiano Carvalho 2018/10/03 | Source: SQLServerCentral.com
Rating: |  Discuss |   Briefcase | 261 reads

T-SQL to compress (shorten) IPv6 address

Didn't find anything, so hope this will help someone with similar need. Note I did a similar set-based version, and unless the input is more towards non-zeros in all eight 2-byte fields, the set-based performs not as well  Read more...
By jianqing_ye 2018/09/19 | Source: SQLServerCentral.com | Category: t-sql
Rating: (not yet rated) |  Discuss |   Briefcase | 191 reads


A copy of the late Robert Davis' dba_copylogins stored procedure with a bug fix. The SP copies logins, roles, and permissions between servers.  Read more...
By Chuck Hamilton 2018/09/24 | Source: SQLServerCentral.com | Category: copy logins
Rating: |  Discuss |   Briefcase | 366 reads

Compare Table Contents Procedure

Compare the content of two tables for differences  
By Damir Sprecic 2018/09/20 | Source: SQLServerCentral.com | Category: compare
Rating: |  Discuss |   Briefcase | 376 reads


Sp to Generate Restore sequence 
By Harkamal Singh 2018/09/04 | Source: SQLServerCentral.com | Category: backup and restore
Rating: |  Discuss |   Briefcase | 212 reads


This scripts helps to generate ADD / DROP Constraints against single Database.  Read more...
By Aswini G 2018/09/03 | Source: SQLServerCentral.com | Category: table constraints
Rating: |  Discuss |   Briefcase | 171 reads

Table Space Used in DB

A quick script that provides the sizes of the tables in your database, including schema and choice of sort method  Read more...
By Luis Chiriff 2018/08/07 | Source: SQLServerCentral.com | Category: sp_spaceused
Rating: |  Discuss |   Briefcase | 493 reads

SQL table to HTML

Convert any table or select query to a html table format  Read more...
By Eduardo Pivaral 2018/08/09 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 754 reads


Another way to do a "Multi"- replace 
By Jonny Wallman 2018/08/13 | Source: SQLServerCentral.com
Rating: |  Discuss |   Briefcase | 447 reads

STRING and FIND SQL Functions

SQL Functions that simplify search and operations over strings on SQL Server (starting with 2012)  Read more...
By Pedro Costa 2018/07/11 | Source: SQLServerCentral.com
Rating: |  Discuss |   Briefcase | 657 reads

User Stored Procedure for Backup of user databases

This script is intended to demonstrate how we can create a stored procedure for the user responsible for backing up user databases in a default storage location.  Read more...
By Junior Galv√£o - MVP 2018/07/10 | Source: SQLServerCentral.com | Category: user database
Rating: |  Discuss |   Briefcase | 314 reads

Transactional Logs Restore

Testing Transaction Logs restore 
By Harsha Bhagat 2018/07/09 | Source: SQLServerCentral.com | Category: restore
Rating: (not yet rated) |  Discuss |   Briefcase | 242 reads

Create Database using dynamic SQL

The T-SQL script created a databases using the default file locations from SQL server configuration and prints them in the end.  Read more...
By Shridhar 2018/07/05 | Source: SQLServerCentral.com
Rating: |  Discuss |   Briefcase | 329 reads
<< Newer    Items 21 to 40 of 3547    Older >>