ITPub博客

首页 > 数据库 > Oracle > pdb受限解决思路

pdb受限解决思路

原创 Oracle 作者:sjw1933 时间:2022-10-19 11:05:40 0 删除 编辑

报错信息

PDB in restricted mode ,getting following error while trying to connect  :

ORA-01035: ORACLE only available to users with RESTRICTED SESSION privilege

SQL> select CON_ID,NAME,OPEN_MODE,RESTRICTED,OPEN_TIME from v$pdbs;

 

CON_ID NAME OPEN_MODE RESTRICTED OPEN_TIME                 <<<<<<<<<<< RESTRICTED

3      PDB1 READ WRITE YES 31.01.19 10:22:46,761000000 GMT

Pending Errors in pdb_plug_in_violations

SQL>  select name, cause, type, message, status from pdb_plug_in_violations where type = 'ERROR' and status !='RESOLVED' order

 

PDB1 Sync Failure ERROR "Sync PDB failed with ORA-65177 during 'alter user "xxx" ...' " PENDING     <<<<<<<<<

原因:PDB PRODUCES SYNC FAILURE

解决方法:

To solve the issue ,delete the offending statement ( alter user "xxx" ) from PDB_SYNC$ for both CDB and PDB

 

On CDB root ,make a backup of  PDB_SYNC$  table and delete de offending rows

=====================================================

sqlplus / as sysdba

 

SQL> col NAME format a30

SQL> col SQLSTMT format a100

SQL> Select CTIME,SQLSTMT,NAME,FLAGS,OPCODE,REPLAY# from PDB_SYNC$;

 

SQL> create table BKPPDB_SYNC$ as select * from PDB_SYNC$;

 

SQL> delete from PDB_SYNC$ where SQLSTMT like ('%alter user "xxx"%');

 

SQL> commit;

 

 

On PDB make a backup of  PDB_SYNC$  table and delete de offending rows,stop / start the PDB

===================================================

SQL> alter session set container=PDB;

 

SQL> col NAME format a30

SQL> col SQLSTMT format a100

SQL> Select CTIME,SQLSTMT,NAME,FLAGS,OPCODE,REPLAY#  from PDB_SYNC$;

 

SQL> create table BKPPDB_SYNC$ as select * from PDB_SYNC$;

 

SQL> delete from PDB_SYNC$ where SQLSTMT like ('%alter user "xxx"%');

 

SQL> commit;

 

SQL> alter session set container=CDB$ROOT;

 

SQL> alter pluggable database PDB close;

 

SQL> alter pluggable database PDB open;

 

文档连接: OCI PDB ORA-01035: ORACLE only available to users with RESTRICTED SESSION due to Sync Failure ERROR "Sync PDB failed with ORA-65177 during 'alter user' in pdb_plug_in_violations (Doc ID 2503982.1)




 

查询到底是什么原因导致受限模式

select name, cause, type, message, status from pdb_plug_in_violations where type = 'ERROR' and status != 'RESOLVED'  order by name, time;


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/23825935/viewspace-2919126/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 本章总结
请登录后发表评论 登录
全部评论
11年数据库行业经验,Oracle ACE、PG ACE、OCM、IBM Certified DBA、MySQL OCP、PolarDB技术专家、KCP、PCTP、PCSD、达梦师资认证、PolarDB开源社区技术顾问、ITPUB认证专家、某高校外聘教师

注册时间:2019-05-05

  • 博文量
    295
  • 访问量
    300726