Using Oracle Autonomous Database Serverless 121 130
Using Oracle Autonomous Database Serverless 121 130
See View TNS Names and Connection Strings for an Autonomous Database
Instance for information on viewing and copying connection stings.
2. Start Oracle SQL Developer and in the connections panel, right-click Connections
and select New Database Connection....
3. Choose the Connection Type Custom JDBC.
4. Enter the following information:
• Name: Enter the name for this connection.
• Username: Enter the database username. You can either use the default
administrator database account ADMIN provided as part of the service or create
a new schema, and use it.
• Password: Enter the password for the database user.
• Connection Type: Select Custom JDBC.
• Custom JDBC URL: Enter the following:
jdbc:oracle:thin:@ followed by the connection string you copied in step one.
For example, a sample value for the Custom JDBC URL field is:
jdbc:oracle:thin:@(description= (retry_count=20)(retry_delay=3)
(address=(protocol=tcps)
(port=1521)(host=adb-preprod.us-phoenix-1.oraclecloud.com))
(connect_data=(service_name=u9adutfb2_fmexample1_medium.adb.oraclecl
oud.com))
(security=(ssl_server_dn_match=yes)))
When you copy the connection string, the values for region and databasename are
for your Autonomous Database instance.
5. Click Connect to connect to the database.
3-44
Chapter 3
Connect to Autonomous Database
Note:
If you are using Microsoft Active Directory, then for Username enter the Active
Directory "AD_domain\AD_username" (you may include double quotes), and for the
Password, enter the password for the Active Directory user. See Use Microsoft
Active Directory with Autonomous Database for more information.
Connect Oracle SQL Developer (earlier than Version 18.2) with a Wallet (mTLS)
Oracle SQL Developer is a free integrated development environment that simplifies the
development and management of Oracle Database in both traditional and cloud
deployments.
SQL Developer versions after SQL Developer 17.4.1 (or later) can connect to Autonomous
Database using an Oracle Wallet and this version contains enhancements for key
Autonomous Database features. Oracle SQL Developer and later provides support for wallet
files using the Cloud PDB Connection Type. Oracle recommends that you use version 18.2
(or later); however, earlier versions of SQL Developer will work with Autonomous Database.
3-45
Chapter 3
Connect to Autonomous Database
Note:
Versions of SQL Developer starting with 18.2.0 do not require that you
enter a Keystore Password and do not provide this field. For more
information, see Connect Oracle SQL Developer with a Wallet (mTLS).
Note:
If you are using Microsoft Active Directory with your database, then for
Username enter the Active Directory "AD_domain\AD_username" (you
may include double quotes), and for the Password, enter the password
for the Active Directory user. See Use Microsoft Active Directory with
Autonomous Database for more information.
3-46
Chapter 3
Connect to Autonomous Database
Enter password:
Last Successful login time: Wed Nov 18 2020 12:36:56 -08:00
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.5.0.0.0
SQL>
Notes:
Note:
See Update your Autonomous Database Instance to Allow both TLS and mTLS
Authentication for information on allowing TLS connections.
3-47
Chapter 3
Connect to Autonomous Database
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'
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):
3-48
Chapter 3
Connect to Autonomous Database
lecloud.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.
sql -oci
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 database.
1. Start SQLcl with the /nolog option.
3-49
Chapter 3
Connect to Autonomous Database
sql /nolog
For example:
sql /nolog
2. Configure the SQLcl session to use a proxy host and your Oracle Wallet:
SQL> set cloudconfig -proxy=proxyhost:port directory/client_credentials.zip
For example:
sql /nolog
3-50
Chapter 3
Connect to Autonomous Database
Note:
If you are connecting to Autonomous Database 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.
For more information, on the connection types specified in tnsnames.ora, see Manage
Concurrency and Priorities on Autonomous Database.
For information on SQLcl, see Oracle SQLcl.
Note:
See Update your Autonomous Database Instance to Allow both TLS and mTLS
Authentication for information on allowing TLS connections.
You can use SQLcl version 4.2 or later with Autonomous Database. Download SQLcl from
oracle.com.
If you use JDBC Thin Driver, prepare for JDBC Thin connections. See Prepare for JDBC Thin
Connections.
To connect using a JDBC Thin Driver with TLS authentication, do the following to connect to
the database.
1. 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.
2. Start SQLcl and connect to the database:
3-51
Chapter 3
Connect to Autonomous Database
On UNIX/Linux start sql with the connection string, enclosed in quotes on the
command line, as follows:
sql username/password@'my_connect_string'
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 -
Production
Version 19.12.0.1.0
SQL>
On Windows, start sql with the /nolog option and then connect with the copied
connection string, as follows (as compared to UNIX/Linux, on Windows do not
surround the connection string with quotes):
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 -
Production
3-52
Chapter 3
Connect to Autonomous Database
Version 19.12.0.1.0
SQL>
Note:
If you are connecting to Autonomous Database 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.
3-53