Script Toolbox for SQL Server

A big toolbox full of articles and scripts useful in the daily job of a DBA. Performance tuning, troubleshoting, migration and backup strategies.

AlwaysOn : Manually add a new replica node using a custom backup path with custom credentials

Management Studio wizards are powerful and can do many things automatically... but sometimes you have to do something manually. In ...
/

Recover a database with a DAMAGED and/or LOST log file

In this procedure we'll manage one of the worst situation a DBA has to manage: corrupted files and data loss ...
/

Monitoring Wait Events of a single Session or Query in SQL Server

Using sys.dm_os_wait_stat is a problem for deep troubleshooting because this view contains wait events for ALL processes/queries running on your ...
/

How to script logins with the original password HASH and original SID

A quick tip useful to avoid problems during migrations. This query allow to script instance users with orginal SID and ...
/

Massive SQL Server Database Moving Using Detach – Attach: The Complete Procedure

This is a complete configurable metascript, prepared to create detach statements, file move statement and re-attach statements for every database ...
/

Anayze SQL default trace to investigate instance events

Quering default trace is the best way to investigate unusual or critical events heppened in SQL server and not logged ...
/

SQL Jobs Monitoring: check last run datetime and duration

A simple query to check rapidly your job's status and duration. Useful for fast monitoring on many instances. No more ...
/

How to make your databases smaller and faster: find unused indexes

It's a boring job but sometimes a good DBA has to do it. Applications change and you have to understand ...
/

Analyze SQL Server database historical growth: MONTLY size changes

The most simple way to analyze database historical growth is quering database backup catalog. SQL Server catalog stores informations ...
/

Analyze SQL Server database historical growth: DAILY size changes

The most simple way to analyze database historical growth is quering database backup catalog. SQL Server catalog stores informations ...
/

Queries to see rapidly what your SQL Server is doing NOW

1) Blocked And Blocking queries. If this query returns no rows you have no blocked queries in this moment. Run ...
/

Massive Database Migration between SQL Server instances: the complete procedure v.2.0 *UPDATED*

(05/04/2014) Procedure Upgrades : - Added compresson to reduce bandwith,space necessary and transfer time - Reduced stat value for very ...
/

Be the first to comment

Leave a Reply

Your email address will not be published.


*