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 41 to 60 of 3505    Older >>
 

SQL Server All View Refresh

SQL Server All View Refresh Scripts  Read more...
By Yusuf Kahveci 2018/06/05 | Source: SQLServerCentral.com | Category: performance
Rating: |  Discuss |   Briefcase | 1,863 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,521 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 | 332 reads

Index Utilization Summary Report Script

Index Report Scripts ...  Read more...
By Yusuf Kahveci 2018/06/15 | Source: SQLServerCentral.com | Category: indexing
Rating: |  Discuss |   Briefcase | 1,443 reads

Database-based Transaction Counting Find Script

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

SQL Server WaitStats Script

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

Statistics not updated for the last 30 days

Find out-of-date statistics for 30 days  Read more...
By Yusuf Kahveci 2018/06/11 | Source: SQLServerCentral.com | Category: statistics
Rating: |  Discuss |   Briefcase | 2,081 reads

SQL Server Long Query Script

SQL Server Long Query Find Script   Read more...
By Yusuf Kahveci 2018/05/30 | Source: SQLServerCentral.com | Category: performance
Rating: |  Discuss |   Briefcase | 1,907 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 | 772 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 | 348 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 | 168 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 | 352 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 | 514 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 | 300 reads

Reporting by date - DateTrunc

A function to truncate datetimes to month, quarter, hour etc and their multiples for convenient grouping  Read more...
By Mike Tanner 2017/11/21 | Source: SQLServerCentral.com | Category: date manipulation
Rating: |  Discuss |   Briefcase | 332 reads

Read Only access to all databases to a user in a SQL Server Instance

Script to grant a SQL a user read-only access to all the databases in Server instance except the system databases and -- the Log shipped databases(if any : secondary :read-only)   Read more...
By Gaurav Deep Juneja 2017/11/22 | Source: SQLServerCentral.com | Category: security
Rating: |  Discuss |   Briefcase | 319 reads

Delete Change Tracking table data sys.syscommittab

With high transactions table the sys.syscommittab table does not gets deleted properly. Millions of backdated row remains. To delete the sys.syscommittab table below is the script.   Read more...
Rating: (not yet rated) |  Discuss |   Briefcase | 201 reads

Logshipping Report

Get Logshipping report only when secondary is more than certain time behind Primary.  Read more...
By Harikumar Mindi 2017/11/14 | Source: SQLServerCentral.com | Category: log shipping
Rating: |  Discuss |   Briefcase | 241 reads

Script to send database consistancy errors

This script will run consistency check on database and send an email notification if it found any consistency errors.  Read more...
By Nisarg Upadhyay 2017/11/03 | Source: SQLServerCentral.com | Category: corruption
Rating: |  Discuss |   Briefcase | 424 reads

SQL Server procedure to script tables

SQL Server procedure to script all tables in a given database to one or individual files on a given path.  Read more...
By Gerrit Mantel 2017/10/09 | Source: SQLServerCentral.com | Category: create table
Rating: (not yet rated) |  Discuss |   Briefcase | 598 reads
<< Newer    Items 41 to 60 of 3505    Older >>