Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Scripts by S M

SQLServerCentral.com profile

   Items 1 to 20 of 55    Older >>
 

Fix Orphan Users

Fix Orphan Users  Read more...
By S M 2016/11/30 | Source: SQLServerCentral.com | Category: orphan users
Rating: |  Discuss |   Briefcase | 415 reads

Taking backup of the databases to the Active server alone

If you have Always On and need to stop running database backups to the stand by server, use the script.  Read more...
By S M 2016/11/21 | Source: SQLServerCentral.com | Category: always on
Rating: |  Discuss |   Briefcase | 165 reads

Refresh all views in a database

Refresh all views in a database  Read more...
By S M 2016/10/28 | Source: SQLServerCentral.com | Category: views
Rating: |  Discuss |   Briefcase | 500 reads

Change datetime

If you have any requirement to extract next 100 sequential date from a present date, you can use the below script. You can change the @datetimeformat value and the output will appear in the same format.  Read more...
By S M 2016/10/10 | Source: SQLServerCentral.com | Category: date manipulation
Rating: |  Discuss |   Briefcase | 420 reads

Shrink Tlog Files

DBA many a times need to shrink the log files if that grows very large. Though I am not recommending to do it daily or often but if space is an issue and you want to release space to OS, you may use the script.  Read more...
By S M 2016/10/11 | Source: SQLServerCentral.com | Category: dbcc shrinkfile
Rating: |  Discuss |   Briefcase | 551 reads

Enable Email Notification to all SQL Jobs

If you have a requirement to enable email notification to all the SQL Jobs, then you may use my script.  Read more...
By S M 2016/10/06 | Source: SQLServerCentral.com
Rating: |  Discuss |   Briefcase | 615 reads

Create EndPoint

Server principal 'xx\yy' has granted one or more permission(s). Revoke the permission(s) before dropping the server principal. (Microsoft SQL Server, Error: 15173). If you are gett  Read more...
By S M 2016/10/03 | Source: SQLServerCentral.com | Category: database mirroing
Rating: |  Discuss |   Briefcase | 273 reads

Job Step Log Output file path

If you have a requirement to carefully have the output file against each sql agent job step, you can use this script. If incase, there are many sql agent jobs and by any reason if any of the step does not have proper o/p file, this script can automatically create the o/p file.  Read more...
By S M 2016/06/30 | Source: SQLServerCentral.com | Category: agent jobs
Rating: |  Discuss |   Briefcase | 375 reads

Send Email to recipients with Attachment using PowerShell

If you have a requirement to send email to recipients with attachment, can use the script.  Read more...
Rating: |  Discuss |   Briefcase | 532 reads

Getting transaction log space usage statistics for all databases.

Easy way to get the TLOg space Usage details  Read more...
By S M 2015/12/07 | Source: SQLServerCentral.com | Category: space usage
Rating: |  Discuss |   Briefcase | 1,184 reads

Capture the tasks performed in a text file

Creates a record of all or part of a Windows PowerShell session in a text file.  Read more...
Rating: |  Discuss |   Briefcase | 961 reads

Open Transaction details

sql server blocking, open transaction  Read more...
By S M 2015/10/01 | Source: SQLServerCentral.com | Category: transactions
Rating: |  Discuss |   Briefcase | 1,662 reads

Cleanup Older than 30 days of Files & Folder through SQL Job

Using Powershell, Cleanup Older than 30 days of Files & Folder through SQL Job  Read more...
By S M 2015/08/24 | Source: SQLServerCentral.com | Category: powershell
Rating: |  Discuss |   Briefcase | 1,453 reads

Retrieving XML data to Table from dm_os_ring_buffers

Retrieving XML data to Table from dm_os_ring_buffers for better readable purpose  Read more...
By S M 2015/08/27 | Source: SQLServerCentral.com | Category: ring buffer
Rating: |  Discuss |   Briefcase | 874 reads

Query to Delete all Folders, Sub-Folders and Files located in a Path

A script to help you cleanup Files/Folders & Sub-folders.  Read more...
Rating: (not yet rated) |  Discuss |   Briefcase

Kill all USer Sessions before starting to restore a Database

If you have a requirement to Kill all USer Sessions before starting to restore a Database, you may use this script  Read more...
By S M 2015/08/05 | Source: SQLServerCentral.com | Category: sql restore
Rating: |  Discuss |   Briefcase | 1,698 reads

List Out All User Defined Triggers

List Out All User Defined Triggers, along with the database where the triggers are disabled. is_ms_shipped = 1 denotes that its an user written trigger.  Read more...
By S M 2015/08/06 | Source: SQLServerCentral.com | Category: triggers
Rating: |  Discuss |   Briefcase | 759 reads

Setup Alerts for SQL Replication

If you want to monitor few specific alerts for SQL Replication (Merge and Transnational), you can may consider adding these 14 alerts.  Read more...
By S M 2015/07/21 | Source: SQLServerCentral.com | Category: replication
Rating: |  Discuss |   Briefcase | 823 reads

Delete Backup Files From Default Backup Location

IF you have need to schedule job to cleanup backup files older than N days, you can use my written script.  Read more...
By S M 2015/07/02 | Source: SQLServerCentral.com | Category: backup
Rating: |  Discuss |   Briefcase | 547 reads

Disk Free Space Check

IF you have a requirement to check disk free space and want to report to the team using email, can use my script  Read more...
By S M 2015/06/17 | Source: SQLServerCentral.com | Category: dbmail
Rating: |  Discuss |   Briefcase | 1,449 reads
   Items 1 to 20 of 55    Older >>