Backup & Restore

Restore database from multiple different backup files

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.

select-backup-files

Return to Restore Database page, you will notice that only one backup set to restore, even if you select five different files before.

restore-database-page

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

Advertisements

2 thoughts on “Restore database from multiple different backup files

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s