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 […]
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 […]
This is a simple guide to restoring a full backup file in SQL Server, covering a just a few options available during so. As always, have a read through Microsoft’s documentation page before-hand for proper info. 1. Open SSMS and connect to your SQL Server. 2. Right click Databases and select Restore Database. 3. Select […]
If you’re restoring a large database, you can get an estimate of how long it’s going to take by running this script below. [crayon-5c47f1a197ccb647913357/] As a quick alternative, you can also use sp_whoisactive to gain a rough idea of progress by viewing the percent_complete column.