Professional Documents
Culture Documents
ADB HOL # 3-2 - Connect With SQL - Plus - Oracle Community
ADB HOL # 3-2 - Connect With SQL - Plus - Oracle Community
Created by TakeshiNagakubo-Oracle on Dec 17, 2019 5:58 AM.Last modified by TakeshiNagakubo-Oracle on Feb 17, 2020 2:47 AM.
This chapter assumes that the virtual machine created by this procedure is accessed using Tera Term.
Also, prepare the credentials file of the ADB instance to connect to in advance.
Workflow
1. Editing configuration files
2. Connect to ADB
2-1. Start Tera Term and log in to the virtual machine as an opc user.
2-2. Drag and drop the credential file ( wallet_atp01.zip) onto the Tera Term window screen.
2-4. Check the home directory of the opc user and confirm that Wallet_atp01.zip has been transferred. (If the file exists, it is OK.)
$ ls
3. Move the credential file uploaded earlier to the oracle user and change the file owner to the oracle user.
(* In this Hands-on Lab, you will experience various operations using the oracle user unless otherwise specified.)
https://community.oracle.com/docs/DOC-1035042 1/4
13/4/2020 ADB HOL # 3-2: Connect with SQL * plus | Oracle Community
$ sudo -s
$ su-oracle
NOTE) If you want to switch the instance to connect to each application, it is easy to define a directory such as wallets_atp01 for each
instance and switch the path of the environment variable TNS_ADMIN for each application.
$ cd ~ / labs / wallets /
8. Edit the following in the sqlnet.ora file from the extracted files
Before editing: WALLET_LOCATION = (SOURCE = (METHOD = file) (METHOD_DATA = (DIRECTORY = "? / Network / admin" )))
After editing: WALLET_LOCATION = (SOURCE = (METHOD = file) (METHOD_DATA = (DIRECTORY = $ TNS_ADMIN )))
$ vi sqlnet.ora
<< Edit with vi >>
$ cat sqlnet.ora
WALLET_LOCATION = (SOURCE = (METHOD = file) (METHOD_DATA = (DIRECTORY = $ TNS_ADMIN)))
SSL_SERVER_DN_MATCH = yes
$
2. Connect to ADB
username: admin
password: Welcome12345 # (value specified when creating the instance)
https://community.oracle.com/docs/DOC-1035042 2/4
13/4/2020 ADB HOL # 3-2: Connect with SQL * plus | Oracle Community
conn_string: atp01_low (connection service name)
2. Execute the sample command as a trial. Here we are checking the version of this instance as an example.
SQL> exit
Similar to SQL * Plus but with more features than SQL * Plus
Easy connection to Autonomous Database.
1. Start SQLcl.
$ sql / nolog
3. Connect.
(0 ratings)
0 Comments
https://community.oracle.com/docs/DOC-1035042 3/4
13/4/2020 ADB HOL # 3-2: Connect with SQL * plus | Oracle Community
Oracle Community
About Oracle Developer Community FAQ Communities Other Languages Oracle.com
Site Map Legal Notices Terms of Use Privacy Cookie Preferences Ad Choices
https://community.oracle.com/docs/DOC-1035042 4/4