Connect SQL*Plus Without a Wallet

SQL*Plus is a command-line interface used to enter SQL commands. SQL*Plus connects to an Oracle database.

Note:

See Update your Autonomous Database Instance to Allow both TLS and mTLS Authentication for information on allowing TLS connections.

To install and configure the client and connect to the Autonomous Database using SQL*Plus with TLS authentication, do the following:

  1. Prepare for Oracle Call Interface (OCI) connections.

    You can use TLS authentication without a wallet in SQL*Plus if you are using the following client versions:

    • Oracle Instant Client/Oracle Database Client 19.13 - only on Linux x64

    • Oracle Instant Client/Oracle Database Client 19.14 (or later) and 21.5 (or later) - only on Linux x64 and Windows

    See Prepare for Oracle Call Interface, ODBC, and JDBC OCI Connections Using TLS Authentication for more information.

  2. Copy a connection string for the Autonomous Database.

    To connect with TLS authentication copy a TLS connection string. On the Database Connection page, under TLS Authentication, select TLS to view the connection strings for connecting with TLS authentication.

    See View TNS Names and Connection Strings for an Autonomous Database Instance for information on viewing and copying connection stings.

    See Predefined Database Service Names for Autonomous Database for information on the different databases services for each connection string.

  3. Connect using a database user and password, and provide the connection string you copied in Step 2.

    On UNIX/Linux start sqlplus with the connection string, enclosed in quotes on the command line, as follows:

    sqlplus username/password@'my_connect_string'

    For example (for clarity line breaks added):

    sqlplus adb_user/password@'(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)
    (port=1521)(host=adb.region.oraclecloud.com))
    (connect_data=(service_name=u9adutfb2ba8x4d_database_medium.adb.oraclecloud.com))
    (security=(ssl_server_dn_match=yes))'

    On Windows, start sqlplus with the database user and password with the copied connection string, as follows (as compared to UNIX/Linux, on Windows do not surround the connection string with quotes):

    sqlplus username/password@my_connect_string

    For example (for clarity line breaks added in the connection string):

    sqlplus adb_user/password@(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)
    (port=1521)(host=adb.region.oraclecloud.com))
    (connect_data=(service_name=u9adutfb2ba8x4d_database_medium.adb.oraclecloud.com))
    (security=(ssl_server_dn_match=yes))

Note:

If you are connecting to an Autonomous Database instance using Microsoft Active Directory credentials, then connect using an Active Directory user name in the form of "AD_domain\AD_username" (double quotes must be included), and Active Directory user password. See Use Microsoft Active Directory with Autonomous Database for more information.