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

SQL Server All Indexes Script

What are the indexes and types found in our tables?  Read more...
By Yusuf Kahveci 2018/01/13 | Source: SQLServerCentral.com | Category: indexing
Rating: |  Discuss |   Briefcase | 1,757 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/12 | Source: SQLServerCentral.com | Category: database maintenance
Rating: (not yet rated) |  Discuss |   Briefcase | 13 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/11 | Source: SQLServerCentral.com | Category: powershell
Rating: (not yet rated) |  Discuss |   Briefcase | 8 reads

SQL Server Unused Index Script

SQL Server Unused Index Find Script  Read more...
By Yusuf Kahveci 2018/01/11 | Source: SQLServerCentral.com | Category: performance
Rating: |  Discuss |   Briefcase | 648 reads

SQL Server All View Refresh

SQL Server All View Refresh Scripts  Read more...
By Yusuf Kahveci 2018/01/11 | Source: SQLServerCentral.com | Category: performance
Rating: |  Discuss |   Briefcase | 1,510 reads

SQL Server Missing Index

SQL Server Missing Index Detail Script  Read more...
By Yusuf Kahveci 2018/01/10 | Source: SQLServerCentral.com | Category: performance
Rating: |  Discuss |   Briefcase | 2,172 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 | 237 reads

Index Utilization Summary Report Script

Index Report Scripts ...  Read more...
By Yusuf Kahveci 2018/01/11 | Source: SQLServerCentral.com | Category: index
Rating: |  Discuss |   Briefcase | 1,192 reads

Database-based Transaction Counting Find Script

Database-based Transaction Counting Find Script  Read more...
By Yusuf Kahveci 2018/01/15 | Source: SQLServerCentral.com | Category: monitoring
Rating: |  Discuss |   Briefcase | 2,187 reads

SQL Server WaitStats Script

WaitStats Find Script...  Read more...
By Yusuf Kahveci 2018/01/03 | Source: SQLServerCentral.com | Category: performance
Rating: |  Discuss |   Briefcase | 1,159 reads

SQL Server Last 30 days Not updated Statistics Stat

Find out-of-date statistics for 30 days  Read more...
By Yusuf Kahveci 2018/01/03 | Source: SQLServerCentral.com | Category: statistics
Rating: |  Discuss |   Briefcase | 1,906 reads

SQL Server Long Query Script

SQL Server Long Query Find Script   Read more...
By Yusuf Kahveci 2018/01/03 | Source: SQLServerCentral.com | Category: performance
Rating: |  Discuss |   Briefcase | 1,590 reads

SQL Server High CPU Find Query

SQL Server High CPU TOP 200 Query  Read more...
By Yusuf Kahveci 2018/01/05 | Source: SQLServerCentral.com | Category: performance
Rating: |  Discuss |   Briefcase | 1,495 reads

Find Most Expensive View (By Execution Count)

SQL Server View Execute Count Script ..  Read more...
By Yusuf Kahveci 2018/01/09 | Source: SQLServerCentral.com | Category: performance
Rating: |  Discuss |   Briefcase | 1,247 reads

String Search

Here's a script I wrote to perform a smart "String" search against a database. 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/01/08 | Source: SQLServerCentral.com | Category: string match
Rating: |  Discuss |   Briefcase | 301 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 | 245 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 | 126 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 | 262 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 | 323 reads

Trigger Based Change Data capture

This script capture INSERTs / UPDATEs / DELETEs on SQL Server table and logs to single table in JSON Format.  Read more...
By Ankush Parab 2017/12/22 | Source: SQLServerCentral.com | Category: cdc
Rating: |  Discuss |   Briefcase | 241 reads
   Items 1 to 20 of 3474    Older >>