Menu
Amazon Relational Database Service
User Guide (API Version 2014-10-31)

Creating an Oracle DB Instance and Connecting to a Database on an Oracle DB Instance

The basic building block of Amazon RDS is the DB instance. This environment is where you will run your Oracle databases.

Important

You must complete the tasks in the Setting Up for Amazon RDS section before you can create or connect to a DB instance.

Creating a DB Instance Running the Oracle Database Engine

The easiest way to create an Oracle DB instance is to use the RDS console. Once you have created the DB instance, you can use standard Oracle client utilities such as SQL Developer to connect to the instance.

In the following procedure, you create a DB instance running the Oracle database engine called west2-oracle1, with a db.m1.small DB instance class, 10 GB of storage, and automated backups enabled with a retention period of one day.

To launch an Oracle DB instance

  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the top right corner of the Amazon RDS console, choose the region in which you want to create the DB instance.

  3. In the navigation pane, choose Instances.

  4. Choose Launch DB Instance to start the Launch DB Instance Wizard.

    The wizard opens on the Select Engine page.

    Engine selection
  5. In the Launch DB Instance Wizard window, choose the Oracle icon, and then choose Select for the Oracle version you want to use.

  6. The Production? page asks if you are planning to use the DB instance you are creating for production. If you are, choose Yes. If you choose Yes, the failover option Multi-AZ and the Provisioned IOPS storage option are preselected in the following step.

  7. Choose Next to continue. The Specify DB Details page appears.

    DB instance details
  8. On the Specify DB Details page, specify your DB instance information. The following table shows settings for an example DB instance.

    For This ParameterDo This

    License Model

    Choose license-included to use the general license agreement for Oracle. Choose bring-your-own-license to use your existing Oracle license.

    For more information, see Oracle Licensing.

    DB Engine Version

    Choose the default version of Oracle.

    DB Instance Class

    Choose db.m3.medium for a configuration that equates to 1.7 GB memory, 1 ECU (1 virtual core with 1 ECU), 64-bit platform, and moderate I/O capacity.

    For more information, see DB Instance Class and DB Instance Class Support for Oracle.

    Multi-AZ Deployment

    Choose Yes to have a standby replica of your DB instance created in another Availability Zone for failover support. We recommend Multi-AZ for production workloads to maintain high availability. For development and testing, you can choose No.

    For more information, see High Availability (Multi-AZ).

    Allocated Storage

    Type 10 to allocate 10 GB of storage for your database. In some cases, allocating a higher amount of storage for your DB instance than the size of your database can improve I/O performance.

    For more information, see Storage for Amazon RDS.

    Storage Type

    Choose the storage type Magnetic.

    For more information, see Amazon RDS Storage Types.

    DB Instance Identifier

    Type a name for the DB Instance that is unique for your account in the region you chose. You can add some intelligence to the name, such as including the region and DB engine you chose, for example oracle-instance1.

    Master User Name

    Type a name that you will use as the master user name to log on to your DB instance with all database privileges. This user account is used to log into the DB instance and is granted the "DBA" role.

    Master User Password and Confirm Password

    Type a password that contains from 8 to 30 printable ASCII characters (excluding /,", and @) for your master user password, and then type the password again in the Confirm Password box.

  9. Choose Next to continue. The Configure Advanced Settings page appears.

    Additional Configuration panel
  10. On the Configure Advanced Settings page, provide additional information that RDS needs to launch the Oracle DB instance. The table following shows settings for an example DB instance.

    For This ParameterDo This

    VPC

    This setting depends on the platform you are on. If you are a new customer to AWS, choose the default VPC. If you are creating a DB instance on the previous E2-Classic platform, choose Not in VPC.

    For more information, see Virtual Private Clouds (VPCs) and Amazon RDS.

    DB Subnet Group

    This setting depends on the platform you are on. If you are a new customer to AWS, choose default, which will be the default DB subnet group that was created for your account. If you are creating a DB instance on the previous E2-Classic platform and you want your DB instance in a specific VPC, choose the DB subnet group you created for that VPC.

    Publicly Accessible

    Choose Yes to give the DB instance a public IP address, meaning that it will be accessible outside the VPC; otherwise, choose No, so the DB instance will only be accessible from inside the VPC.

    For more information, see Hiding a DB Instance in a VPC from the Internet.

    Availability Zone

    Use the default of No Preference.

    For more information, see Regions and Availability Zones.

    VPC Security Group

    If you are a new customer to AWS, choose the default VPC. If you have created your own VPC security group, choose the VPC security group you previously created.

    For more information, see Working with DB Security Groups.

    Database Name

    Type a name for your database that begins with a letter and contains up to 8 alpha-numeric characters. If you do not provide a name, Amazon RDS will not create a database on the DB instance you are creating. The default database name is ORCL.

    Database Port

    Use the default value of 1521 unless you have a specific port you want to access the database through. Oracle installations default to port 1521, but some firewalls block this port by default. If you are unsure, ask your system administrator what port you should use.

    Parameter Group

    Use the default value of default.oracle-ee-11.2.

    For more information, see Working with DB Parameter Groups.

    Option Group

    Choose the default value of default:oracle-ee-11-2.

    For more information, see Working with Option Groups.

    Copy Tags To Snapshots

    Choose this option to have any DB instance tags copied to a DB snapshot when you create a snapshot.

    For more information, see Tagging Amazon RDS Resources.

    Character Set Name

    Choose the default value of AL32UTF8 for the Unicode 5.0 UTF-8 Universal character set. Note that you cannot change the character set after the DB instance is created.

    Enable Encryption

    Select Yes to enable encryption at rest for this DB instance.

    For more information, see Encrypting Amazon RDS Resources.

    Backup Retention Period

    Set the number of days you want automatic backups of your database to be retained. For testing purposes, you can set this value to 1.

    For more information, see Working With Backups.

    Backup Window

    Unless you have a specific time that you want to have your database backup, use the default of No Preference.

    For more information, see Working With Backups.

    Enable Enhanced Monitoring

    Choose Yes to enable gathering metrics in real time for the operating system that your DB instance runs on.

    For more information, see Enhanced Monitoring.

    Auto Minor Version Upgrade

    Amazon RDS does not support automatic minor version upgrades for DB instances running Oracle. You must modify the DB instance manually to perform a minor version upgrade.

    Maintenance Window

    Choose the 30 minute window in which pending modifications to your DB instance are applied. If the time period doesn't matter, choose No Preference.

    For more information, see Amazon RDS Maintenance Window.

  11. Choose Launch DB Instance.

  12. On the final page of the wizard, choose Close.

  13. On the RDS console, the new DB instance appears in the list of DB instances. The DB instance will have a status of creating until the DB instance is created and ready for use. When the state changes to available, you can connect to the DB instance. Depending on the DB instance class and store allocated, it could take several minutes for the new instance to be available.

    My DB instances list

Connecting to a DB Instance Running the Oracle Database Engine

Once Amazon RDS provisions your DB instance, you can use any standard SQL client application to connect to the instance. In this example, you connect to a DB instance running the Oracle database engine using the Oracle command line tools. For more information on using Oracle, go to the Oracle website.

This example uses the Oracle sqlplus command line utility. This utility is part of the Oracle software distribution. To download a stand-alone version of this utility, go to the SQL*Plus User's Guide and Reference.

  1. Open the RDS console, then choose Instances in the left column to display a list of your DB instances.

  2. Choose the row for your Oracle DB instance to display the summary information for the instance.

  3. The Endpoint field contains part of the connection information for your DB instance. The Endpoint field has two parts separated by a colon (:). The part before the colon is the DNS name for the instance, the part following the colon is the port.

    My DB instances list
  4. Type the following command on one line at a command prompt to connect to a DB instance using the sqlplus utility. The value for Host will be the DNS name for your DB instance, the value for Port will be the port you assigned the DB instance, and the value for the Oracle SID will be the name of the DB instance's database that you specified when you created the DB instance, not the name of the DB instance.

    PROMPT>sqlplus 'mydbusr@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<endpoint>)
        (PORT=<port number>))(CONNECT_DATA=(SID=<database name>)))'

    You will see output similar to the following.

    SQL*Plus: Release 11.1.0.7.0 - Production on Wed May 25 15:13:59 2011
        					
    SQL>

Deleting a DB Instance

Once you have connected to the sample DB instance that you created, you should delete the DB instance so you are no longer charged for it.

To delete a DB instance with no final DB snapshot

  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the Instances list, choose the DB instance you wish to delete.

  3. Choose Instance Actions, and then choose Delete from the dropdown menu.

  4. Choose No in the Create final Snapshot? drop-down list box.

  5. Choose Yes, Delete.