Unix Technical Forum

How to Restore an Archived Filegroup on Another Server

This is a discussion on How to Restore an Archived Filegroup on Another Server within the SQL Server forums, part of the Microsoft SQL Server category; --> Hello, I have several archived filegroups that have data in them partitioned based on the date. These filegroups have ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 02:17 PM
Takpol
 
Posts: n/a
Default How to Restore an Archived Filegroup on Another Server

Hello,

I have several archived filegroups that have data in them partitioned
based on the date. These filegroups have been removed from database
after archival. For example two months ago. Meantime my production
database is populating everyday.

Now I would like to restore one of my old archived filegroups. In order
to do that I would like to backup and restore the current Primary
filegroup to another server, and also restore the archived filegroup
into that server. The backup commands to backup the archived filegroup
and also backing up the primary are:

BACKUP DATABASE [DB1]
FILEGROUP = 'PRIMARY'
TO DISK = 'C:\DB1\PRIMARY.BAK'
WITH INIT , NOUNLOAD , NAME = N'PRIMARY Filegroup backup',
NOSKIP , STATS = 10, DESCRIPTION = N'PRIMARY Filegroup backup of
DB1',
NOFORMAT

BACKUP DATABASE [DB1]
FILEGROUP = 'DataGroup383'
TO DISK = 'C:\DB1\DataGroup383.BAK'
WITH INIT , NOUNLOAD , NAME = N'Filegroup backup',
NOSKIP , STATS = 10, DESCRIPTION = N'Filegroup backup of DB1',
NOFORMAT


Later I move the backup files to another server and use these commands
to do the restore on new server:

RESTORE DATABASE [DB1]
FILEGROUP = 'PRIMARY'
FROM DISK = 'C:\Archival\Backups\PRIMARY.BAK'
WITH FILE = 1, NORECOVERY,
MOVE 'PRIMARY01' to 'C:\MSSQL\Data\DB1\PRIMARY01.mdf'

RESTORE DATABASE [DB1]
FILEGROUP = 'DataGroup383'
FROM DISK = 'C:\Archival\Backups\DataGroup383.BAK'
WITH FILE = 1, NORECOVERY,
MOVE 'DataFile383' to 'C:\MSSQL\Data\DB1\DataFile383.ndf'


At this point the database can not be used yet and it is on restore
mode then I use this command to recover it

RESTORE DATABASE [DB1] WITH RECOVERY

But I get an Error:

"Server: Msg 4318, Level 16, State 1, Line 1
File 'DataFile383' has been rolled forward to LSN 5848000000402600001.
This log terminates at LSN 5848000000387700001, which is too early to
apply the WITH RECOVERY option. Reissue the RESTORE LOG statement WITH
NORECOVERY.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally"

I tried several other things as well: backing up the current log and
restore it but it didn't work.
Please help or if this is not the right way to do this backup and
restore let me know how to do that. I really appreciate.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:21 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com