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
Solved

Restore from multiple .bak files to 1 DB

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

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 this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
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.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

789 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