Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have a database with three filegroups and each filegroup hosting one datafile. One of the secondary filegroups XYZ with data file xyz.ndf got updated with wrong/bad information in various tables under this filegroup. Before these various bad changes were made I took a backup of the xyz.ndf file using SSMS --> Backup Component --> Files and Filegroups.

I have an urgent need to restore only xyz.ndf file using the backup without impacting the operation of the remaining datafiles

For this I ran the query below

RESTORE DATABASE AAAA FILEGROUP='XYZ' FROM dISK='C:\MyLoc\XYZ_Backup.bak'
  WITH RECOVERY

I get the message below.. and there were no log backups after my original backup. What should i do to fix this?

Processed 48 pages for database 'AAAA', file 'xyz' on file 1. The roll forward start point is now at log sequence number (LSN) 40000000032600001. Additional roll forward past LSN 40000000034300001 is required to complete the restore sequence. RESTORE DATABASE ... FILE= successfully processed 48 pages in 0.054 seconds (6.944 MB/sec).

share|improve this question
add comment

1 Answer

The only way to restore a single file group is to run in all the logs so it's up to date with the rest of the files. This would of course run in the bad data modification you're trying to prevent but it's necessary to ensure consistency throughout the database. You'll need to restore it to another location and move the data over.

http://msdn.microsoft.com/en-us/library/ms178099%28v=SQL.105%29.aspx

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.