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

Logins for Windows Groups

Returns all user logins for Windows groups registered on the instance.   Read more...
By Patrick Slesicki 2018/02/26 | Source: SQLServerCentral.com | Category: login
Rating: |  Discuss |   Briefcase | 305 reads

ReplicationDeltaSelect

To find record differences between publisher and subscriber tables by comparing primary keys.  Read more...
By Patrick Slesicki 2018/02/16 | Source: SQLServerCentral.com | Category: replication
Rating: (not yet rated) |  Discuss |   Briefcase | 185 reads

HTML Table Results For Email

HTML Table formatted results of a view or table for emailing  Read more...
By Michael Higgins 2018/02/19 | Source: SQLServerCentral.com | Category: html
Rating: (not yet rated) |  Discuss |   Briefcase | 504 reads

All Link servers working status check and failure alert over E-mail

This procedure will help you to automation of link server failure status check with help of SQL agent job scheduling. Job query :- exec proc_check_linked_servers 'profiler name','E-mail ID'  Read more...
By Subhash Chandra 2018/02/07 | Source: SQLServerCentral.com
Rating: |  Discuss |   Briefcase | 248 reads

Remove Database Encryption Key on all user databases

Below script will remove database encryption key, database certificate and master key on all the user databases. For tempdb database, you need to restart the SQL Server Instance to complete the process. Note: It is advisable to take transaction log backup before this activity is performed.  Read more...
Rating: |  Discuss |   Briefcase | 161 reads

Recent database restores

The scrip returns history of database restores from MSDB  Read more...
By Evgeny Garaev 2018/02/12 | Source: SQLServerCentral.com | Category: database restore
Rating: (not yet rated) |  Discuss |   Briefcase | 176 reads

Run SQL/T-SQL scripts on folder

What to do when you have several sql scripts to run in your DB? Put all in a folder and use this...  Read more...
By Daniel Marques 2018/02/09 | Source: SQLServerCentral.com | Category: scripts
Rating: |  Discuss |   Briefcase | 876 reads

Compare MS SQL Agent jobs on two servers

During a database migration or a side by side database upgrade project we need to migrate the MS SQL Server Agent jobs. This script compare jobs by names and shows unmatched jobs.  Read more...
By Evgeny Garaev 2018/01/25 | Source: SQLServerCentral.com | Category: ms sql server agent
Rating: |  Discuss |   Briefcase | 234 reads

How to read an audit file

The script reads data from audit files for a particular audit  Read more...
By Evgeny Garaev 2018/01/26 | Source: SQLServerCentral.com | Category: sql server audit
Rating: |  Discuss |   Briefcase | 294 reads

A Data Dictionary Select

Query for data dictionary using internals. Various constraint definitions included.  Read more...
By Patrick Slesicki 2018/03/14 | Source: SQLServerCentral.com | Category: data dictionary
Rating: |  Discuss |   Briefcase | 689 reads

Compression estimates

The script estimate compression benefits per each object in the database for which the page compression has not been implemented.  Read more...
By Evgeny Garaev 2018/02/15 | Source: SQLServerCentral.com | Category: compression
Rating: |  Discuss |   Briefcase | 222 reads

Database maintenance progress

Often we need to know on which stage is a maintenance operation such as: backup, restore, check database. You can get this information using my script.  Read more...
By Evgeny Garaev 2018/01/17 | Source: SQLServerCentral.com | Category: database maintenance
Rating: |  Discuss |   Briefcase | 341 reads

Insert data into a SQL Server Table using Powershell using Invoke-SQLc

How to insert data into a SQL Server Table using Powershell using Invoke-SQLcmd Commandlet  Read more...
By Vishnu Gupthan 2018/01/24 | Source: SQLServerCentral.com | Category: powershell
Rating: (not yet rated) |  Discuss |   Briefcase | 289 reads

SQL Server Missing Index

SQL Server Missing Index Detail Script  Read more...
By Yusuf Kahveci 2018/02/28 | Source: SQLServerCentral.com | Category: performance
Rating: |  Discuss |   Briefcase | 2,500 reads

Get Index Scan Count

Script to get the index scan count and Average Fragmentation(since last restart)  Read more...
By Mohammed Arshad 2018/01/10 | Source: SQLServerCentral.com | Category: indices
Rating: |  Discuss |   Briefcase | 316 reads

String Search

This script performs a smart search against all fields of a database for a given "String." The TSQL checks all columns in all tables for data type appropriateness before performing the search. Works with numeric as well as character data types.  Read more...
By Patrick Slesicki 2018/02/13 | Source: SQLServerCentral.com | Category: string match
Rating: |  Discuss |   Briefcase | 753 reads

Shrink all user database files

Shrink all user database files  Read more...
By Khaled Dev 2017/12/29 | Source: SQLServerCentral.com | Category: sql
Rating: |  Discuss |   Briefcase | 334 reads

Simplified maintenance of columnstore indexes

This USP runs a maintenance (REORGANIZE or REBUILD) on columnstore Indexes for a givven table, a schema or a database.  Read more...
By Alexander Parakhnevich 2017/12/27 | Source: SQLServerCentral.com | Category: columnstore
Rating: |  Discuss |   Briefcase | 161 reads

Difference between dates displayed in days, hours, minutes and seconds

Show the difference between two dates (from, to) in format #d HH: MM: SS  Read more...
Rating: |  Discuss |   Briefcase | 342 reads

Powershell Script for regular DBA activities_GenerateScripts

Powershell utility for generating scripts for db tables with / without identity columns.It can also produce scripts for fixed number of rows  Read more...
By Mayank Shukla 2018/01/02 | Source: SQLServerCentral.com | Category: powershell
Rating: |  Discuss |   Briefcase | 487 reads
<< Newer    Items 21 to 40 of 3492    Older >>