Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favourite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved in your SSC briefcase from the favorites tab.
Download now (direct download link)

Add a script

<< Newer    Items 81 to 100 of 2944    Older >>
 

SQL Data File Information

This script displays all data files within a SQL Server database with the following relevant properties: FileName, FileLocation, FileSizeMB, SpaceUsedMB, AvailableSpaceMB, %FreeSpace, FileGrowthMB and FileGroupName  Read more...
By Avinash Bookwala 2013/11/11 | Source: SQLServerCentral.com | Category: file size
Rating: |  Discuss |   Briefcase | 1,305 reads

Right or Wrong, Dynamic SQL AND a Cursor

I'm no big fan of dynamic SQL or cursors, however there are times where they do the job.   Read more...
By Kurt Zimmerman 2013/11/08 | Category: transaction logs
Rating: |  Discuss |   Briefcase | 1,611 reads

Capture_Login_Auths

This procedure takes a login name and will generate the access and authorities for the login across the SQL instance.  Read more...
By Donald Patterson 2013/11/06 | Source: SQLServerCentral.com | Category: logins
Rating: |  Discuss |   Briefcase | 1,132 reads

Security Queries: Database-level

A set of queries which attempt to gather as much security-related information on a single database as possible.  Read more...
By Greg Drake 2013/11/04 | Source: SQLServerCentral.com | Category: secure
Rating: |  Discuss |   Briefcase | 1,606 reads

Security Queries: Server-level

A set of queries which attempt to gather as much security-related information on a server instance as possible.  Read more...
By Greg Drake 2013/11/05 | Source: SQLServerCentral.com | Category: secure
Rating: |  Discuss |   Briefcase | 1,101 reads

Convert int to Excel column name

This script converts a numeric column index to an Excel column name (ex: AC)  Read more...
By Peter Diplaros 2013/11/07 | Source: SQLServerCentral.com | Category: excel
Rating: (not yet rated) |  Discuss |   Briefcase | 1,167 reads

SQL Powershell Script To Check the Memory Utilization

SQL Powershell Script to check the Memory Utilization  Read more...
Rating: (not yet rated) |  Discuss |   Briefcase | 1,510 reads

PivotByDate clr stored procedure

This script pivots 1 to N numeric columns, grouping by 1 to N (N)(Var)char columns, pivoting by distinct date.  Read more...
By Louis Nardozi 2013/10/30 | Source: SQLServerCentral.com | Category: pivot
Rating: (not yet rated) |  Discuss |   Briefcase | 921 reads

SQL Powershell Script to get the Database Details remotely

SQL Powershell Script to get the Database Details remotely  Read more...
Rating: |  Discuss |   Briefcase | 1,393 reads

SQL Powershell Script to get the list of Server's Local Admins

SQL Powershell Script to get the list of Server's Local Admins from remote  Read more...
Rating: |  Discuss |   Briefcase | 1,064 reads

Unique Identifier as Clustered index

This script selects clustered indexes containing only a uniqueidentifier column  Read more...
By Wilfred van Dijk 2013/10/17 | Source: SQLServerCentral.com | Category: index
Rating: |  Discuss |   Briefcase | 1,083 reads

Function to format a datetime variable by a mask

I have used the following function to convert dates according to desired textual formats that were not immediately available in the standard styles on offer.  Read more...
By Colin Frame 2013/10/18 | Source: SQLServerCentral.com | Category: datetime
Rating: |  Discuss |   Briefcase | 1,499 reads

List long running SQL Agent Jobs

List long running SQL Agent jobs and email out as HTML.  Read more...
By Neil Bryan 2013/10/07 | Source: SQLServerCentral.com | Category: sql agent
Rating: |  Discuss |   Briefcase | 1,429 reads

SQL Server Agent Jobs Statistics

This script will give you a thorough report about sql server jobs based on historical data.   Read more...
By Aakash Patel 2013/10/11 | Source: SQLServerCentral.com | Category: agent jobs
Rating: |  Discuss |   Briefcase | 1,389 reads

copy/paste multiple columns

The output of this little script enables you to easily copy/paste multiple columns from an object in your SQL statement. Also works on temp tables. Tip, put the procedure under a shortcut. Select the table, hit the shortcut and you can copy/paste the columns you want from the result screen.  Read more...
By Robin van Schaik 2013/10/10 | Source: SQLServerCentral.com
Rating: |  Discuss |   Briefcase | 1,305 reads

Find the size of all Indexes in a database

This script finds the size of all indexes in a database along with the table and the filegroup on which the index resides.  Read more...
By Bodhisatya Mookherjee 2013/10/15 | Source: SQLServerCentral.com | Category: indexes
Rating: |  Discuss |   Briefcase | 1,368 reads

Find Top 5 executed queries ordered by execution count

I wrote this query that helps us find executed queries with most number of execution counts. The DMV that we have used in this script is sys.dm_exec_query_stats and the function that we have used is sys.dm_exec_sql_text.  Read more...
Rating: |  Discuss |   Briefcase | 1,684 reads

Restore Database with any number of Ndf files

Execute the code after passing database name on which you want to restore and the path where your backup file being located. e.g exec sp_restoredb N'mydatabase',N'D:\mydatabase.bak'   Read more...
Rating: |  Discuss |   Briefcase | 994 reads

Recursive CTE Example

Use a recursive CTE to select hirearchial data in a single SQL statement.  Read more...
By Neil Bryan 2013/09/26 | Source: SQLServerCentral.com | Category: recursive cte
Rating: |  Discuss |   Briefcase | 2,187 reads

Determine if BACKUP COMPRESSION is available

This script will determine the SQL Server version and edition in order to find out if BACKUP COMPRESSION is available.   Read more...
By Mark Cook 2013/09/25 | Source: SQLServerCentral.com | Category: backup compression
Rating: |  Discuss |   Briefcase | 753 reads
<< Newer    Items 81 to 100 of 2944    Older >>