SQLcl Local Connect As Sysdba Fails After Remote Connect
(Doc ID 2409898.1)
Last updated on OCTOBER 23, 2020
Applies to:
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and laterOracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Service - Version N/A and later
Information in this document applies to any platform.
Symptoms
In SQLcl when connected to remote database as sysdba, and then attempt to connect to local as sysdba, it fails the first time with either of the following errors:
ORA-1031: insufficient privileges
However, the second attempt is okay.
This problem is not reproducible with SQL*Plus.
EXPECTED BEHAVIOR
While already connected to remote database, attempt to execute:
SQL> connect / as sysdba
Error Message = ORA-01017: invalid username/password; logon denied
Expect to connect to local database on first attempt, instead it attempts to connect to remote database and fails. It succeeds after the second attempt:
SQL> connect / as sysdba
Connected.
STEPS
The issue can be reproduced at will with the following steps:
Example:
SQL> connect sys/<password>@<tns_alias> as sysdba
Connected.
SQL> connect / as sysdba
Connection Failed
USER =
URL = jdbc:oracle:oci8:@remote
Error Message = ORA-01017: invalid username/password; logon denied
Commit
SQL> connect / as sysdba
Connected.
Now connected to local database.
Risk:
Due to this issue, users may connect to wrong database without realizing, posing risk.
Changes
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |
References |