重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 529|回复: 0
打印 上一主题 下一主题

[Oracle] OCI PDB ORA-01035: ORACLE only available to users with RESTRICTED SESSION due...

[复制链接]
跳转到指定楼层
楼主
发表于 2025-6-29 12:34:11 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
现象:
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     <<<<<<<<<

改动:
Possible reasons for this errors are :

Delete a common user
Having two set of local user ,one in CDB and other in PDB
Create / duplicate a PDB

原因:
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;

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2026-4-21 13:44 , Processed in 0.805412 second(s), 21 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表