Friday, November 13, 2015

Running Oracle Database on Amazon RDS

Share this Post

Amazon RDS is a database service that makes it easy to setup database in the Amazon AWS cloud. Using RDS you don't need to worry about managing databases, backups, replication (in Multi-AZ mode), upgrades and other common DBA operations. Amazon will do it for you. The only drawback is that you don't have direct access to OS / File system but that is the whole idea.

In this post I will show you how to setup an Oracle database in Amazon AWS using RDS service and connect it using SQL Developer on my local machine.


Things to Remember

Amazon RDS provides you 2 choices for Oracle licences

  • License Included - This option Amazon will arrange a license for you but the hourly charge is slightly higher
  • BYOL - Bring Your Own License - This option you have to bring your own license, hourly rate is cheaper than option 1.

Note: In order to run Oracle in Amazon RDS with Free Tier you must have BYOL license for Oracle database.

Let's get started 

Creating Database in the Amazon RDS 

1. Log in to Amazon AWS Console

2. Click on the RDS under Database section in the console, 

3. First step is to add at-least 2 subnets in the DB subnet group. Click on the "Subnet Groups" on the left panel and click "add all the subnet". (Note: we are doing quick and dirty here)

4.  Click on the "Instances" in the left panel and click "Launch DB Instance"

5. Select Oracle and select 'Oracle SE One' (you can select anyone)

6. Select "No" from the choices and click Next, we are not going to use Multi-AZ deployment but in Production it is recommended

7. Enter basic details about the database such as Size of Instance, Instance name and SYSDBA account click Next Step
Note: With RDS you don't have direct access to SYSDBA and SYS users but the user you define will have the same privileges 

8. Leave the default settings for Network & Security (that is separate and huge topic, I will cover some other time) choose additional database options and Backup frequency, click Launch DB instance

9. You will get the following message if the action is successful. click View Your DB Instances.

10. It usually takes 5-10 minutes for a DB instance to ready, Click and expand to see more details about the instance and copy the END POINT address

Accessing the Database from SQL Developer

1. Open SQL Developer, Create a new connection, enter the hostname the END POINT we copied from the AWS console, enter the user name and password you mentioned during configuration.

2. Now you are all set and ready to play with Oracle DB in Amazon AWS using RDS

Have a good day,
Zeeshan Baig