?
Solved

Restore from multiple .bak files to 1 DB

Posted on 2011-03-04
2
Medium Priority
?
527 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 40

Accepted Solution

by:
lcohan earned 2000 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

752 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