Skip to content

Oracle Database on Amazon RDS

May 27, 2011

It’s finally there: Amazon Web Services now provides Oracle databases as a platform service, optionally including an hourly-rate licensing model! It’s called Amazon RDS for Oracle Database.

Wait a minute… Amazon provides Oracle databases in the cloud for quite some time now. What’s so special and new about this RDS (Relational Database Service) thing?

In a nutshell, this is exactly the difference between IaaS (Infrastructure as a Service, Amazon EC2) and PaaS (Platform as a Service, Amazon RDS):

  • An EC2 instance is nothing else than a virtual machine instance. It may be running anything, including a database server, maybe an Oracle database. It still needs someone doing all the stuff like upgrading/patching the OS, applying patchsets/patches/PSUs/CPUs to the Oracle database, as well as caring for things like backup, desaster recovery or replication.
  • An RDS instance moves all this infrastructure related stuff into the provider’s responsibility. Specifically, with Oracle on Amazon RDS there is no OS login at all. You can either specify some maintenance intervals for DB upgrades or opt-out of any DB upgrades. Analogously, you specify backup intervals and a backup retention time, but don’t implement the actual backup. And so on… Amazon provides you with an Oracle database platform. That’s PaaS.

If you want to try out Amazon EC2 running an Oracle databases, you may use this blog series as a starting point.

If you are interested in the new RDS offering and how this actually works, read on and stay tuned for more posts on this topic to follow.

For today, let’s have a short look into how this can be set up:

Setup an Oracle Database on RDS

If you are new to Amazon Web Services, feel free to use this post as a starting point in order to register and sign-up for RDS.

After you finished signing up for RDS, go to AWS Management Console, click on the RDS tab, and choose the region where you want to have your database running. It should look something like this:

Amazon RDS in the AWS Management Console

Amazon RDS in the AWS Management Console

 

Clicking on the “Launch DB Instance” button starts a wizard. Until a week ago, the only choice here was to launch a MySQL instance. Now it looks a bit different as entries for Oracle Standard Edition One (SE1), Standard Edition (SE) and Enterprise Edition (EE) have been added (see here for specifications of the different Oracle licensing options). As of now, RDS offers an hourly-usage based licensing for SE1 only. The other editions only offer the BYOL model which means “Bring Your Own License”, i.e. you need an appropriate Oracle license.

Oracle on Amazon RDS - Select license edition

Oracle on Amazon RDS - Select license edition

 In the next step, you can

  • choose the licensing model (as I just mentioned, at the time being it’s a proper choice only for SE1). 
  • 11.2.0.2 is the first and currently only version to be offered.
  • Multi-AZ Deployment would be quite important for desaster recovery purposes, but it’s not yet implemented, so “No” is the only choice currently.
  • With “Auto Minor Version Upgrade” you can opt-in or opt-out of having patches applied automatically.
  • “Allocated Storage” determines your maximum database size (anything between 10GB and 1TB) and – indirectly – your storage costs. You can change this afterwards. It includes data files, temp files, online redologs and archived redologs (your database will be in ARCHIVELOG mode).
  • “DB Instance Identifier” is the Oracle SID
  • “Master User” is the database user which you can use for login. This user has DBA role, but the DBA role has been a bit restricted. More on this in later post.

    Oracle on Amazon RDS - DB instance details

    Oracle on Amazon RDS - DB instance details

Next step asks for

  • the database name (server parameter db_name) which is not especially relevant, but best practice is to have it identical to the DB instance identifier (Oracle SID) from the last step.
  • the listener port. Currently it offers 3306 as default which seems to come from the MySQL world while Oracle default would normally be 1521. Feel free to choose any port you like.
  • As Multi-AZ deployment is not yet available, so we have to select one AZ for deployment: I don’t think it makes any difference which one you choose.
  • A “DB Parameter Group” is actually a set of init.ora parameters. In a later post I will talk about how to adjust them for an RDS database.
  • The “DB Security Group” determines your firewall settings, i.e. which IP addresses (for clients outside EC2) or EC2 Security Groups (for clients inside EC2) can login to your Oracle instance.

    Oracle on Amazon RDS - Additional Configuration

    Oracle on Amazon RDS - Additional Configuration

The last step determines the backup retention period and the actual time windows for backups as well as other maintenance operations:

Oracle on Amazon RDS - Management Options

Oracle on Amazon RDS - Management Options

 The final screen is just a summary. After another click it creates your instance.

Now go back to the overview dashboard, click on the “DB Instances” link to see the list of your RDS instances and look up the “Endpoint”, “Port” and “Instance Name” of your new instance. The endpoint should have the form:

rdsorcl.<somestring>.eu-west-1.rds.amazonaws.com.

Use these to setup a TNS name like this:

MYRDSDB =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = <endpoint>)(PORT = <port>))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = <instance name>)
    )
  )

You are ready to connect to your Oracle instance. And in the background it is already being backed up 🙂

More to come on this…

Advertisements

From → Oracle

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: