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 61 to 80 of 3481    Older >>

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 | 514 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 | 716 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 | 634 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 | 418 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 | 283 reads

Table Valued Function to return a range of prime numbers

A fast table valued function to generate a list of prime numbers within the range specified by the parameters.  Read more...
By Jonathan Roberts 2017/04/12 | Source: SQLServerCentral.com | Category: tally table
Rating: |  Discuss |   Briefcase | 320 reads

Remove SQL Comments

This function takes in SQL code and returns the same SQL code but with any comments removed (i.e. "/**/", "--")  Read more...
By Jordan Ryder 2017/04/13 | Source: SQLServerCentral.com | Category: sql
Rating: |  Discuss |   Briefcase | 577 reads

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 | 557 reads

Rename Database

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

Generate scripts for SQL Server Management Studio diagrams

The procedure generates an import script of diagrams. 
By Jonas Gunnarsson 2017/11/02 | Source: SQLServerCentral.com | Category: diagram
Rating: (not yet rated) |  Discuss |   Briefcase | 1,075 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 | 543 reads

Fix Orphan Users for All databases

Fix orphan database users on all user databases. 
Rating: |  Discuss |   Briefcase | 804 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 | 162 reads

Find UDF useage

Find all stored procedures that use UDFs 
By Jim Youmans 2017/03/21 | Source: SQLServerCentral.com | Category: sql
Rating: |  Discuss |   Briefcase | 359 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 | 421 reads

SQL Login Password Audit

Audit you SQL Logins  
By Jim Youmans 2017/03/07 | Source: SQLServerCentral.com | Category: sql
Rating: |  Discuss |   Briefcase | 784 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 | 639 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 | 414 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,216 reads
<< Newer    Items 61 to 80 of 3481    Older >>