Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesHello, 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\P RIMARY01.mdf' RESTORE DATABASE [DB1] FILEGROUP = 'DataGroup383' FROM DISK = 'C:\Archival\Backups \DataGroup383.BAK' WITH FILE = 1, NORECOVERY, MOVE 'DataFile383' to 'C:\MSSQL\Data\DB1\D ataFile383.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.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread