On my previous post about backup database into different multiple files, I said that I will write a post about how to restore database from multiple different backup files. What I want to restore here was the backup files that I’ve backup before into five different files. That means actually only one backup files but split to different files. Hope you’ve got what I need to explain 😀
So, just like when we write backup, to restore that backup files we also have two different method to restore that database. Using T-SQL command or using SQL Server Management Studio.
Restore using SQL Server Management Studio :
As usual from object explorer, right click on database name, point to Tasks, point to Restore, and point to Database. Select Device as source, and click the little button on the left to select backup devices. Click Add, to add all backup files and click OK.
Return to Restore Database page, you will notice that only one backup set to restore, even if you select five different files before.
Ensure Database Destination was right, and then click OK to proceed restore database operation
Restore Database using T-SQL Command :
USE master GO RESTORE DATABASE AdventureWorks FROM DISK='C:\SQLDatabaseBackup\AdventureWorks01.bak', DISK='C:\SQLDatabaseBackup\AdventureWorks02.bak', DISK='C:\SQLDatabaseBackup\AdventureWorks03.bak', DISK='C:\SQLDatabaseBackup\AdventureWorks04.bak', DISK='C:\SQLDatabaseBackup\AdventureWorks05.bak' WITH REPLACE GO
Hope this help. Thank you