Connect with Oracle SQLcl
Tip:
For a "try it out" alternative that demonstrates these instructions, run Task 4: Connect to your autonomous DB using SQL Worksheets from Database Actions, SQLCL and SQL Plus from Lab 2: Configure a Development System in the Oracle Autonomous Database Dedicated Workshop.- By Configuring a development system to access the database.
- By setting proper network routes with VPN (Fast connect or VPN as a Service) or any VCN peering if the compute host is in another VCN.
You can use SQLcl version 4.2 or later with Autonomous Database. Download SQLcl from oracle.com.
SQLcl can connect to an Autonomous Database using either an Oracle Call Interface (OCI) or a JDBC thin connection.
-
If you use Oracle Call Interface (OCI), start by following the instructions in Prepare for ODBC and JDBC Oracle Call Interface (OCI) Connections.
-
If you use JDBC Thin, start by following the instructions in Prepare for JDBC Thin Connections.
SQLcl with Oracle Call Interface
To connect using Oracle Call Interface, use the –oci
option, supply the database user name, a password, and the database service name provided in the tnsnames.ora
file. For example:
sql -oci
SQLcl: Release 19.1 Production on Mon Jan 18 09:28:38 2021
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Username? (''?) sales_trans@atpc1_low
Password? (**********?) **************
Last Successful login time: Mon Jan 17 2019 15:29:19 -07:00
Connected to:
Oracle Database 19c EE Extreme Perf Release 19.0.0.0.0 - Production
Version 19.9.0.0.0
SQL>
When connecting using Oracle Call Interface, the Oracle Wallet is transparent to SQLcl.
SQLcl with a JDBC Thin Connection
To connect using a JDBC Thin connection, first configure the SQLcl cloud configuration and then connect to the Autonomous Database.
For more information, on the connection types specified in tnsnames.ora
, see Predefined Database Service Names for Autonomous Databases.
For information on SQLcl, see Oracle SQLcl.
Parent topic: Connect to Autonomous Database