Tag: Database Backups & Recovery

Database Backups & Recovery Blog Post Archives: Includes useful guides and tips from an experienced Microsoft SQL Server Database Administrator.


  • Database cannot be opened, it is in the middle of a Restore

    If you encounter this error in SQL Server, it means the database is still in the RESTORING state, typically because:> A restore operation is still in progress. > A previous restore failed due to corruption or other issues. > The database is in NO RECOVERY mode and waiting…

    Read More


  • How to Backup a Database in SQL Server

    In this blog post I’m sharing a demo for how to backup databases in Microsoft SQL Server. As a Production SQL DBA, having backups of your data is just as important as keeping your SQL Server online/available to serve its applications and users. If you don’t have confidence…

    Read More


  • Get Estimated Database Backup/Restore Example

    When you’re waiting on a database backup or restore to complete in SQL Server, we can run the script below to get an estimated time of how long the backup has left to go – We have one 5GB database here currently being backed up at the time…

    Read More


  • Get Last Backup Times for all Databases in SQL Server

    Ensuring your databases are regularly backed up is critical for data recovery in case of corruption, accidental deletions, or other failures. If you don’t have a backup, recovering lost data may be impossible. As a Database Administrator, it’s your number one Priority along-side ensuring your SQL Service is…

    Read More


  • Get Last Database Restore Date and Time in SQL Server

    This guide provides a script to retrieve the last restore date and time for each database in SQL Server. It’s particularly helpful for tracking restore operations or verifying backups during disaster recovery scenarios. The script below queries the sys.databases and dbo.restorehistory system tables to get the most recent…

    Read More


  • How to Restore a Database in SQL Server

    Restoring a database in SQL Server is an essential task for Database Administrators (DBA’s). We need to be able to quickly restore databases as part of Disaster Recovery (DR), as well as for configuring SQL features such as Always On or Database Mirroring. You can restore databases using…

    Read More


  • SQL Script: Get Last Backup Times in SQL Server

    Backing up databases is crucial for data protection in SQL Server, yet it’s surprising how often business-critical databases lack proper backups. When reviewing a new SQL Server instance, one of the first tasks is checking the last backup times to ensure recovery points are available before making any…

    Read More


  • Backing up a SQL Server Database with Encryption

    Backing up a SQL Server database with encryption is an essential practice when dealing with sensitive data, particularly if backups are stored off-site or include private customer information. SQL Server provides a secure method to back up databases using encryption by specifying an encryption certificate with the BACKUP…

    Read More


  • How to Backup a SQL Server Certificate

    Backing up SQL Server certificates is essential if you use them, especially for encrypted database backups that may need restoration on another server. This guide explains how to securely back up a SQL Server certificate and its private key. Backing up a SQL Server Certificate 1. Check Existing…

    Read More