0% found this document useful (0 votes)
72 views5 pages

s1102499gc10 03 Connect Adb SQL Dev

Uploaded by

ilich
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views5 pages

s1102499gc10 03 Connect Adb SQL Dev

Uploaded by

ilich
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Practice: Connecting to Autonomous Database Using

SQL Developer

Get your free cloud account: Click here.

Overview
In this practice, you connect to the Autonomous Database instance using SQL Developer.

Tasks
1. Log in to your Oracle Cloud Free Tier Account.
2. In the menu, click Autonomous Database.
3. On the Instances page, find your ATP instance (e.g., MYATP) and click Service Console in
the Actions menu.

4. This will open a new browser tab for the service console. If prompted, sign in to the
service console as admin user.
5. Click the Administration tab and click Download Client Credentials (Wallet) to download
the wallet.

Note: Specify a password of your choice for the wallet. You will need this password when
connecting to the database later. Note that this password is separate from the admin

Copyright © 2021, Oracle and/or its affiliates.

Oracle Autonomous Database Administration Workshop 1


password. You will need this password as your keystore password when connecting
JDBC thin applications.
6. Click Download to download the wallet file to your client machine.

7. Connect to the database using SQL Developer installed on your local system.
Start SQL Developer and create a connection for your database using the default
administrator account, ADMIN, by following these steps:
a. Click the Create Connection icon in the Connections toolbox on the top left of the
SQL Developer home page.

Copyright © 2021, Oracle and/or its affiliates.

2 Oracle Autonomous Database Administration Workshop


b. Enter the connection details as follows:
− Connection Name: admin_low
− Username: admin
− Password: The password you specified during instance creation
− Connection Type: Cloud Wallet
− Role: default
− Configuration File: Full path for the Client Credentials wallet file you
downloaded earlier
− Keystore Password: The password you specified when downloading the wallet
from the ATP service console.
Note: Required only if the SQL Developer version is less than 18.2
− Service: Pick myatp_low for this list (select the name corresponding to your
instance). There are three preconfigured database services for each database.
− Accept default for other fields if any
c. Test your connection by clicking the Test button. If it succeeds, save your connection
information by clicking Save.
d. Connect to your database by clicking the Connect button.
e. In SQL Developer, run this query with the admin_low connection you created just
now and note the response time.
select /* low */ c_city,c_region,count(*)
from ssb.customer c_low
group by c_city,c_region
order by count(*);
f. Make sure you click the Run Script button in SQL Developer so that all the rows are
displayed on the screen.

Copyright © 2021, Oracle and/or its affiliates.

Oracle Autonomous Database Administration Workshop 3


g. Note the response time.

Note: In this example, the query with the LOW database service finished in around 9.7
seconds.
8. Create another connection named admin_high using the same information as in step 2.
This time pick myatp_high as the service name.
a. In SQL Developer, run this query with the admin_high connection you created just
now and note the response time.
select /* high */ c_city,c_region,count(*)
from ssb.customer c_high
group by c_city,c_region
order by count(*);

Note: These two queries are basically the same except for the comment after the
select keyword and the table alias.
b. Make sure you click the Run Script button in SQL Developer so that all the rows are
displayed on the screen.

Copyright © 2021, Oracle and/or its affiliates.

4 Oracle Autonomous Database Administration Workshop


c. Note the response time.

Note: In the following example, the query with the HIGH database service finished in
around 5.4 seconds. A query running in the HIGH database service can use more
resources and run faster compared to a query running in the LOW database service.

Copyright © 2021, Oracle and/or its affiliates.

Oracle Autonomous Database Administration Workshop 5

You might also like