August 13, 2015 at 6:11 pm
I have accidentally taken the backup of a database twice into the same .bak file. Will I have any problem when trying to restore my instance to this particular backup?
August 13, 2015 at 6:30 pm
That depends.
What was the command you used?
Either you will have two backups in that file or you will have one backup.
If there is only one backup in the file, then you overwrote the previous backup and you would not be able to restore to that backup.
If there are two backups in the file, then you can restore to either of the backups as long as the bak does not get damaged.
Then there is the whole other issue of whether the backups are corrupt or not.
To restore from multiple backups in a file (backup sets), you could do something like this:
RESTORE DATABASE AdventureWorks2012
FROM DISK = 'Z:\SQLServerBackups\AdventureWorks2012.bak'
WITH FILE = 9
RECOVERY;
The file option specifies the backup set within the file to use.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply