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…
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…
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…
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…
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…
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.…
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…
Recent Posts
- Troubleshooting Database Mirroring Issues in SQL Server
- What’s New in SQL Server 2025
- Time To Revive This Blog
- How to Set Environment Variables in PowerShell
- Temp Tables in SQL Server
Categories
- AWS (5)
- DBA Stories (1)
- Linux (34)
- MySQL (5)
- Other (2)
- Postgres (7)
- PowerShell (48)
- RedShift (7)
- SQL Server (80)
- Windows Admin (64)
Tags
Active Directory (AD) AWS CLI CDC Certificates & Encryption Change Data Capture CSV Files Database Admin Database Backups Data Types Deleting Data Error Messages Featured Git Git Commands Git Log Installing SQL Server Linked Servers Linux Admin Measuring Databases MSSQL SPIDs NetFirewallProfile New-Item PowerShell PowerShell Create Folder PowerShell Delete Files PowerShell ForEach PowerShell Tips PowerShell Version Restoring Databases SQL Server Agent SQL Server ETL SQL Server Management Studio (SSMS) SQL Server Processes SQL Server Scripts SQL Tips SSH SSMS Tips Temp DB Windows Admin Windows Firewall WordPress Tutorials WSL WSL1 WSL2 WSL Ubuntu WSL Version