SQLcl (Oracle SQL Developer Command Line) is a command-line interface for Oracle Database. It allows you to interactively or batch execute SQL and PL/SQL. SQLcl provides in-line editing, statement completion, and command recall for a feature-rich experience, all while also supporting your previously written SQL*Plus scripts.
Note:To connect Oracle SQLcl to an Autonomous Transaction Processing dedicated database, the system running Oracle SQLcl must have network access to the database.
You can use SQLcl version 4.2 or later with Autonomous Transaction Processing. Download SQLcl from oracle.com.
SQLcl can connect to an Autonomous Transaction Processing dedicated 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 Oracle Call Interface (OCI), ODBC, and JDBC 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 18.4 Production on Wed Apr 03 15:28:40 2019 Copyright (c) 1982, 2019, Oracle. All rights reserved. Username? (''?) sales_trans@atpc1_low Password? (**********?) ************** Last Successful login time: Wed Apr 03 2019 15:29:19 -07:00 Connected to: Oracle Database 18c Enterprise Edition Release 126.96.36.199.0 - Production Version 188.8.131.52.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 Transaction Processing dedicated database.
- Start SQLcl with the /nolog option.
- Configure the SQLcl session to use your Oracle Wallet:
SQL> set cloudconfig directory/client_credentials.zip Wallet Password: **********
- Connect to the Autonomous Transaction Processing database:
SQL> connect username@servicename password
sql /nolog SQLcl: Release 18.4 Production on Thu Jan 24 11:29:41 2019 Copyright (c) 1982, 2019, Oracle. All rights reserved. SQL> set cloudconfig /home/atpc/wallet_ATPC1.zip Wallet Password: ********** SQL> connect admin@atpc_medium
For more information, on the connection types specified in
tnsnames.ora, see Predefined Database Service Names for Autonomous Transaction Processing Dedicated Databases.
For information on SQLcl, see Oracle SQLcl.