Solved

Restore from multiple .bak files to 1 DB

Posted on 2011-03-04
2
525 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 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

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 part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
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…

696 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