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

Truncate a table that has foreign keys referencing its columns

This stored procedure will truncate a table even when other tables have FKs referencing columns in it. It drops the Fks, truncates the table, re-creates the FKs  Read more...
By Jonathan Roberts 2017/04/14 | Source: SQLServerCentral.com | Category: truncate table
Rating: |  Discuss |   Briefcase | 457 reads

Rename Database

Programmatically rename a database.  Read more...
By Darren Thompson 2017/04/17 | Source: SQLServerCentral.com | Category: renaming
Rating: |  Discuss |   Briefcase | 299 reads

Generate scripts for SQL Server Management Studio diagrams

The procedure generates an import script of diagrams.  Read more...
By Jonas Gunnarsson 2017/04/03 | Source: SQLServerCentral.com | Category: diagram
Rating: (not yet rated) |  Discuss |   Briefcase | 568 reads

Stored Proc Archives rows to another table

This will Archive and Purge rows from one table to another.  Read more...
By Farrell Thomas 2017/03/27 | Source: SQLServerCentral.com | Category: archive
Rating: |  Discuss |   Briefcase | 454 reads

Fix Orphan Users for All databases

Fix orphan database users on all user databases.  Read more...
Rating: |  Discuss |   Briefcase | 533 reads

Connect to MongoDB on Remote Linux Server with Powershell

Return values from MongoDB on Linux server with Powershell  Read more...
By Michael D'Spain 2017/03/20 | Source: SQLServerCentral.com | Category: mongodb
Rating: |  Discuss |   Briefcase | 134 reads

Find UDF useage

Find all stored procedures that use UDFs  Read more...
By Jim Youmans 2017/03/21 | Source: SQLServerCentral.com | Category: sql
Rating: |  Discuss |   Briefcase | 322 reads

Find all published tables with row counts and table size

This script will show you all the tables that are being published with sizes.  Read more...
By Jim Youmans 2017/03/16 | Source: SQLServerCentral.com | Category: replication
Rating: |  Discuss |   Briefcase | 363 reads

SQL Login Password Audit

Audit you SQL Logins   Read more...
By Jim Youmans 2017/03/07 | Source: SQLServerCentral.com | Category: sql
Rating: |  Discuss |   Briefcase | 603 reads

Missing index with change impact percentage

This script will list all missing indexes with create statements.  Read more...
By Arun Kumar 2017/03/01 | Source: SQLServerCentral.com | Category: indexing
Rating: |  Discuss |   Briefcase | 541 reads

Corrupt Page Notification

This trigger will send mail notification once a row is written in the suspect pages table  Read more...
By Henrico Bekker 2017/03/03 | Source: SQLServerCentral.com | Category: corruption
Rating: (not yet rated) |  Discuss |   Briefcase | 353 reads

Building calendar table using MTVF

This script is a small extension to this excellent article http://www.sqlservercentral.com/articles/calendar/145206/   Read more...
By Darko Martinovic 2017/03/28 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,024 reads

Getting resource content from blocked process report

This script serves to display the content of the waiting resource. It is divided in two parts. In first one I'm using t-sql, and in second one I accomplished the same task using SQLCRL.   Read more...
By Darko Martinovic 2017/02/27 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 353 reads

Getting resource name from blocked process report

The Resource name is most important information in the blocked process report. The purpose of this script is to decode this information. The script is divided in two parts. In first one I'm using t-sql, and in second one I accomplished the same task using SQLCLR.   Read more...
By Darko Martinovic 2017/04/21 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 679 reads

Tally Generator

Inline function generating the set of numbers based on submitted parameters.   Read more...
By Sergiy Floka 2017/03/08 | Source: SQLServerCentral.com | Category: tally
Rating: |  Discuss |   Briefcase | 988 reads

Check if xp_cmdshell is turned on and flip the bit

The code works well for an automation process that needs to have xp_cmdhsell turned on.  Read more...
By Edward Pochinski 2017/02/22 | Source: SQLServerCentral.com | Category: xp_cmdshell
Rating: (not yet rated) |  Discuss |   Briefcase | 272 reads

AdventureWorks2016CTP3 - JSON Sample scripts

Geting the JSON Sample Scripts to run   Read more...
By Mick Rust 2017/01/31 | Source: SQLServerCentral.com | Category: adventureworks2016ctp3
Rating: |  Discuss |   Briefcase | 287 reads

Find Text in All Databases

Search all databases for a particular string.  Read more...
By Jason Givens 2017/01/30 | Source: SQLServerCentral.com | Category: sp_msforeachdb
Rating: |  Discuss |   Briefcase | 597 reads

Powershell Script to find a SQL\Windows login in SQL Server

This script will help you to find out whether a particular id (SQL or Windows ID) is present in the SQL Server  Read more...
By Vishnu Gupthan 2017/01/26 | Source: SQLServerCentral.com | Category: sql server
Rating: |  Discuss |   Briefcase | 411 reads

Generic, parameterised, create DB script

A script to be used as part of development deployments where new databases are required, so as to provide standardisation.  Read more...
Rating: (not yet rated) |  Discuss |   Briefcase | 343 reads
<< Newer    Items 21 to 40 of 3434    Older >>