Bug 23572982,Oracle19c新建pdb受限模式,SYNC PDB FAILED WITH ORA-959 DURING 'CREATE USER

一、问题

测试环境19.10 RAC linux,根据种子库复制新建了一个PDB,结果发现处于受限模式???

二、MOS

PDB does not come out of Restricted Mode due to ORA-959 in PDB_PLUG_IN_VIOLATIONS (Doc ID 2167662.1)    
SYMPTOMS
After a PDB is created, it is in restricted mode due to errors in pdb_plug_in_violations like these:
Sync PDB failed with ORA-959 during 'CREATE USER <user> IDENTIFIED BY VALUES * DEFAULT TABLESPACE <tablespace>
TEMPORARY TABLESPACE <temp_tablespace> . . . container = all
' The user is a common user. CHANGES The new PDB was created from the PDB$SEED, which did not contain the common user's default tablespace. CAUSE This issue is caused by unpublished Bug 23572982 - SYNC PDB FAILED WITH ORA-959 DURING 'CREATE USER. SOLUTION The following solutions are available to fix unpublished Bug 23572982: Upgrade to 12.2.0.2 and apply the 12.2.0.1.171121 Database RU (or Windows bundle patch 12.2.0.1.180116 if running
on Microsoft Windows). Apply
12.1.0.2.170718 (Jul 2017) Database Proactive Bundle Patch (for engineered systems and Database In-Memory) Apply interim Patch 23572982 for 12.1.0.2 for your OS. Workaround (do either of the following): 1. Create a PDB that will be used as a "template" PDB for all others. Add the common user's default tablespace to
it. Clone/copy future PDBs from the "template" PDB rather than from the PDB$SEED, since the PDB$SEED doesn
't have the
needed tablespace.
2. Bounce the CDB, which causes a re-sync and resolves the pending ORA-959 in the pdb_plug_in_violations.

三、问题处理

1.MOS文档阅读说明,这个问题的原因就是Oracle自己的种子库,本身就缺少了Users表空间,因此你使用这个种子库作为模板复制新的pdb,肯定是少了users的!
2.那么如何处理这个问题呢? MOS的建议不太友好,它说让咱们新建一个PDB,然后手工加上缺少的表空间,后续新建pdb已自己刚刚新建的pdb作为模板,
抛弃系统的种子库模板pdb,这样以后就不会遇到这个问题了;
3.如何解决受限模式,Bounce the Cdb,关闭pdb,重新打开会自动应用! 4.Mos文档说12.2有补丁打完就好,结果实际19.10都还能遇到!!! 实际处理方法: alter session set container=xx; 手工create tablespace users datafile '+xx' size 10g; shutdown immediate; alter database open; 另一个节点需要提前down,后续open.


如何分析匹配也是这个问题?
SQL>select * from pdb_plug_in_violations;
这个视图显示PDB与CDB不兼容的信息! 对于其它PDB OK,单独PDB不正常,说明DB整体打补丁是OK的,可以检查这个视图!

PDB_PLUG_IN_VIOLATIONS displays information about incompatibilities between a PDB and the CDB to which it belongs.

  确认是ORA-959,这个就是表空间不存在,确认种子库以及新建PDB均缺少USERS or 报错中涉及的表空间就可以确认是这个问题了!

原文地址:https://www.cnblogs.com/lvcha001/p/14788623.html