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

PDB database is in restricted mode, not able to connect with the PDB database

Check the PDB is in restricted mode

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

Check the error at PDB level:

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

Error: PDB1 Sync Failure ERROR “Sync PDB failed with ORA-65177

Solution:

For fix this error: Delete the alter user statement from PDB_SYNC$ for both CDB and PDB

-- First connect with CDB database:

col NAME format a30
col SQLSTMT format a100
Select CTIME,SQLSTMT,NAME,FLAGS,OPCODE,REPLAY# from PDB_SYNC$ where SQLSTMT like '%alter user username%'

--If you find the row take a backup of row and delete with following query:
delete from PDB_SYNC$ where SQLSTMT like '%alter user username%';
commit;

--Connect with PDB database
ALTER SESSION SET CONTAINER=PDB1;

col NAME format a30
col SQLSTMT format a100
Select CTIME,SQLSTMT,NAME,FLAGS,OPCODE,REPLAY# from PDB_SYNC$ where SQLSTMT like '%alter user username%'

--If you find the row take a backup of row and delete with following query:
delete from PDB_SYNC$ where SQLSTMT like '%alter user username%';
commit;

Restart the PDB database:

SQL> alter session set container=CDB$ROOT;

SQL> alter pluggable database PDB close;
SQL> alter pluggable database PDB open;

This entry was posted in Oracle on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply