本文共 4626 字,大约阅读时间需要 15 分钟。
当日早上,某系统数仓数据库告警,数据库版本为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 isPDB$SEED(2): altered with errors or warnings. Please look intoPDB$SEED(2): PDB_PLUG_IN_VIOLATIONS view for more details.PDB$SEED(2):2018-08-23T06:43:25.423893+08:00PDB$SEED(2):Opening pdb with no Resource Manager plan active2018-08-23T06:44:17.773603+08:00DCDB(3):Autotune of undo retention is turned off.2018-08-23T06:44:17.870219+08:00DCDB(3):attach called for domid 3 (domuid: 0x786a7683, options: 0x4, pid: 191312)DCDB(3):queued attach broadcast request 0x12372e9f682018-08-23T06:44:18.028918+08:00DWDBPDB(4):Autotune of undo retention is turned off.2018-08-23T06:44:18.103157+08:00DWDBPDB(4):attach called for domid 4 (domuid: 0xd95b03fa, options: 0x4, pid: 191314)DWDBPDB(4):queued attach broadcast request 0x12372e9f102018-08-23T06:44:18.394250+08:00DCDB(3):Endian type of dictionary set to little2018-08-23T06:44:18.623678+08:00DWDBPDB(4):Endian type of dictionary set to little2018-08-23T06:44:19.122431+08:00DCDB(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 undoNAME TYPE VALUE
_undo_autotune boolean FALSE
temp_undo_enabled boolean FALSEundo_management string AUTOundo_retention integer 7200undo_tablespace string UNDOTBS116:56:09 > show parameter undo
NAME TYPE VALUE
_undo_autotune boolean FALSE
temp_undo_enabled boolean FALSEundo_management string AUTOundo_retention integer 7200undo_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 a2015: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:00LOGMINER: End mining logfile for session 1 thread 1 sequence 212717, +DATA/DWDB/ONLINELOG/redo12a.log2018-08-23T16:18:39.659829+08:00LOGMINER: Begin mining logfile for session 1 thread 1 sequence 212718, +DATA/DWDB/ONLINELOG/redo13a.log2018-08-23T16:18:46.032160+08:00DCDB(3):ALTER SYSTEM SET undo_tablespace='UNDOTBS1' SCOPE=SPFILE SID='dwdb1' PDB='DCDB';2018-08-23T16:18:52.234874+08:00DCDB(3):ALTER SYSTEM SET undo_tablespace='UNDOTBS2' SCOPE=SPFILE SID='dwdb2' PDB='DCDB';2018-08-23T16:19:11.306657+08:00DCDB(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 DCDB2018-08-23T11:07:37.996006+08:00
ALTER SYSTEM SET undo_tablespace='UNDOTBS1' SCOPE=BOTH SID='dwdb1'; --正确<=======this command is executed in cdb.
好记性不如烂笔头,特此记录一下12c的那些坑~
转载于:https://blog.51cto.com/yangjunfeng/2163506