Generate DBCC SHOWCONTIG Commands for All SQL Server Tables
Before sys.dm_db_index_physical_stats existed, checking fragmentation across a database meant looking up every user table's object ID and running DBCC SHOWCONTIG against each one individually. This script closes that gap for the sysobjects-based era of SQL Server administration: it queries sysobjects for every table of …
Read MoreSQL Server Scripts and Database Commands 6.5, 7.0, 8.0, 9.0, 10.0, 10.50, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0 The corresponding version numbers and years: SQL Server 6.5 (1996), SQL Server 7.0 (1998), SQL Server 2000, SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, SQL Server 2014, SQL …
Read Moresql-server-log-backup-restore-chain-script-guide.md title: "SQL Server Log Backup Restore Chain Guide" description: "Learn how to apply SQL Server full, differential, and transaction log backups in the correct restore chain sequence using NORECOVERY and RECOVERY options." keywords: sql server restore chain transaction …
Read Moresql-server-restore-database-script-with-move-option.md title: "SQL Server Restore Database Script with MOVE" description: "Use dynamic SQL with the MOVE option to restore a SQL Server database and remap data and log file paths to any target directory on the server." keywords: sql server restore database restore with …
Read Moresql-server-script-to-backup-all-databases-to-disk.md title: "SQL Server Script to Backup All Databases to Disk" description: "T-SQL script to back up all user databases to disk with dynamic date-stamped filenames. Automate full database backups in SQL Server using BACKUP DATABASE." keywords: sql server backup all …
Read More