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     Search     T-SQL    
Backup / Restore     Maintenance     SQL Server 2005     T-SQL Aids    
Data Warehousing     Maintenance and Management     SQL Server 7, 2000     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 | 11,641 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 | 5,833 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 | 12,418 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 | 7,554 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. Updated 05 Sep 2009.  Read more...
By Ola Hallengren 0001/01/01 | Source: SQLServerCentral.com | Category: Backup / Restore
Rating: |  Discuss |  Briefcase | 22,098 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 | 4,288 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 | 4,043 reads

Execute T-SQL Scripts in Parallel

Transact-SQL does not have a simple method to launch multiple parallel running scripts. This tool will change the game. It requires SQL Server 2005 or above.  Read more...
By James Ma 2009/08/31 | Source: SQLServerCentral.com | Category: T-SQL
Rating: |  Discuss |  Briefcase | 1,948 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 | 10,648 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 | 3,727 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 | 2,363 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 0001/01/01 | Source: SQLServerCentral.com | Category: T-SQL
Rating: |  Discuss |  Briefcase | 2,324 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: Data Warehousing
Rating: |  Discuss |  Briefcase | 5,640 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 | 12,713 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 | 3,470 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 | 10,952 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 | 6,749 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 | 16,525 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 | 9,984 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,996 reads