The error "ORA-01035: ORACLE only available to users with RESTRICTED SESSION privilege" usually occurs when your instance is running is RESTRICTED mode and another user other than SYS is trying to connect to the database which will face this error.
Below command will let you know your instance is in RESTRICTED mode or not. SQL> select instance_name,status,logins from v$instance; INSTANCE_NAME STATUS LOGINS ---------------- ------------ ---------- pr OPEN ALLOWED SQL> shut immediate; SQL> startup restrict SQL> select instance_name,status,logins from v$instance; INSTANCE_NAME STATUS LOGINS ---------------- ------------ ---------- pr OPEN RESTRICTED If your instance is started in RESTRICTED mode and any user or application not having "RESTRICTED SESSION" privilege is trying to connect the database from another session, then that user will receive below error message. In this case, the user who is having "RESTRICTED SESSION" privilege, only he can connect to the database. C:\Windows\System32>sqlplus test/test SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jan 28 13:35:23 2024 Version 19.16.0.0.0 Copyright (c) 1982, 2022, Oracle. All rights reserved. ERROR: ORA-01035: ORACLE only available to users with RESTRICTED SESSION privilege Enter user-name: From another session by SYS user, grant RESTRICTED SESSION privilege to TEST user. SQL> grant RESTRICTED SESSION to test; Grant succeeded. Now check if TEST user can access the DB after granting above privilege. C:\Windows\System32>sqlplus test/test SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jan 28 13:40:38 2024 Version 19.16.0.0.0 Copyright (c) 1982, 2022, Oracle. All rights reserved. Last Successful login time: Sat Jul 01 2023 02:51:41 +05:30 Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.16.0.0.0 SQL> show user USER is "TEST" SQL> |
Thank you for your comment !