SQL Server 2005 restore one schema only

亡梦爱人 提交于 2019-12-17 21:11:44

问题


I am pretty sure this isn't possible....

We have a database with several schemas. Each schema belongs to a different user. One user was asking "if I find out I made a whole load of errors would it be possible to revert to the state my data was in yesterday". Obviously we could restore the whole database, but that would restore the other schemas as well which we do not want to do....


回答1:


You are correct, it is not possible to restore a single schema only.

That said, had you stored all specific schema objects to a specific Filegroup and had been taking Filegroup backups then you could restore just the affected Filegroup.

If you are administering a large number of schemas/filegroups however, this would be quite cumbersome.




回答2:


Restore the whole database to a database with a different name.

Copy over the parts that you wish to restore.




回答3:


You have to restore a copy of the whole database to a point in time and then copy over the schema data back into the original database. If this is needed on a regular basis in future you could use filegroups as John suggested and do a partial recovery of a copy, then copy the data back in. But you cannot, even with filegroups, do a partial recovery to a point in time (which is what you're asking for), afaik no such thing exists.



来源:https://stackoverflow.com/questions/929327/sql-server-2005-restore-one-schema-only

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!