Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
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 2998    Older >>
 

Find SQL Server Install Date

This is handy script which could be used to find the SQL Instance install date.   Read more...
By Patrick Akhamie 2014/07/10 | Source: SQLServerCentral.com | Category: documentation
Rating: |  Discuss |   Briefcase | 903 reads

Fix orphaned users after restoring database to another server

Find and fix orphan users after doing a database restore. It uses cursors but they are pretty minimally intrusive.  Read more...
By Patrick Akhamie 2014/07/17 | Source: SQLServerCentral.com | Category: orphan users
Rating: |  Discuss |   Briefcase | 1,206 reads

Replication Monitor Script

The script shows great detail about the topoogy of replication as well as the status and undistributed commands as well as other neat details about the architecture of the replication including all publications and subscriptions.  Read more...
By Patrick Akhamie 2014/07/03 | Source: SQLServerCentral.com | Category: replication
Rating: (not yet rated) |  Discuss |   Briefcase | 700 reads

List all the fields of a table with its properties + PK

This script returns a list of all the fields of a table with it properties, primary keys and user defined types.  Read more...
By Joan Magnet 2014/05/23 | Source: SQLServerCentral.com | Category: table fields definition
Rating: |  Discuss |   Briefcase | 1,159 reads

script to find mirrored databases on principal or mirrored instance

The script helps you find out what databases are mirrored, their state, the partner instance and the enpoint port. Part two shows the endpoint details.  Read more...
By Patrick Akhamie 2014/05/22 | Source: SQLServerCentral.com | Category: monitor mirroring
Rating: (not yet rated) |  Discuss |   Briefcase | 437 reads

Collecting SQL Server 2000/2005/2008 baseline

Script to get Server Info Collecting SQL Server 2000/2005/2008 baseline inventory  Read more...
Rating: |  Discuss |   Briefcase | 1,297 reads

SQL Battleship

It's you versus the computer in the classic game of Battleship, completely playable from the SQL Server Management Studio interface!  Read more...
By Sean Smith 2014/05/26 | Source: SQLServerCentral.com | Category: ai
Rating: |  Discuss |   Briefcase | 1,643 reads

Hassle free parameters in dynamic sql.

An alternative solution to passing parameters to sp_executesql.  Read more...
Rating: |  Discuss |   Briefcase | 1,415 reads

Compare two tables for structure and layout

Compare the structure/layout of two tables within an instance of SQL Server (version 2012) and return non-matches.  Read more...
By Trevor Makoni 2014/05/16 | Source: SQLServerCentral.com | Category: compare
Rating: |  Discuss |   Briefcase | 1,472 reads

buffer_memory_mgt

If you ever need to find out what database is using up the most buffer pool resource, this will help. You will also get the object in the buffer for the specific database that is using up the most buffer resource. It will help when troubleshooting buffer related issues.  Read more...
By Patrick Akhamie 2014/05/14 | Source: SQLServerCentral.com | Category: buffer mgt
Rating: |  Discuss |   Briefcase | 729 reads

Find Average Page Life Expectancy

I have a brief note in the query header itself  Read more...
By Patrick Akhamie 2014/05/13 | Source: SQLServerCentral.com | Category: ple
Rating: |  Discuss |   Briefcase | 737 reads

Create notifications for failed jobs with one easy script

Here an easy way to setup alerts for all sql agent jobs. Typically I use this to send an email alert when a job fails. I always setup a group email address rather than individuals to make this a one-time setup.  Read more...
By Patrick Akhamie 2014/05/12 | Source: SQLServerCentral.com | Category: sql agent
Rating: |  Discuss |   Briefcase | 1,403 reads

Get database size, used space, free space

Gets the size, amount of space used & unused, owner and modify date for all databases in a Sql instance.  Read more...
By Trevor Makoni 2014/05/09 | Source: SQLServerCentral.com | Category: file size
Rating: |  Discuss |   Briefcase | 1,277 reads

vlfs_Count_for_Each_Database

Here is a short code to count the VLFs in the transaction log for each database in the instance.  Read more...
By Patrick Akhamie 2014/05/06 | Source: SQLServerCentral.com | Category: transaction_log
Rating: |  Discuss |   Briefcase | 930 reads

Find database where table is located

Return a list of databases which contain a table from wildcard table name.  Read more...
By Trevor Makoni 2014/05/05 | Source: SQLServerCentral.com | Category: find
Rating: |  Discuss |   Briefcase | 943 reads

Size of database files for an instance of SQL Server

Size of database files for an instance of SQL Server  Read more...
By Andrés Michaca 2014/05/07 | Source: SQLServerCentral.com | Category: file size
Rating: |  Discuss |   Briefcase | 939 reads

Generated script to update statistics

Generated script to update statistics  Read more...
By Andrés Michaca 2014/05/02 | Source: SQLServerCentral.com | Category: statistics
Rating: |  Discuss |   Briefcase | 1,223 reads

Reorganize indexes

Generate script to reorganize indexes in a database  Read more...
By Andrés Michaca 2014/05/01 | Source: SQLServerCentral.com | Category: indexing
Rating: |  Discuss |   Briefcase | 1,059 reads

Exporting data with header using Powershell

Extracting data with header information using PowerShell  Read more...
By Louis Li 2014/04/28 | Source: SQLServerCentral.com | Category: powershell
Rating: (not yet rated) |  Discuss |   Briefcase | 1,064 reads

Format decimal value to fraction using a tally table.

We use a tally table to find the appropriate denominator for a given decimal part of a number.   Read more...
By Adrian Facio 2014/04/29 | Source: SQLServerCentral.com | Category: format
Rating: |  Discuss |   Briefcase | 859 reads
<< Newer    Items 41 to 60 of 2998    Older >>