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 61 to 80 of 3019    Older >>
 

Script to Detach All User Databases

The script will automatically detach all databases. Please run sp_helpdb to find out the location of all data and log files before using the script.  Read more...
By Patrick Akhamie 2014/06/26 | Source: SQLServerCentral.com | Category: detach database
Rating: (not yet rated) |  Discuss |   Briefcase | 655 reads

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 | 1,018 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,454 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: |  Discuss |   Briefcase | 779 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,220 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 | 457 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,373 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,785 reads

Hassle free parameters in dynamic sql.

An alternative solution to passing parameters to sp_executesql.  Read more...
Rating: |  Discuss |   Briefcase | 1,467 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,548 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 | 750 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 | 771 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,466 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,344 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 logs
Rating: |  Discuss |   Briefcase | 960 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 | 983 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 | 979 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,279 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,108 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,099 reads
<< Newer    Items 61 to 80 of 3019    Older >>