Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
Restoring database - Filegroups
Restoring database - Filegroups
Rate Topic
Display Mode
Topic Options
Author
Message
jeelanik
jeelanik
Posted Thursday, September 30, 2010 12:33 PM
Grasshopper
Group: General Forum Members
Last Login: Yesterday @ 1:24 PM
Points: 19,
Visits: 90
I am restoring a database, one filegroup at a time.
I get the following error when I am restoring the second filegroup. I have totally x filegroups to restore.
The database can not be brought online because file 'Databasenamedata1' is currently restored to LSN 265000005575300001 but must be restored to LSN 265000005572900001.
I am not sure as to how I could avoid this error.
Info:
I am have backed up and restored "Primary" filegroup. Database was online until I tried to restore the "DATA" filegroup after restoring the primary filegroup.
More Info:
My Backup script:
BACKUP DATABASE Databasename
FILEGROUP = 'DATA'
TO DISK = 'C:\Databasenamedata.bak'
GO
My restore Script:
RESTORE DATABASE Databasename
FILE = 'Databasenamedata1'
FROM DISK = 'C:\Databasenamedata.bak'
WITH MOVE 'Databasenamedata1' TO 'c:\DatabasenameTSTdata1.ndf'
, replace
GO
Thanks.
Post #996175
Josh B
Josh B
Posted Thursday, September 30, 2010 2:38 PM
Ten Centuries
Group: General Forum Members
Last Login: Today @ 3:41 PM
Points: 1,019,
Visits: 6,528
I believe that you need to specify the WITH PARTIAL, NORECOVERY option when restoring mulitiple file groups. I've used something like...
RESTORE [database]
FILE = [filename]
FROM DISK 'C:\PathOfBackupFile.bak'
WITH PARTIAL, NORECOVERY
MOVE [filename] TO 'C:\NewPath.mdf.'
That would get the primary restored, but leave the database in Recovery so you can restore the rest of your filegroups and any tran logs before using the WITH RECOVERY to bring the database up.
Post #996293
jeelanik
jeelanik
Posted Friday, October 01, 2010 8:45 AM
Grasshopper
Group: General Forum Members
Last Login: Yesterday @ 1:24 PM
Points: 19,
Visits: 90
Thanks for your guidance.
I was wondering if I could bring the database up with Primary filegroup and open it to the users while I add the remaining filegroups (while the database is open to the users)
Thank you.
Post #996717
ALZDBA
ALZDBA
Posted Friday, October 01, 2010 1:14 PM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 7:03 AM
Points: 6,861,
Visits: 8,048
What your are trying to do is a piecemeal restore.
(ent edtn / dev edtn needed )
ref:
http://msdn.microsoft.com/en-us/library/ms177425.aspx
Johan
Jul 13
Don't drive faster than your guardian angel can fly ...
but keeping both feet on the ground won't get you anywhere
-
How to post Performance Problems
-
How to post data/code to get the best help
-
How to prevent a sore throat after hours of presenting ppt ?
"press F1 for solution", "press
shift
+F1 for urgent solution"
Need a bit of Powershell? How about
this
Who am I ?
Sometimes this is me
but
most of the time this is me
Post #996947
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.