My Oracle Support Banner

SQLcl Local Connect As Sysdba Fails After Remote Connect (Doc ID 2409898.1)

Last updated on AUGUST 04, 2018

Applies to:

Oracle SQL Developer - Version 17.4 and later
Information in this document applies to any platform.


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-1017: invalid username/password; logon denied
ORA-1031: insufficient privileges

However, the second attempt is okay.

This problem is not reproducible with SQL*Plus.

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

The issue can be reproduced at will with the following steps:


SQL> connect sys/oracle@remote as sysdba

SQL> connect / as sysdba
Connection Failed
URL = jdbc:oracle:oci8:@remote
Error Message = ORA-01017: invalid username/password; logon denied

SQL> connect / as sysdba

Now connected to local database.

Due to this issue, users may connect to wrong database without realizing, posing risk.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.