How to restore database from SQL Server Split Backup
In my Previous post Split Backup in SQL Server I had written on how to split your sql server backup into multiple files. Now that you have taken the backup by splitting file, How will you restore it.
Restoring a database from SQL Server Split backup is pretty simple. Below is the T-SQL script to restore database from SQL Server Split Backup
USE master GO RESTORE DATABASE AdventureWorks2008R2_RestoreFromSplitBAK FROM DISK = 'D:\MSSD_LAB\MSSQL_BACKUPS\Test_Split_Backup\MyDisk1\AdventureWorks2008R2_1', DISK = 'D:\MSSD_LAB\MSSQL_BACKUPS\Test_Split_Backup\MyDisk2\AdventureWorks2008R2_2', DISK = 'D:\MSSD_LAB\MSSQL_BACKUPS\Test_Split_Backup\MyDisk3\AdventureWorks2008R2_3', DISK = 'D:\MSSD_LAB\MSSQL_BACKUPS\Test_Split_Backup\MyDisk4\AdventureWorks2008R2_4' WITH FILE = 1, MOVE N'AdventureWorks2008R2_Data' TO N'D:\MSSQLSERVER\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Data\AdventureWorks2008R2_Data_1.mdf', MOVE N'AdventureWorks2008R2_Log' TO N'D:\MSSQLSERVER\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Data_Log\AdventureWorks2008R2_log_1.LDF', NOUNLOAD, STATS = 20 GO
As you can see above, I am restoring a Single Database using 4 Split backup files which I have taken in my earlier post.