RE: [External] : Re: SQLcl Connection

  • From: Jeff Smith <jeff.d.smith@xxxxxxxxxx>
  • To: "kris.rice@xxxxxxxx" <kris.rice@xxxxxxxx>, "charlottejanehammond@xxxxxxxxx" <charlottejanehammond@xxxxxxxxx>
  • Date: Mon, 23 Aug 2021 17:01:38 +0000

Just a heads-up in case you’re running into an old bug, 19.1 came out in April 
of 2019…latest release is 21.2.2 – came out a few weeks ago. Might be worth a 
quick try.

https://www.oracle.com/tools/downloads/sqlcl-downloads.html


You SHOULD see something like this –

HR@orcl> disconnect
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - 
Production
Version 19.3.0.0.0
HR@orcl> connect hr/badpassword
  USER          = hr
  URL           = jdbc:oracle:thin:@localhost:1521/orcl
  Error Message = ORA-01017: invalid username/password; logon denied
  USER          = hr
  URL           = jdbc:oracle:thin:@localhost:1521/xe
  Error Message = Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect 
descriptor
  (CONNECTION_ID=ru2FXBRqQ4y3MMPpLf0TCw==)

HR@orcl>
1:0 ¦ NOLOG ¦ NOLOG ¦ viins ¦ NOLOG ¦ NOLOG


From: oracle-l-bounce@xxxxxxxxxxxxx <oracle-l-bounce@xxxxxxxxxxxxx> On Behalf 
Of kris rice
Sent: Monday, August 23, 2021 11:32 AM
To: charlottejanehammond@xxxxxxxxx
Cc: Oracle List <oracle-l@xxxxxxxxxxxxx>
Subject: [External] : Re: SQLcl Connection

That's curious. We do nothing but sling it over to the db then return when the 
db is connected of failed with a message back.

2 options if you have time...
1- when it's hung, run jstack - p <pid> and float it over to me
2- sqlnet tracking to see what the db is doing.


-kris

On Mon, Aug 23, 2021 at 10:37 AM Charlotte Hammond 
<dmarc-noreply@xxxxxxxxxxxxx<mailto:dmarc-noreply@xxxxxxxxxxxxx>> wrote:
Hello,

I have only just started playing with SQLcl (version 19.1 on Linux) and have 
hit an oddity - just want to check if this is expected?

sql charlotte/mypassword@myhost/MYSID  <-- connects fine
sql charlotte/wrongpassword@myhost/MYSID <-- hangs

Is it meant to hang if I get my password wrong?   It looks like a bug (or at 
least a misconfiguration) but since I'm new I want to make sure I'm not 
overlooking something obvious.

Verbose mode shows nothing after:
INFO: Attempting to connect using URL= "jdbc:oracle:oci8:@myhost:MYSID"

The hang also happens if I get the username or service wrong (it errors if the 
host is wrong).  And it's the same if I use nolog and then the connect command.

Thank you!
Charlotte

Other related posts: