oracle 如何减少oracle中的撤消表空间大小?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1887298/
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-18 19:39:06  来源:igfitidea点击:

How to reduce undo tablespace size in oracle?

oracle

提问by P Sharma

Undo tablespace size is 30 GB even not activities going on DATABASE.

撤消表空间大小为 30 GB,即使不是 DATABASE 上的活动。

回答by APC

As the documentation sayswe are quite limited when it comes to UNDO tablespaces: there is no syntax for shrinking an UNDO tablespace, even in 11g. Without intervention the UNDO tablespace should be sized to fit our largest transaction. This means if we have a huuugebatch process which runs once a year then the UNDO tablespace ought to be large enough for it.

正如文档所说,我们在 UNDO 表空间方面非常有限:即使在 11g 中,也没有用于缩小 UNDO 表空间的语法。在没有干预的情况下,UNDO 表空间的大小应该适合我们最大的事务。这意味着如果我们有一个每年运行一次的huuuge批处理,那么 UNDO 表空间应该足够大。

Why don't Oracle provide tools for shrinking the UNDO tablespace? Because if we have had the transactions to stretch it to 30GB once we are likely to have that load again. Freeing up the disk space won't help us, because the UNDO tablespace is going to try to reclaim it. If we have used that space for some other purpose then our huge annual transaction will fall over.

为什么 Oracle 不提供收缩 UNDO 表空间的工具?因为如果我们有事务将其扩展到 30GB,我们可能会再次加载。释放磁盘空间对我们没有帮助,因为 UNDO 表空间将尝试回收它。如果我们将该空间用于其他目的,那么我们庞大的年度交易就会失败。

Now, if you think you have had soem abnormal data processing which has distorted your tablespace and you are convinced you're nevergoing to need that much UNDO ever again andyou really need the disk space then you can use the ALTER DATABASE syntaxto shrink the individual data files.

现在,如果您认为您有一些异常数据处理已经扭曲了您的表空间,并且您确信您永远不会再需要那么多 UNDO并且您确实需要磁盘空间,那么您可以使用ALTER DATABASE 语法来缩小单个数据文件。