Raccolta di vecchi articoli e procedure scritte negli anni relative al noto database Microsoft su cui ho lavorato per diversi anni come DBA. Spero possiate trovare qualcosa di utile tra procedure, vecchi script e metascript…. buona lettura!
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. When this heppen usually the common…
Continua a leggere….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 instance since last restart. Using command…
Continua a leggere….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 in your instance. You have only…
Continua a leggere….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 in errorlog files. It’s not difficult…
Continua a leggere….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 thing s to say: this is…
Continua a leggere….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 what become unuseful in your databases:…
Continua a leggere….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 about every single database backup in msdb..backupset.…
Continua a leggere….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 about every single database backup in msdb..backupset.…
Continua a leggere….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 it more then once to see…
Continua a leggere….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 large database – Added backup type…
Continua a leggere….