Skip to Main Content

SQLcl: MCP Server & SQL Prompt

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQLcl "Saved" Cloud connection issue

Mohamed HebaAug 23 2023

Hi,

I am trying to create a cloud saved connection using SQLcl connection manager but having some issues.

SQLcl : 23.2

OS : Windows 11

DB : on-prem DB using & Oracle cloud Autonomous DB

Prerequisite:

            Provision autonomous transaction db and enable mTLS connection.

Steps

  1. Creating connection in oracle SQL Developer
    1. on-prem connection created and saved with password.
    2. Cloud DB connection created using cloud wallet and saved with password.
    3. Cloud DB connection created using “Custom JDBC” and saved with password.
  2. Exporting saved connections from sql developer as json file.
  3. SQLcl
    1. Run SQLcl with /nolog
    2. cm import -duplicates replace C:\Directory\SavedConnection.json
      1. Success message received for on-prem connection.
      2. Error message received for cloud connection with wallet and I had to edit the json file to change wallet path to the format “file:/C:/directory/wallet.zip” then rerun same command.
      3. Error message received for cloud connection using “Custom JDBC”, “Failure - Unable to convert Oracle connection type ADVANCED” I was not able to work around it.
  4. Connection using saved connection:
    1. conn -name on_prim_connection
      1. connection successful.
    2. Conn -name cloud_connection_using_Wallet
      1. Error received: The Network Adapter could not establish the connection (CONNECTION_ID=1oc4eWVNQ4aFge5vNJsQeQ==)

Issue:

I was not able to connect to a saved oracle cloud autonomous db connection using wallet or custom JDBC. Error received “The Network Adapter could not establish the connection (CONNECTION_ID=1oc4eWVNQ4aFge5vNJsQeQ==)”.

Note:

I was able to connect from SQLcl using below commands:

  • Without wallet
    conn username/password@tns
  • Using Wallet
    conn -cloudconfig "C:\directory\Wallet.zip" username/password@tns_alias
Comments
Post Details
Added on Aug 23 2023
0 comments
604 views