Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
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 3331    Older >>
 

GetNumsAB

A brand new, high-performing, "GetNumbers" or "fnTallyTable" function that can be used for defeating RBAR.  Read more...
By Alan Burstein 2016/04/19 | Source: SQLServerCentral.com | Category: set based
Rating: |  Discuss |   Briefcase | 638 reads

Counting

A fun, but simple tally table for April 1.  Read more...
By Steve Jones 2016/04/01 | Source: SQLServerCentral.com | Category: tally table
Rating: |  Discuss |   Briefcase | 720 reads

Find missing index in the whole instance

This script scans all DB-s in the instance & send result to the email. I use sp_MSforechdb function & missing index finding script what i found here https://technet.microsoft.com/en-us/magazine/jj128029.aspx   Read more...
By Aksel Rohtsalu 2016/03/28 | Source: SQLServerCentral.com | Category: missing index finder
Rating: |  Discuss |   Briefcase | 845 reads

AD HOC Queries with Excel Output (Multiple Instances)

From a plain text containing multiple instance names you can deploy EXCEL files to report just changing your query text  Read more...
Rating: |  Discuss |   Briefcase | 989 reads

CASE IN ORDER BY

sorting data based on a particular value.  Read more...
Rating: |  Discuss |   Briefcase | 283 reads

Post-Deployment - Scan for RefreshView/Recompile

A script I can run after deployment to refresh views and force a recompile due to modified DDL.  Read more...
By Nate Hughes 2016/03/18 | Source: SQLServerCentral.com | Category: deployment
Rating: (not yet rated) |  Discuss |   Briefcase | 415 reads

Resolving merge replication conflicts type 5 & 6

Merge replication conflicts 'upload insert failed' and 'download insert failed' cannot be resolved using Conflict Viewer alone. Here's a script that will semi-automate the process for most conflicts  Read more...
By Richard Rozema 2016/03/21 | Source: SQLServerCentral.com | Category: merge replication
Rating: (not yet rated) |  Discuss |   Briefcase | 295 reads

Transaction Log VLF Alarm

This was used to alert on VLF counts to high due to replication log reader having issue reading the transaction log.  Read more...
By Edward Pochinski 2016/03/17 | Source: SQLServerCentral.com | Category: transaction log
Rating: |  Discuss |   Briefcase | 644 reads

Script DB Level Permissions v4

Script database and object level permissions for all database users  Read more...
By S. Kusen 2016/03/22 | Source: SQLServerCentral.com | Category: login
Rating: |  Discuss |   Briefcase | 861 reads

End to End Server Disk Space reporting within SQL Server

This procedure using OLE object calls to obtain server disk space values and writes them to a table. It then creates an HTML report based on the contents of the table and then , via a SQL Agent job, sends out colour coded emails relating to how much drive space is left... this is very handy!!!!  Read more...
Rating: |  Discuss |   Briefcase | 833 reads

Part 2 -- Restore a database to another instance...

This script should be created in the source instance of the database to be backed up and then restored in conjunction with that on the destination in Step 1.  Read more...
By Haden Kingsland (theflyingdba) 2016/03/15 | Source: SQLServerCentral.com | Category: restore
Rating: (not yet rated) |  Discuss |   Briefcase | 466 reads

Part 1 -- Restore a database to another instance...

A great script that I wrote some time ago to allow the last database backup to be restored across a linked server to another server, after running a remote sproc on the destination to kill off any users on the receiving side.  Read more...
By Haden Kingsland (theflyingdba) 2016/03/14 | Source: SQLServerCentral.com | Category: scripts
Rating: |  Discuss |   Briefcase | 638 reads

Cleanup old text files on the errorlog directory

SQL Agent job to cleanup all old text files on the errorlog directory.  Read more...
By Gerrit Mantel 2016/02/25 | Source: SQLServerCentral.com | Category: errorlog
Rating: (not yet rated) |  Discuss |   Briefcase | 387 reads

Change SQL Server Service Accounts with Powershell

If you need to change multiple SQL Server Services accounts across your environment, Powershell can do that for you.   Read more...
By Michael D'Spain 2016/02/24 | Source: SQLServerCentral.com | Category: powershell
Rating: (not yet rated) |  Discuss |   Briefcase | 399 reads

NULLs to Not NULLs

Script finds char types columns defined to allow NULL values but have non NULL values and generates the ALTER statements for the changes.  Read more...
By Igor Micev 2016/02/22 | Source: SQLServerCentral.com | Category: constraints
Rating: |  Discuss |   Briefcase | 917 reads

Orphaned login report for all databases

Running the sp_change_users_login @Action=Report against all databases with a simple cursor wrapped around it.  Read more...
By Edward Pochinski 2016/02/23 | Source: SQLServerCentral.com | Category: security
Rating: |  Discuss |   Briefcase | 868 reads

SQL Agent job to show SQL Server service details upon agent restart

To show SQL Server and physical server details upon instance restart so that we have visibility of unexpected issues with servers and services.  Read more...
Rating: (not yet rated) |  Discuss |   Briefcase | 514 reads

Enhanced Index Rebuild Script

Enhanced version of Index Rebuilt Script originally written by Michelle Ufford, which now includes latest version updates and additional features.  Read more...
Rating: |  Discuss |   Briefcase | 1,090 reads

Grant EXECUTE on all user-defines types

Gives execute permission on all user-defined types for the specific user   Read more...
By rpalbert 2016/02/19 | Source: SQLServerCentral.com | Category: user-defined types
Rating: (not yet rated) |  Discuss |   Briefcase | 391 reads
<< Newer    Items 41 to 60 of 3331    Older >>