Skip to Main Content
  • Questions
  • How to connect SQL Developer using oracle wallet external password store

Breadcrumb

We're taking a break this week as Connor and Chris will both be at CloudWorld, the premier Oracle conference of 2024. If you're in Vegas, please come say Hi or pop into our sessions

Question and Answer

Connor McDonald

Thanks for the question, Abhinayreddy.

Asked: June 27, 2019 - 2:21 pm UTC

Last updated: September 04, 2024 - 2:24 am UTC

Version: 4.1.3

Viewed 10K+ times! This question is

You Asked

Hi,

How can i connect to SQL developer using oracle wallet based security.

from sql plus we can connect using the command like /@sid, but how can i connect to SQL developer (or) toad using the wallet based security.

Thanks in advance.

and Connor said...

Thanks for your patience. I had some back-and-forth with the SQL Developer team on this one.

1) If your sqlnet.ora/tnsnames.ora are not in the default location, then set TNS_ADMIN as an env variable before starting SQL Dev
2) For your new connection, choose Auth type = OS, and enter this for Custom JDBC connection type. Enter this:

jdbc:oracle:oci:/@mydb

and you should be good to go.



Rating

  (2 ratings)

We're not taking comments currently, so please try again later if you want to add a comment.

Comments

sqlcl with wallet/mcs connections

t1dsoldier, September 03, 2024 - 9:12 pm UTC

Hey Conner,

I have been looking around and asked on the oracle community forum but no luck on connecting to an instance with sqlcl wallet/mcs connections.

I can connect with sqlplus, and sql developer but cant find the setting in the sql developer/sqlcll dirs.

my sql developer is old, requests have been submitted for updates :)

sql /@"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCPS)(Host=super_cool_server)(Port=7856))(CONNECT_DATA=(service_name=super_fun)))"


SQLcl: Release 21.4 Production on Tue Sep 03 16:19:13 2024

Copyright (c) 1982, 2024, Oracle. All rights reserved.

USER =
URL = jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCPS)(Host=super_cool_server)(Port=7856))(CONNECT_DATA=(service_name=super_fun)))
Error Message = IO Error: IO Error sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target, connect lapse 99 ms., Authentication lapse 0 ms.
Username? (RETRYING) ('/@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCPS)(Host=super_cool_server)(Port=7856))(CONNECT_DATA=(service_name=super_fun)))'?)

Also for sql developer you no longer have to use the Custom JDBC connection type.

Thanks
Dave
Connor McDonald
September 04, 2024 - 2:24 am UTC

Martin has a nice write up here

https://martincarstenbach.com/2021/04/21/connecting-to-a-database-using-sqlcl-a-wallet-and-the-thin-driver/

If you still have problems, ping us back here.

let the fun begin

t1dsoldier, September 05, 2024 - 7:55 pm UTC

thanks for the fast response.
I did get a response from my question on the Oracle Forum and I didnt love the response for using MCS store, but one thing I like is a challenge.
I almost quit this job back in 2015 when my lead said "you ever worked on Oracle?"
Me: No
him: Well make Oracle and PKI work together.
I cried myself to sleep every night lol but with the help of bug fixes we figured it out.

Back to mission at hand.
Yes I did read that article and attempted some tweaks. None worked.

Ill provide some details when I organize them.

I had an admin give me all the privs on the sql developer dir so I can tweak more.
Let me ask this questions before I am messing with something that doesnt have all the dependent objects.
Does Sql Developer come bundled with everything required to use soft cert/wallet connections? I assume yes but want to confirm.

echo %java_home%
C:\Program Files\SQLDeveloper_21.4.2\jdk\jre

java -version
java version "1.8.0_401"
Java(TM) SE Runtime Environment (build 1.8.0_401-b32)
Java HotSpot(TM) 64-Bit Server VM (build 25.401-b32, mixed mode)

C:\sql
SQLcl: Release 21.4 Production on Thu Sep 05 15:51:34 2024
Copyright (c) 1982, 2024, Oracle. All rights reserved.