Tag: Restoring Databases

  • Get Estimated Backup Restore Time in SQL Server

    This post contains a SQL script to get estimated completion times and process information for your currently running database backups & restores in SQL Server. Backing up a database can often take a very long time. It depends on various factors why a backup can take longer to complete. One more obvious reason is, that…

    read more


  • Get Last Database Restore DateTimes in SQL Server

    This post contains a script to help you get the last dates and times for when your databases were last restored in SQL Server. The script below queries the M.S.D.B database sys.databases and restorehistory tables. You should get into the habit of searching MS Docs for every system table you query in SQL Server. This…

    read more


  • How to Restore a Database in SQL Server

    Restoring a database in SQL Server is a straightforward task, and one that SQL Database Administrators have to perform thousands of times throughout their career. A database restore can be done via GUI (SSMS Wizard) or via command (TSQL/PowerShell). The method you choose to restore a database is usually driven by the number of databases…

    read more


  • Attaching SQL Databases Without Log Files

    If you’ve lost a database log file and you’re in critical need of the data, well… that would never happen ( ͡° ͜ʖ ͡°) Nevertheless, this is might be a handy random fact to know, that you can attach a data (.mdf) file without the associated log (.ldf) file in SQL Server. This post will…

    read more


  • Backup & Restore (WITH FILE)

    In this post I’m going to show what the WITH FILE = X option does when backing-up or restoring a SQL Server database. microsoft_documentation The first thing we need to know is that a backup file can contain multiple databases, and even multiples of the same database. If you run a quick backup command on a…

    read more


  • Restoring a SQL Server Database

    This is a simple guide to restoring a full backup file in SQL Server, providing an overview of a few options that are available during the process. It is always a good idea to read through Microsoft’s documentation on database restores before proceeding. This will ensure that you have the most up-to-date and accurate information.…

    read more


  • Get Estimated Database Restore Time

    If you’re backing up or restoring a large database in SQL Server, you can run the SQL script in this post to find out how long it has left to complete. The SQL script will get an estimated database restore date/time & percentage completed so far. The performance of a backup or restore in MSSQL…

    read more