Category Archives: Cloud

Create an Always Free Autonomous Database on the Oracle Cloud

You’ve signed up for the Oracle Cloud Free Tier at https://www.oracle.com/cloud/free/ and now you want to create an Always Free Autonomous Database.

Create a new Database

These instructions should work for both (ATP) Autonomous Transaction Processing and (ADW) Autonomous Data Warehouse Databases.

After you log into your Oracle Cloud Dashboard.

  1. Click on the “Create an ATP database” box. (Or the “Create an ADW database” box if you want a data warehouse)
  2. Choose the compartment you want to use.
  3. Fill in the “Display Name” field.  This name will be displayed in the GUI lists and drop down selection boxes in your Oracle Cloud dashboard.  You can change this later.
  4. Fill in the “Database Name” field.  This name will be used as the permanent ID for this database.  It will show up in places such as the auto-generated TNSNAMES.ORA file that you’ll download in another step.  You can not change this later, so choose wisely.
  5. In the “Choose a workload type” section, make sure the correct workload type is selected..
  6. Since we want to create an Always Free Database, leave “Shared Infrastructure” selected in the “Choose a deployment type” section.
  7. Make sure the “Always Free” selector is turned on.  This will lock in the options for an Always Free instance.  (20 GB of storage and 1 OCPU)
  8. Scroll down to the “Create administrator credentials” section and enter a Strong password for your Admin account.
    You will use the Admin account to connect to your Autonomous Database instead of SYS or System.
  9. Under the “Choose a license type” section make sure “License Included” is selected.
  10. Click the “Create Autonomous Database” button.

Your new ATP instance will be provisioned.  The orange box will turn green once it has been provisioned and is available to use.

While you’re waiting, check that you see the Always Free tag next to your database name.  If you do not see the tag, you may want to check to see what license you created the instance under and make sure you are OK with those options or terminate the instance and create a new one with the Always Free options selected.

Once the orange box turns green and your database is available, you will want to connect to it.

The Oracle Autonomous Cloud Databases are setup with a little extra security.  In order to connect you will need to use a wallet credentials file.

Download the Oracle Credentials file

There are a couple different ways to get the wallet file through the Cloud Dashboard.

From the Details page
    1. Click on the “DB Connection” button.
    2. On this form you will find a list of the auto-generated TNSNAMES entries and connection strings that you can use to connect to your database.  There is a link to the documentation explaining the difference between the entries.  For typical transactions I like to use the one ending in _TP.
    3. Click the “Download Wallet” button.
    4. Create a password that will be used to access the .zip file.
    5. Click the “Download” button.

      Remember the location where you save your wallet file, you will need it when we test the connection.
    6. Save the .zip file to a secure location.  This file is used to access your database so keep it secure.
From the Service Console

You can get to the Service Console for your Database instance either from the Details page

or from the menu for the instance in the Autonomous Transaction Processing Database list.

Once your in the service Console

  1. Click on “Administration”.
  2. Click on “Download Client Credentials (Wallet)”.
  3. Create a password that will be used to access the .zip file.
  4. Click the “Download” button.
Important Wallet Security Information

All wallets downloaded with either method will create a copy of the *SAME WALLET* even if you use different passwords for the .zip file.

You can rotate the wallet from your database instance details page.  Read the docs.

  1. Click the “DB Connection” button.
  2. Press the “Rotate Wallet” button and follow the instructions.

Connect to the Database

SQLcl is a great tool for making a quick and easy connection to the new database.

  1. Start SQLcl in ‘nolog’ mode
  2. Set the location of your .zip file in the cloudconfig variable.
  3. Connect to your database using the password you set for the Admin account.
  4. Run a test query

Enjoy

Your new Always Free Oracle Autonomous Database is running and you are able to connect.  Now you can start building your application.

If you have an questions please post them in the comments and I’ll do my best to help you find an answer.

Create an Always Free Compute VM on the Oracle Cloud

You’ve signed up for an Oracle Cloud Free Tier at https://www.oracle.com/cloud/free/ and now you want to deploy an app to a virtual machine compute instance.

Prerequisite

You will need an SSH key pair.  You can use an existing key or you can generate a new one.

Create a new Compute instance

After you log into your Oracle Cloud Dashboard.

  1. Click on the “Create a VM instance” box
  2. In the form that opens, you can give your new instance a name that makes sense for your project or use the default name
  3. Click “Show Shape, Network and Storage Options”
  4. Make sure that the Always Free options are selected for:
    1. Availability Domain
    2. Instance Type
    3. Instance Shape
  5. Choose the compartment you want to use for your cloud network objects for both:
    (If you have not created a Virtual cloud network in your selected compartment, the system will create it for you.)

    1. Virtual cloud network compartment
    2. Subnet compartment
  6. If you would like a public IP assigned when the instance is created select the option “Assign a public IP address”
  7. In the “Add SSH key” section you can add your SSH public key using one of these methods:
    1. Uploading the file with the “Choose File” button
    2. Copying and pasting the key into the text field
    3. Drag the public key file into the “Drop Files Here” box
  8. Click “Show Advanced Options”
  9. Select the Compartment you would like to use for your new Compute instance
  10. Click the “Create” button

Your new Compute instance will be provisioned.  The Orange box will turn Green when it has been provisioned and is available to use.

Look in the “Instance Information” tab, in the “Primary VNIC Information” section and get your assigned “Public IP Address”.

Test with SSH

You will want to look up the best way to open an SSH connection for your operating system.

The default user that you will connect as is “OPC”.

On Linux you can test your connection using the following command:

You should see the following question asking if you are sure you want to connect to this new instance.  This should only happen the first time you establish a connection to this instance from this machine.

Type “yes” and hit enter.

You should now be connected to your new instance and can start setting it up to deploy your application.

Create a compartment in your Oracle Cloud Account

Whenever I’m working on a project, I like to keep the related objects grouped together and separated from other projects, to make my life easier.

Oracle cloud helps you to do this with compartments and making them is pretty easy.

I’m using an Oracle Cloud Free Tier for my example, if you don’t have an account you can get one at https://www.oracle.com/cloud/free/

After you log into your Oracle Cloud Dashboard.

  1. Open the Menu
  2. Scroll down and click Identity
  3. Click on Compartments
  4. Click on the Create Compartment button
  5. Fill in Name and Description
  6. Choose a parent compartment or leave it set to the root compartment
  7. Click the ‘Create Compartment’ button

Now when you create a new object such as an Autonomous Database or a Compute instance you can keep them organized in your new compartment.