Solved

Restore from multiple .bak files to 1 DB

Posted on 2011-03-04
2
519 Views
Last Modified: 2012-08-14
I have backup of a huge DB.  That DB was split in to 3 diffrent .bak files. Now how can i restore those 3 backup files to 1 DB?
0
Comment
Question by:Svlss
2 Comments
 
LVL 39

Accepted Solution

by:
lcohan earned 500 total points
ID: 35040233
--assume you have bacup like below on 4 files
BACKUP DATABASE [MyDB] TO  [MyDB_bak1],  [MyDB_bak2],  [MyDB_bak3],  [MyDB_bak4]  WITH  COPY_ONLY, NOFORMAT, INIT,  NAME = N'MyDB-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10


--restore database would be
RESTORE DATABASE MyDB FROM MyDB_bak1, MyDB_bak2, MyDB_bak3, MyDB_bak4 WITH NORECOVERY
0
 

Author Comment

by:Svlss
ID: 35040490
i am trying this  but still its giving me below error

Msg 3234, Level 16, State 2, Line 1
Logical file 'Test_Data' is not part of database 'Test'.
Use RESTORE FILELISTONLY to list the logical file names.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
RESTORE DATABASE [Test]
FROM DISK = N'D:\Test_1of3.bak',
DISK = N'D:\Test_2of3.bak',
DISK = N'D:\Test_3of3.bak'
with move 'Test_Data' to 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Test_LOG.MDF',
move 'Test_log' to 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Test_LOG.LDF'
, replace

Open in new window

0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to shrink a transaction log file down to a reasonable size.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now