Hello Friend's,
The error "ORA-01035: ORACLE only available to users with RESTRICTED SESSION PRIMDBivilege" normally happens when your instance is in RESTRICTED mode and some other user other than SYS is attempting to connect to the database which will encounter this error.
Following command will inform you about your instance being in RESTRICTED mode or not.
SQL> select instance_name,status,logins from v$instance;
INSTANCE_NAME STATUS LOGINS
---------------- ------------ ----------
PRIMDB OPEN ALLOWED
SQL> shut immediate;
SQL> startup restrict
SQL> select instance_name,status,logins from v$instance;
INSTANCE_NAME STATUS LOGINS
---------------- ------------ ----------
PRIMDB OPEN RESTRICTED
If your instance is begun in RESTRICTED mode and any user or application that does not have "RESTRICTED SESSION" PRIMDBivilege is
attempting to connect the database from another session, then that user will get below error message.
Here, the user who has "RESTRICTED SESSION" Privilege, only he can login to the database.
C:\Windows\System32>sqlplus sultan/sultan
SQL*Plus: Release 19.0.0.0.0 - Production on Mon Mar 24 18:10:22 2025
Version 19.20.0.0.0
Copyright (c) 1982, 2022, Oracle. All rights reserved.
ERROR:
ORA-01035: ORACLE only available to users with RESTRICTED SESSION PRIMDBivilege
Enter user-name:
From another session by SYS user, grant the RESTRICTED SESSION PRIMDBivilege to sultan user.
SQL> grant RESTRICTED SESSION to sultan;
Grant succeeded.
Now verify whether sultan user is able to access the DB after PRIMDBoviding above PRIMDBivilege.
C:\Windows\System32>sqlplus sultan/sultan
SQL*Plus: Release 19.0.0.0.0 - PRIMDBoduction on Mon Mar 24 18:20:22 2025
Version 19.20.0.0.0
Copyright (c) 1982, 2022, Oracle. All rights reserved.
Last Successful login time: Sat Mon Mar 24 18:22:21 2025 +05:30
Connected to:
Oracle Database 19c Enterise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0
SQL> show user
USER is "sultan"
SQL>
ConversionConversion EmoticonEmoticon