TOAD connection to Oracle Cloud Autonomous Database using Wallet

Can TOAD connect to an Autonomous Database in Oracle Cloud using the Oracle Cloud provided 'Instance Wallet'?
i.e. the zip that can be downloaded from >> Autonomous Database Details > DB Connection

Yes, that's all handled by the Oracle client, so there is nothing you need to do in Toad once you have that downloaded and configured with your client.

Hi John
When I unzip the wallet.zip contents and move it into the oracle client \network\admin folder, the connection from TOAD works correctly
When I then try to add a 2nd db's wallet connection details to the 1st (updating the tnsnames.ora), the connection fails with
ORA-28860: Fatal SSL error

I guess this might be because the 2nd wallet files are specific for a db / connection, but I can't combine them with the 1st wallet's details
wallet_contents

Do you know how to get around this (and not needing multiple oracle homes)?

Are there any plans to support to support a wallet configuration file per connection as in SQL Developer?
Thanks,
Coenraad

I haven't set this up myself, but whatever steps you'd take to set this up for SQL*Plus will also work for Toad.

There are two possibilities that I know of to get this to work. The first is to get a "Regional wallet" from Oracle Cloud Infrastructure (OCI) from your autonomous transaction processing (ATP) database, put that on your local workstation, and update your sqlnet.ora to reflect the path to the regional wallet. The regional wallet will work for the ATP's you have defined in your region and you won't need an individual Instance Wallet. The trade off is the same as the benefit, a single wallet opens an encrypted channel to all of the ATP dbs in your region, which depending on what you are doing might not make sense from a security perspective.
Which leads us to option two. Download instance wallets for each ATP instance and make an entry for each instance wallet in your sqlnet.ora file that points to each wallet.
I have gotten the regional wallet, and instance wallet to work. I have not done more than one wallet, but have seen it described in articles found on the web, but don't currently have a link.
John is correct that it really is not a Toad issue. If you can get it to work with SQLPlus, tnsnames.ora, and sqlnet.ora, it will work with Toad.
Hope this helps
Joe

1 Like

How do i connect to sql plus with a wallet..can you please give context with steps. Also can you do a guide on connecting to oracle atp using the regional wallet. Its not working for me . Please help

There is a solution to use multiple wallets and to configure a correct wallet for every connection needed. Leave sqlnet.ora empty and configure tnsnames.ora only.

This worked for me. You should set MY_WALLET_DIRECTORY under SECURITY settings:

This solution will work for every application using oracle client (SQLPlus, TOAD...).

But I bumped into another problem... which is in my opinion a TOADs problem but correct me if I'm wrong. The problem is that only one wallet can be used in one TOAD instance at a time.

So, in one TOAD instance I connect to first database using appropriate wallet... but when I try to connect to second database using it's wallet I get an error
image

Only if I disconnect from first database I can connect to second.
Workaround is that I run another TOAD instance and connect to second database... but this prevents me from for example comparing schemas, creating objects in another schema...

Hi Zoran,

I don't think is exactly a Toad problem because the Oracle client is making the connection, not Toad. Toad isn't even aware of the wallet location. If there is another application that uses the Oracle client to connection to different databases at the same time, I suspect it will have the same problem.

I don't know if there is anything that I can do to solve this, but I can offer a little bit of a workaround, for comparing schemas at least:

  1. Use Generate Schema Script to make a snapshot file of the source schema
  2. Compare the snapshot file to your target database

I know there are other scenarios where you'd want to make multiple connections and this doesn't work for all of them. But I hope that helps a little.

1 Like

Hi John,

You're right - this is an Oracle client problem. I found other people on other forums/blogs complaining about (or just mentioning) the same problem. For example Richard Martens blog:
https://smart4solutions.nl/blog/oci-connections-to-multiple-autonomous-transaction-databases-in-the-oracle-always-free-cloud/

But seems that Oracle solved this problem with their latest client.

I installed Oracle XE21C for testing purposes and used it's client to connect to our Cloud databases... and guess what?! It worked like a charm! I connected successfully to both databases using 2 wallets! No need to change anything in TNSNAMES or SQLNET - everything stayed the same as in my previous comment.

Oracle XE21C has integrated latest client 21.3.0.0 and I presume that instant client 21.3 should work too.

1 Like

Hi Zoran,

That is great info. Thank you for sharing your findings.

-John