Category: Backups & Recovery
-
DBA Scripts: Get Backup Restore Duration Estimate
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Backup & Recovery This script is for planning, before a backup or restore starts: how long should you allow, from your own throughput history. If one is running right now and the question is how much longer it has, you want Get Backup…
Written by
-
DBA Scripts: Get Suspect Pages and Integrity Checks
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Backup & Recovery Pages Already Recorded as Bad, and a Backup Check Before DBCC CHECKDB An 823 or 824 just landed in the error log, or DBCC CHECKDB is due and you want to know whether anything is already recorded against this server.…
Written by
-
SQL Server Recovery Models Explained
⚡If the log will not truncate, the database is almost certainly in Full recovery with no log backup running. Check log_reuse_wait_desc: LOG_BACKUP means back up the log, not shrink the file. Choosing a model is the same question from the other side (the comparison table): Full plus log backups for anything you would restore to…
Written by
-
Backing Up a SQL Server Database with Encryption
Encrypted backups are no longer optional in most environments. If backups leave the server, land on shared storage, or are retained long-term, unencrypted backups are a data leak waiting to happen. SQL Server has supported native backup encryption since SQL Server 2012, but the mechanics still catch DBAs out. usually during a restore, not a…
Written by
-
How to Restore a Database in SQL Server
Restoring a database in SQL Server is a core DBA task. Whether you’re responding to an incident, performing disaster recovery testing, migrating data, or rebuilding an environment, restores need to be predictable, repeatable, and verifiable. This post walks through restoring a database using both T-SQL and SQL Server Management Studio, along with the checks that…
Written by
-
Get Last Database Restore Date and Time in SQL Server
Knowing when a database was last restored is useful during incident response, audits, and general environment validation. This is not about backup schedules or restore progress. It is one historical check that answers one question, when was this database last restored, and the query below answers it for every database on the instance. Show Last…
Written by
-
DBA Scripts: Get Backup Coverage
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Backup & Recovery Most production SQL Server environments have backup jobs configured. The question that actually matters is whether those jobs are running, and succeeding, for every database that needs them. A database added last month might never have been folded into the…
Written by
- RESOURCE_SEMAPHORE When SQL Server Is Nowhere Near Its Memory Cap
- Dynamic Data Masking: What a WHERE Clause Still Reveals
- DBA Scripts: Get Log Shipping Status
- SQL Server Row-Level Security: The Filter Does Not Stop Cross-Tenant Writes
- View the Definition of a Stored Procedure in SQL Server
- TempDB Is Full or Still Growing: Find What Is Using It, Right Now
- Backups & Recovery (17)
- DBA Scripts (152)
- High Availability (HA) (13)
- Installation & Configuration (49)
- Maintenance (25)
- Migration & Upgrades (14)
- Monitoring (9)
- Performance Tuning (37)
- Security (Encryption & Permissions) (21)
- Storage & Capacity (16)
- T-SQL Fundamentals (15)
- Troubleshooting (95)
- Wait Types (235)