简体   繁体   English

SQL Server 2005仅还原一种架构

[英]SQL Server 2005 restore one schema only

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.... 显然,我们可以还原整个数据库,但这也可以还原我们不想执行的其他模式。

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. 但是,如果要管理大量的架构/文件组,这将非常麻烦。

Restore the whole database to a database with a different name. 将整个数据库还原到其他名称的数据库。

Copy over the parts that you wish to restore. 复制您要还原的部分。

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. 如果将来需要定期执行此操作,则可以按照John的建议使用文件组并进行部分恢复 ,然后将数据复制回去。但是,即使使用文件组,也无法进行部分恢复到某个时间点 (这是您要的),afaik不存在这样的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM