SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
Search:  
 
 

Choose a tag below, or browse popular content:

Administration     Lock and Connection Management     Security     T-SQL    
Backup / Restore     Maintenance     SQL Server 2000     T-SQL Aids    
Data Warehouse     Maintenance and Management     SQL Server 2005     Utility    
Index Management     Miscellaneous     SQLInsider Scripts    

Add a script

Popular Scripts

Script all data of a table

A very fast way to script all data of a table  Read more...
By Florian Reischl 2009/03/27 | Source: SQLServerCentral.com | Category: Script Data
Rating: |  Discuss |  Briefcase | 5,692 reads

Who has accessed my 2005 server?

Find out who has been on my server using the Default trace  Read more...
By Jack Corbett 0001/01/01 | Source: SQLServerCentral.com | Category: Auditing
Rating: |  Discuss |  Briefcase | 9,376 reads

My favorite way to access Excel files

Using opendatasource to retrieve data from Excel files as if querying a table.  Read more...
By Gaby Abed 2009/02/04 | Source: SQLServerCentral.com | Category: BCP
Rating: |  Discuss |  Briefcase | 5,113 reads

SQL Server 2005 & 2008 - Backup, Integrity Check & Index Optimization

Solution for Backup, Integrity Check and Index Optimization in SQL Server 2005 and SQL Server 2008.  Read more...
By Ola Hallengren 0001/01/01 | Source: SQLServerCentral.com | Category: Backup / Restore
Rating: |  Discuss |  Briefcase | 17,241 reads

Date and Time dimension creation and population T-SQL

Dim_Date and Dim_Time. Date and Time dimensions. Creation, population with holidays, indexing and use script.  Read more...
By Joshua A. Walker 2009/02/13 | Source: SQLServerCentral.com | Category: T-SQL
Rating: |  Discuss |  Briefcase | 3,846 reads

Table Information View -- No Cursors!

Row counts and storage space information for all tables in the database. (SQL Server 2005)  Read more...
By RBarry Young 0001/01/01 | Source: SQLServerCentral.com | Category: tables
Rating: |  Discuss |  Briefcase | 11,342 reads

Comparing Stored Procedures, Part 1

Provides quantifiable comparison of two stored procedures  Read more...
By Jesse McLain 2009/02/23 | Source: SQLServerCentral.com | Category: T-SQL
Rating: |  Discuss |  Briefcase | 2,760 reads

List all permission in all databases

This script will allow you get all the users and roles with permission on objects on all databases.  Read more...
By Alejandro Pelc 2009/04/16 | Source: SQLServerCentral.com | Category: Security
Rating: |  Discuss |  Briefcase | 2,593 reads

The Ultimate Missing Index Finder

Reports stats on what the query optimizer records in the DMVs as missing indexes and what it says the cost savings will be if they were present. Can limit by table / schema name patterns.  Read more...
By Jesse Roberge 2008/10/06 | Source: SQLServerCentral.com | Category: Index Management
Rating: |  Discuss |  Briefcase | 7,993 reads

Get record count for a specific database

This will sum all of the records of a specified database, excluding the 'sysdiagrams' table.  Read more...
By James Rea 0001/01/01 | Source: SQLServerCentral.com | Category: Administration
Rating: |  Discuss |  Briefcase | 15,488 reads

SQL 2005 Rebuild\Reorganize Indexes with Reports

This custom sp rebuilds \ reorganizes indexes for SQL 2005 databases and logs results for further analysis.  Read more...
By Farhan Sabzaali 2009/03/16 | Source: SQLServerCentral.com | Category: Rebuild Index
Rating: |  Discuss |  Briefcase | 2,038 reads

Performance Testing Script

Fourth in a series of scripts demonstrating a quantitative comparison between the text of two stored procedures  Read more...
By Jesse McLain 2009/03/26 | Source: SQLServerCentral.com | Category: T-SQL
Rating: |  Discuss |  Briefcase | 1,950 reads

Find Text in all columns of all tables in a Database

Will find the Table Name, Column Name and the number of occurances some text appears in a database.  Read more...
By Joshua A. Walker 2009/02/24 | Source: SQLServerCentral.com | Category: Miscellaneous
Rating: |  Discuss |  Briefcase | 2,147 reads

Shrink DB and Log

Used this and shrunk a 176GB in under 20 secs to 105 MB  Read more...
By Jack Blade 2008/09/22 | Source: SQLServerCentral.com
Rating: |  Discuss |  Briefcase | 8,396 reads

An easy way to track the growth of your database

This query gives you an idea of the growth of your database over time.  Read more...
By Sylvia Moestl Vasilik 2008/05/07 | Source: SQLServerCentral.com | Category: Backup
Rating: |  Discuss |  Briefcase | 8,141 reads

Permission scripting over all databases

Scripts permissions/roles for db user across all databases.  Read more...
By W Louw | Source: SQLServerCentral.com | Category: Permissions
Rating: |  Discuss |  Briefcase | 5,130 reads

Insert Update Stored Procedure for a table

Generic Script for Insert Update Stored Procedures  Read more...
By Prasad Bhogadi 0001/01/01 | Source: SQLServerCentral.com | Category: T-SQL
Rating: |  Discuss |  Briefcase | 21,442 reads

Index Fragmentation for All Databases

Returns Top 25 fragmented indexes complete with full object name and index name.  Read more...
By Jon Morisi 2009/06/16 | Source: SQLServerCentral.com
Rating: |  Discuss |  Briefcase | 1,110 reads

Calculate Distance in Miles from Latitude and Longitude

A fast and accurate way to calculate the distance in miles between two points, based on the latitudes and longitudes.  Read more...
By RBarry Young 2009/02/17 | Source: SQLServerCentral.com | Category: T-SQL
Rating: |  Discuss |  Briefcase | 2,007 reads

The Ultimate Running Requests Reporter

Reports all running requests along with the request's identifying information (SPID, login etc), current resource consumption, query batch text, statement text, and XML query plan.  Read more...
By Jesse Roberge 2009/05/28 | Source: SQLServerCentral.com | Category: T-SQL
Rating: |  Discuss |  Briefcase | 882 reads