您能否仅从 Oracle 备份中恢复某些模式?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8718956/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 03:49:10  来源:igfitidea点击:

Can you restore only certain schemas from an Oracle backup?

oracleschemaoracle11grecovery

提问by Mike Christensen

We lost some data due to a data corruption issue, and we're trying to get our DBA to restore one of the nightly backups from a few days ago.

由于数据损坏问题,我们丢失了一些数据,我们正试图让我们的 DBA 恢复几天前的夜间备份之一。

However, we share this database with another team. We each own a schema within the database. Our schema is super small, and theirs I guess is some massive mapping database.

但是,我们与另一个团队共享此数据库。我们每个人都在数据库中拥有一个架构。我们的模式非常小,我猜他们的模式是一些庞大的映射数据库。

They claim Oracle only allows you to restore an entire database at once (all or nothing), which they estimate will take 2-3 days provided we can even provision a server to perform the operation on. I asked them if they can restore just our schema (which is about 30MB) and they said no.

他们声称 Oracle 只允许您一次(全部或全部)恢复整个数据库,他们估计这将需要 2-3 天,前提是我们甚至可以提供一个服务器来执行操作。我问他们是否可以只恢复我们的架构(大约 30MB),他们说不能。

Are we being given the run-around, or is this actually a limitation of the Oracle restore tools?

我们是否正在被绕过,或者这实际上是 Oracle 恢复工具的限制?

回答by APC

Let's presume by "the Oracle restore tools" you mean RMAN.

让我们假设“Oracle 还原工具”是指 RMAN。

RMAN is a physical backup - it copies files - and not surprisingly is restricted to physical restoration. As a consequence, its supported granularities are: block, file, tablespace and database.

RMAN 是一种物理备份——它复制文件——并且毫不奇怪地仅限于物理恢复。因此,它支持的粒度是:块、文件、表空间和数据库。

So while they're wrong to say the only possible restore is the database level, alas, you are out of luck in your quest to get just your schema restored. However, perhaps your schema uses a discrete set of tablespaces from the other project?

因此,虽然他们说唯一可能的还原是数据库级别是错误的,但是您在寻求仅还原架构时运气不佳。但是,也许您的架构使用了来自其他项目的一组离散表空间?

回答by ivanatpr

If this is an expdump, then you should be able to specify a fromuser:parameter when running the import with imp, which should limit the import to the object owned by the specified user.

如果这是exp转储,那么您应该能够在使用fromuser:运行导入时指定一个参数imp,这应该将导入限制为指定用户拥有的对象。

Update: See example here.

更新:请参阅此处的示例