ORA-30013: undo tablespace currently in use故障处理思路

发布时间:2020-06-23 12:30:25 作者:yangjunfeng
来源:网络 阅读:2969

当日早上,某系统数仓数据库告警,数据库版本为12c,操作系统为RHEL7.2

2018-08-23T06:43:17.297341+08:00
PDB$SEED(2):Opatch validation is skipped for PDB PDB$SEED (con_id=0)
PDB$SEED(2):
PDB$SEED(2):WARNING: Pluggable Database PDB$SEED with pdb id - 2 is
PDB$SEED(2): altered with errors or warnings. Please look into
PDB$SEED(2): PDB_PLUG_IN_VIOLATIONS view for more details.
PDB$SEED(2):

2018-08-23T06:43:25.423893+08:00
PDB$SEED(2):Opening pdb with no Resource Manager plan active
2018-08-23T06:44:17.773603+08:00
DCDB(3):Autotune of undo retention is turned off.
2018-08-23T06:44:17.870219+08:00
DCDB(3):attach called for domid 3 (domuid: 0x786a7683, options: 0x4, pid: 191312)
DCDB(3):queued attach broadcast request 0x12372e9f68
2018-08-23T06:44:18.028918+08:00
DWDBPDB(4):Autotune of undo retention is turned off.
2018-08-23T06:44:18.103157+08:00
DWDBPDB(4):attach called for domid 4 (domuid: 0xd95b03fa, options: 0x4, pid: 191314)
DWDBPDB(4):queued attach broadcast request 0x12372e9f10
2018-08-23T06:44:18.394250+08:00
DCDB(3):Endian type of dictionary set to little
2018-08-23T06:44:18.623678+08:00
DWDBPDB(4):Endian type of dictionary set to little
2018-08-23T06:44:19.122431+08:00
DCDB(3):Undo initialization errored: err:30013 serial:0 start:858517331 end:858517597 diff:266 ms (0.3 seconds)
Pdb DCDB hit error 30013 during open read write (1) and will be closed.

尝试了一些手段,但是库无法启动,我们都知道,RAC系统正常情况是DB1使用untbs1,DB2使用untbs2。登陆系统查看也都正常。
16:56:09 > show parameter undo

NAME TYPE VALUE


_undo_autotune boolean FALSE
temp_undo_enabled boolean FALSE
undo_management string AUTO
undo_retention integer 7200
undo_tablespace string UNDOTBS1

16:56:09 > show parameter undo

NAME TYPE VALUE


_undo_autotune boolean FALSE
temp_undo_enabled boolean FALSE
undo_management string AUTO
undo_retention integer 7200
undo_tablespace string UNDOTBS2

无奈提交SR寻找后线支持,Oracle工程师反馈查询:
select a.SID,a.NAME,a.VALUE$,b.PDB_NAME
from
sys.pdb_spfile$ a,cdb_pdbs b
where a.PDB_UID=b.CON_UID;
15:21:33 > col PDB_NAME for a20
15:21:42 > /

SID NAME VALUE$ PDB_NAME


10 rows selected.

SR继续反馈Please use following commands:

ALTER SESSION SET CONTAINER =DCDB;
ALTER SYSTEM SET undo_tablespace=UNDOTBS1 scope=spfile sid='dwdb1';
ALTER SYSTEM SET undo_tablespace=UNDOTBS2 scope=spfile sid='dwdb2';
alter pluggable database DCDB open;

Alert日志:
2018-08-23T16:18:39.584321+08:00
LOGMINER: End mining logfile for session 1 thread 1 sequence 212717, +DATA/DWDB/ONLINELOG/redo12a.log
2018-08-23T16:18:39.659829+08:00
LOGMINER: Begin mining logfile for session 1 thread 1 sequence 212718, +DATA/DWDB/ONLINELOG/redo13a.log
2018-08-23T16:18:46.032160+08:00
DCDB(3):ALTER SYSTEM SET undo_tablespace='UNDOTBS1' SCOPE=SPFILE SID='dwdb1' PDB='DCDB';
2018-08-23T16:18:52.234874+08:00
DCDB(3):ALTER SYSTEM SET undo_tablespace='UNDOTBS2' SCOPE=SPFILE SID='dwdb2' PDB='DCDB';
2018-08-23T16:19:11.306657+08:00
DCDB(3):alter pluggable database DCDB open

我们在查询一下:
16:56:08 > select a.SID,a.NAME,a.VALUE$,b.PDB_NAME
16:56:09 2 from
16:56:09 3 sys.pdb_spfile$ a,cdb_pdbs b
16:56:09 4 where a.PDB_UID=b.CON_UID;

SID NAME VALUE$ PDB_NAME


14 rows selected.

这里有个坑,需要我们指定对SID为正确的PDB,这里有个乌龙,Oracle SR后台工程师让此之前有错误建议:

ALTER SESSION SET CONTAINER =DCDB;
ALTER SYSTEM SET undo_tablespace=UNDOTBS1 scope=spfile sid='dcdb1';
ALTER SYSTEM SET undo_tablespace=UNDOTBS2 scope=spfile sid='dcdb2';
alter pluggable database DCDB open;

The difference is that:

2018-08-23T15:53:13.142757+08:00
DCDB(3):ALTER SYSTEM SET undo_tablespace='UNDOTBS1' SCOPE=SPFILE SID='dcdb1' PDB='DCDB'; ---错误
《==DCDB(3): this command is executed in pdb DCDB

2018-08-23T11:07:37.996006+08:00
ALTER SYSTEM SET undo_tablespace='UNDOTBS1' SCOPE=BOTH SID='dwdb1'; --正确

<=======this command is executed in cdb.

好记性不如烂笔头,特此记录一下12c的那些坑~

推荐阅读:
  1. ORACLE OCM备考OEM搭建DG报错:NMO not setuid-root(Unix-only)
  2. oracle 字符串

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

ora 30013 12c坑

上一篇:linq联合查询例子

下一篇:(7.0系统手机)安卓神器Xposed框架不用root使用指南

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》