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.

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

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

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

Using sys.dm_os_wait_stat is not useful for deep troubleshooting because this view contains wait events for ALL processes/queries running on your ...
Massive SQL Server Database Moving Using Detach - Attach: The Complete Procedure

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

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

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

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

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

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

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 <b> *UPDATED* </b>

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 ...
/ / SQL Server Toolbox

Be the first to comment

Leave a Reply

Your email address will not be published.


*