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 3006    Older >>
 

Query to find all sessions in each group

The Query will return results for all sessions in each resource governor group  Read more...
By Patrick Akhamie 2014/07/01 | Source: SQLServerCentral.com | Category: resource governor
Rating: |  Discuss |   Briefcase | 808 reads

Query to find all requests in each group

The query will return all requests in each resource governor group  Read more...
By Patrick Akhamie 2014/04/30 | Source: SQLServerCentral.com | Category: resource governor
Rating: (not yet rated) |  Discuss |   Briefcase | 71 reads

Email the Auto-growth events that have occurred in the last 24 hours t

-- This script will email DBA if a auto-grow event occurred in the last day -- Written by: Patrick Akhamie -- Date: 10/06/2011  Read more...
By Patrick Akhamie 2014/07/15 | Source: SQLServerCentral.com | Category: autogrowth
Rating: |  Discuss |   Briefcase | 975 reads

Script to Get Total of database sizes in MB nd GB

Displays the log size and db size for all databases on an instance. Good for a CMS too.  Read more...
By Patrick Akhamie 2014/04/30 | Source: SQLServerCentral.com | Category: db size
Rating: (not yet rated) |  Discuss |   Briefcase | 452 reads

Check SQL Server Services Status and send email

--The script can be used in a job or run ad-hoc to inform the dba group of the status of sql services on your servers.  Read more...
By Patrick Akhamie 2014/04/30 | Source: SQLServerCentral.com | Category: sql services
Rating: (not yet rated) |  Discuss |   Briefcase | 267 reads

Get SQL Cluster Information (T-SQL)

Get info about clusters to include active and passive nodes as well as disk members for SQL 2005/2008/2008R2  Read more...
By Patrick Akhamie 2014/04/30 | Source: SQLServerCentral.com | Category: sql cluster
Rating: |  Discuss |   Briefcase | 246 reads

Enable and configure DB mail using T-SQL

Use this to enable and setup database mail in sql server 2005/2008  Read more...
By Patrick Akhamie 2014/06/24 | Source: SQLServerCentral.com | Category: dbmail
Rating: |  Discuss |   Briefcase | 1,015 reads

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 | 624 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 | 944 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,345 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 | 725 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,177 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 | 444 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,317 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,676 reads

Hassle free parameters in dynamic sql.

An alternative solution to passing parameters to sp_executesql.  Read more...
Rating: |  Discuss |   Briefcase | 1,438 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,494 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 | 736 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 | 743 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,423 reads
<< Newer    Items 41 to 60 of 3006    Older >>