sql server - Restore filegroup to different database -


i have sql server database 5 filegroups want backup 2 filegroups(one contains filestream)only , restore them different existing database.

what asking piecemeal restores (sql server)

you can restore primary + readwrite fg + of readonly filegroups in in simple recovery model or can restore primary + other filegroup(s) if in full recovery model.

as first filegroup restore primary filegroup, replace "different existing database" primary data file , log (in restore command should use with move points existing mdf + log files) , every subsequent restore overwrite other files, there remain nothing "existing" database, there no sense restore "different existing database": able bring online filegroups restored , database know nothing remaining files of "existing database". it's same restore another(non existing) database.

here restore sequence example primary + readonly fg in simple recovery model example: piecemeal restore of filegroups (simple recovery model)

and here example full recovery model example: piecemeal restore of filegroups (full recovery model)


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -