Author: volt
-

Analyze SQL Server database historical growth: MONTLY size changes
When the daily backup history is too granular for a high-level capacity planning overview, a monthly view gives a cleaner picture of long-term growth trends. This query aggregates backup data from msdb..backupset by month, taking the peak size reached in each month to calculate the net monthly change. This complements the daily report: use the…
-

Analyze SQL Server database historical growth: DAILY size changes
Capacity planning starts with understanding how your databases grow over time. The simplest source of historical size data in SQL Server is the backup catalog: msdb..backupset records information about every backup taken on the instance. If you don’t have a dedicated monitoring tool, this is a reliable starting point. Two important caveats before using this…
-

Queries to see rapidly what your SQL Server is doing NOW
When troubleshooting performance issues on a SQL Server instance, the first step is always to understand what is happening right now: which queries are running, which sessions are blocking others, and where time is being spent waiting. These three T-SQL scripts give you an immediate picture of the current workload using Dynamic Management Views (DMVs).…
-

Massive Database Migration between SQL Server instances: the complete procedure v.2.0 *UPDATED*
A complete T-SQL based procedure to migrate SQL Server instances — including logins, databases, and file relocations — with no external tools required. Changelog (05/04/2014) Added compression to reduce bandwidth, space and transfer time Reduced stat value for very large databases Added backup type parameter: FULL, FULL_COPYONLY or DIFFERENTIAL Added Maxtransfersize and Buffercount parameters to…
-
Achille, la Tartaruga e il dilemma di un certo Zenone…
Cosa succederebbe se un grande guerriero e una piccola tartaruga si sfidassero in una gara di velocità? Per Zenone di Elea, matematico e filosofo greco del V secolo a.C., il guerriero non raggiungerebbe mai la tartaruga — almeno secondo la logica del suo celebre paradosso. Eppure il buon senso ci dice il contrario. Ecco come…