ORA-01035: ORACLE only available to users with RESTRICTED SESSION
1. First Check the Pdbs Status
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
————————————————————————————————————————
PDB$SEED READ ONLY NO
UAT READ WRITE YES (RESTRICTED SESSION)
2. Now, set the Container First Check the Pdbs Status
SQL> alter session set container=UAT;
Session altered.
3. Check the Login status of the Instance
SQL> select logins from v$instance;
LOGINS
——————————————————————————————————-
RESTRICTED
4. Run the following statement to check the violations again
SQL> select name, cause, type, message, status from pdb_plug_in_violations where type = ‘ERROR’ and status !=’RESOLVED’;
NAME CAUSE TYPE MESSAGE STATUS
———————————————————————————————–
SQL Patch ERROR
Interim patch 12345 (OJVM RELEASE UPDATE: (12345
)): Installed in the CDB but not in the PDB PENDING
Solution
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)
1. Startup the Database in Upgrade Mode
SQL> startup upgrade;
2. Open Pluggable database in Upgrade Mode
SQL> alter pluggable database all open upgrade;
3. Check Pdbs Status
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
————————————————————————————————————————
PDB$SEED MIGRATE YES
UAT MIGRATE YES (RESTRICTED SESSION)
4. Run Datapatch
$./datapatch -verbose
5. Shutdown the Database;
SQL> shut immediate;
6. Startup the Database;
SQL> Startup;
7. Check the Pdbs Status
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
————————————————————————————————————————
PDB$SEED READ ONLY NO
UAT READ WRITE NO
8. Run the following statement to check the violations again
SQL> select name, cause, type, message, status from pdb_plug_in_violations where type = ‘ERROR’ and status !=’RESOLVED’;
no rows selected