Solved

Restore from multiple .bak files to 1 DB

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
query output (script) from a stored procedure 4 38
SQL Job Hung 17 37
Need some alteration to below mention query 2 12
SQL Query Across Multiple Tables - Help 5 20
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
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…

749 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