8i | 9i | 10g | 11g | 12c | 13c | 18c | 19c | 21c | 23c | Misc | PL/SQL | SQL | RAC | WebLogic | Linux

Home » Articles » Vm » Here

Oracle Cloud : Autonomous JSON Database (AJD) - Create Service

This article provides a run through of creating a new Autonomous JSON Database (AJD) service on the Oracle Cloud.

The screens change a little with each quarterly release of Oracle Cloud. Even so, the screen shots in this article will give you a good idea of what is involved.

Related articles.

Create Autonomous JSON Database (AJD) Service

Log into Oracle Cloud.

Autonomous JSON Database (AJD) : Dashboard

Open the menu by clicking the hamburger on the top-left of the screen and click on the "Autonomous JSON Database" option.

Autonomous JSON Database (AJD) : Menu

Select the compartment you want to build the service in, then click the "Create Autonomous Database" button.

Autonomous JSON Database (AJD) : OCI Dashboard

Enter the details of the service you want to create. The default sizes will vary depending on if you are running in free tier or not. Remember to select the appropriate licensing model. Click the "Create Autonomous Database" button.

Autonomous JSON Database (AJD) : Creation Details

Wait while the service is provisioned. You will see the state is marked as "Provisioning".

Autonomous JSON Database (AJD) : Privisioning

Once complete the state changes to "Available". The details screen allows you to perform some basic operations with the service, including scale up/down, manual backups and restores from backups. Click on the "Service Console" button.

Autonomous JSON Database (AJD) : Available

You are presented with the dashboard, which will look quite empty as the service has just been provisioned. Click the "Activity" link of the left of the screen.

Autonomous JSON Database (AJD) : Console

You are presented with the activity screen, which will look relatively quiet as the service has just been provisioned. Click the "Administration" link on the left of the screen.

Autonomous JSON Database (AJD) : Activity

The administration screen allows you to perform some basic administration of the service, including downloading the client credentials wallet. Click the "Development" link of the left of the screen.

Autonomous JSON Database (AJD) : Administration

The development screen gives you access to a number of development features, including APEX and the SQL Developer Web tool. Click the "SQL Development Web" link.

Autonomous JSON Database (AJD) : Administration

Sign in with the credentials you supplied during the build.

Autonomous JSON Database (AJD) : SQL Developer Web Login

You are presented with the SQL Developer Web tool, which allows you to perform many of the operations you would normally require SQL Developer or SQLcl for.

Autonomous JSON Database (AJD) : SQL Developer Web Login

Connecting to the Autonomous JSON Database (AJD) Service Using SQL Developer

We need to download the client credentials wallet. This can be done from "Service Console > Administration > Download Client Credentials (Wallet)" or from the "DB Connection" button on the main details screen. The process is similar with each approach. Clicking the "DB Connection" button results in the following screen. Click the "Download Wallet" button.

Autonomous JSON Database (AJD) : Download Credentials

Enter a password to protect the wallet and click the "Download" button. Once downloaded, click the "Close" button on the screen.

Autonomous JSON Database (AJD) : Download Credentials

Open SQL Developer and create a new connection. Use the username and password specified when you provisioned the service. Use a connection type of "Cloud Wallet" and enter the zip file location. You can now click the "Test" or "Connect" button. You will be prompted to enter the wallet password.

Autonomous JSON Database (AJD) : SQL Developer Connection

Connecting to the Autonomous JSON Database (AJD) Service Using SQL*Plus/SQLcl

If you want to use SQL*Plus or SQLcl you will need to do a bit of setup. Start by downloading the credentials zip file as described in the previous section.

Create a location for the wallet, place the zip file into it and unzip it.

mkdir -p /tmp/ajd_wallet
cd /tmp/atp_wallet
# Download the credentials zip and place it in this new directory.
unzip Wallet_obajd.zip

Edit the "sqlnet.ora" file, specifying the correct wallet location.

cat > sqlnet.ora <<EOF
WALLET_LOCATION = (SOURCE = (METHOD = file) (METHOD_DATA = (DIRECTORY="/tmp/ajd_wallet")))
SSL_SERVER_DN_MATCH=yes
EOF

Set the TNS_ADMIN environment variable if you are using a non-standard location, as we are here.

export TNS_ADMIN=/tmp/ajd_wallet

You should now be able to connect using the wallet by specifying one of the entries provided in the "tnsnames.ora" file from the zip.

sqlplus my_user/MyPassword123@obajd_high
impdp my_user/MyPassword123@obajd_high ....

Create a New User

Log into your ATP cloud service, as described above.

Create a new user and grant it the DWROLE role if you want to make it an administrator. You can grant other roles and privileges, but the DWROLE role will give the user access to the DBMS_CLOUD package.

--DROP USER my_user CASCADE;
CREATE USER my_user IDENTIFIED BY "MyPassword123";
GRANT CREATE SESSION TO my_user;
GRANT SODA_APP TO my_user;

GRANT dwrole TO my_user;

You can now connect to the user in a similar way to that described above.

Convert to Autonomous Transaction Processing (ATP)

The Autonomous JSON Database (AJD) is an Autonomous Transaction Processing (ATP) instance with a few things restricted. You can convert it to a full ATP instance by a couple of button clicks. Remember, there will be a cost implication in doing this for a paid service.

From the Autonomous Database Details page, click on the "Change Workload Type" link.

Autonomous JSON Database (AJD) : Details

From the Autonomous Database Details page, click on the "Change Workload Type" link.

Autonomous JSON Database (AJD) : Change Workload Type

Using SODA

If you are using the Autonomous JSON Database (AJD), you will need to understand SODA (Simple Oracle Document Access), as that will be the main way you interact with the database. There are a number of APIs available to support various languages, but here are some articles to get you started.

Loading Data

Some methods for loading data into Autonomous Databases are listed below.

Considerations

For more information see:

Hope this helps. Regards Tim...

Back to the Top.