问题描述
嗨,
我面临一个问题,其中一个进程 (例如进程x) 可以消耗大部分撤消配额,然后失败的回滚段错误。
当我将增加我的数据库撤消保留,并增加我的撤消表空间大小时,它将为数据库中的所有用户增长,所以其他进程可以填充它而不是进程x。
我的问题: 是否可以为专用的配额保留/表空间大小挑出一个用户/模式?
谢谢
我面临一个问题,其中一个进程 (例如进程x) 可以消耗大部分撤消配额,然后失败的回滚段错误。
当我将增加我的数据库撤消保留,并增加我的撤消表空间大小时,它将为数据库中的所有用户增长,所以其他进程可以填充它而不是进程x。
我的问题: 是否可以为专用的配额保留/表空间大小挑出一个用户/模式?
谢谢
专家解答
是的,你可以,使用资源管理器。从文档中:
https://docs.oracle.com/cd/E11882_01/server.112/e25494/dbrm.htm#ADMIN11858
Undo Pool
You can specify an undo pool for each consumer group. An undo pool controls the total amount of undo for uncommitted transactions that can be generated by a consumer group. When the total undo generated by a consumer group exceeds its undo limit, the current DML statement generating the undo is terminated. No other members of the consumer group can perform further data manipulation until undo space is freed from the pool.
这是一个例子
https://docs.oracle.com/cd/E11882_01/server.112/e25494/dbrm.htm#ADMIN11858
Undo Pool
You can specify an undo pool for each consumer group. An undo pool controls the total amount of undo for uncommitted transactions that can be generated by a consumer group. When the total undo generated by a consumer group exceeds its undo limit, the current DML statement generating the undo is terminated. No other members of the consumer group can perform further data manipulation until undo space is freed from the pool.
这是一个例子
SQL> conn mcdonac/alicat1 Connected. SQL> alter system set resource_manager_plan =''; System altered. SQL> SQL> begin 2 dbms_resource_manager.create_pending_area(); 3 -- 4 5 dbms_resource_manager.create_consumer_group( 6 CONSUMER_GROUP=>'CG_UNDO_LIMIT_PLAN', 7 COMMENT=>'This is the consumer group that small undo limits' 8 ); 9 10 dbms_resource_manager.create_plan( 11 PLAN=> 'UNDO_LIMIT_PLAN', 12 COMMENT=>'Disallow exceeding undo' 13 ); 14 15 dbms_resource_manager.create_plan_directive( 16 PLAN=> 'UNDO_LIMIT_PLAN', 17 GROUP_OR_SUBPLAN=>'CG_UNDO_LIMIT_PLAN', 18 COMMENT=>'Disallow exceeding undo', 19 UNDO_POOL=>1000 -- one megabyte 20 ); 21 22 23 dbms_resource_manager.create_plan_directive( 24 PLAN=> 'UNDO_LIMIT_PLAN', 25 GROUP_OR_SUBPLAN=>'OTHER_GROUPS', 26 COMMENT=>'leave others alone' 27 ); 28 29 DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA; 30 31 DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA(); 32 33 end; 34 / PL/SQL procedure successfully completed. SQL> SQL> exec dbms_resource_manager_privs.grant_switch_consumer_group('DEMO','CG_UNDO_LIMIT_PLAN',false); PL/SQL procedure successfully completed. SQL> exec dbms_resource_manager.set_initial_consumer_group('DEMO','CG_UNDO_LIMIT_PLAN'); PL/SQL procedure successfully completed. SQL> SQL> alter system set resource_manager_plan ='UNDO_LIMIT_PLAN'; System altered. SQL> conn demo/demo Connected. SQL> create table t as select * from all_Objects; Table created. SQL> insert /*+ APPEND */ into t select * from t; 57034 rows created. SQL> commit; Commit complete. SQL> insert /*+ APPEND */ into t select * from t; 114068 rows created. SQL> commit; Commit complete. SQL> delete from t; delete from t * ERROR at line 1: ORA-30027: Undo quota violation - failed to get 288 (bytes) SQL>复制
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
评论
相关阅读
Oracle RAC 一键安装翻车?手把手教你如何排错!
Lucifer三思而后行
601次阅读
2025-04-15 17:24:06
【纯干货】Oracle 19C RU 19.27 发布,如何快速升级和安装?
Lucifer三思而后行
586次阅读
2025-04-18 14:18:38
XTTS跨版本迁移升级方案(11g to 19c RAC for Linux)
zwtian
494次阅读
2025-04-08 09:12:48
Oracle数据库一键巡检并生成HTML结果,免费脚本速来下载!
陈举超
478次阅读
2025-04-20 10:07:02
【ORACLE】记录一些ORACLE的merge into语句的BUG
DarkAthena
462次阅读
2025-04-22 00:20:37
Oracle 19c RAC更换IP实战,运维必看!
szrsu
439次阅读
2025-04-08 23:57:08
【ORACLE】你以为的真的是你以为的么?--ORA-38104: Columns referenced in the ON Clause cannot be updated
DarkAthena
437次阅读
2025-04-22 00:13:51
【活动】分享你的压箱底干货文档,三篇解锁进阶奖励!
墨天轮编辑部
426次阅读
2025-04-17 17:02:24
火焰图--分析复杂SQL执行计划的利器
听见风的声音
371次阅读
2025-04-17 09:30:30
3月“墨力原创作者计划”获奖名单公布
墨天轮编辑部
360次阅读
2025-04-15 14:48:05