4.03.2020

Autonomous Database (ADB) connectivity with Oracle SQLcl

This blog post takes you through Oracle SQL Developer command line interface connectivity to an autonomous database (ADB). SQLcl is a free command line interface for Oracle database. It will allow interactive or batch execution of SQL and PL/SQL commands with in-line editing, statement completion, and command recall for a feature-rich experience capabilities. Download the tool from the below url:



With SQLcl 4.2 or higher you can also connect  to ADB database, either using Oracle Call Interface or JDBC thin connection. Whatever connection mode, OCI or JDBC, it has to be setup before you can use the SQLcl.

Use the below example to connect to a ADB using SQLcl oci connection:

sql -oci

SQLcl: Release 18.4 Production on Wed Apr 03 15:28:40 2019

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

Username? (''?) sales_dwh@adwc1_low
Password? (**********?) **************
Last Successful login time: Wed Apr 03 2019 15:29:19 -07:00

Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.4.0.0.0

SQL>
Use the below example to use SQLcl with JDBC thin connection:

  • Start with sql /nolog 
  • Configure the session to use existing wallet connection: 
  • SQL> set cloudconfig /home/adwc/wallet_ADWC1.zip
    Wallet Password:  **********
  • Connect to ADB database , as shown below:
  • SQL> connect admin@adwc1_medium

In my next post, will discuss JDBC connectivity details.

No comments: