I have a database DB in simple recovery mode with filegroups PRIMARY, A, B, and C. Each filegroup has a single file, PRIMARY.MDF, A.NDF, B.NDF, and C.NDF, respectively.
First, I run:
ALTER DATABASE [DB] MODIFY FILEGROUP [A] READ_ONLY ALTER DATABASE [DB] MODIFY FILEGROUP [B] READ_ONLY
Next, I run:
BACKUP DATABASE [DB] READ_WRITE_FILEGROUPS TO DISK = N'C:\DB.BAK'
I copy the backup file to a separate server and perform a partial restore with:
RESTORE DATABASE [DB] FILEGROUP = 'PRIMARY', FILEGROUP = 'C' FROM DISK = 'C:\DB.BAK' WITH PARTIAL, RECOVERY
The database is now online on the second server, and I can query data from filegroups PRIMARY and C. The database is aware of filegroups A and B, but they are marked as offline. Is there a way to restore the remaining two read only filegroups directly from the .LDF files?