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. Your Amazon RDS DB instance is similar to your on-premises Oracle database.

Important

You must have an AWS account before you can create a DB instance. If you don't have an AWS account, open https://aws.amazon.com/, and then choose Create an AWS Account.

In this topic you create a sample Oracle DB instance. You then connect to the DB instance and run a simple query. Finally you delete the sample DB instance.

Creating a Sample Oracle DB Instance

In this procedure you use the AWS Management Console to create a sample DB instance. Since you are only creating a sample DB instance, each setting is not fully explained. For a full explanation of each setting, see Creating a DB Instance Running the Oracle Database Engine.

To create a DB instance running the Oracle database engine

  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.

    The Select engine page appears.

    
						Engine selection
  5. Choose the Oracle icon, and then choose Select for the Oracle Standard Edition Two edition.

  6. The Choose use case page asks if you are planning to use the DB instance you are creating for production. Choose Dev/Test and then choose Next.

    The Specify DB details page appears.

    
    					DB instance details
  7. On the Specify DB details page, provide the information for your DB instance as shown in the following table:

    For This Parameter Do This

    License model

    Choose license-included to use the general license agreement for Oracle.

    DB engine version

    Choose the most recent version of Oracle available in the list.

    DB instance class

    Choose db.t2.small. This instance class is appropriate for testing.

    Multi-AZ deployment

    For development and testing, choose No.

    Storage type

    Choose the storage type General Purpose (SSD).

    Allocated storage

    Type 20 to allocate 20 GiB of storage for your database.

    DB instance identifier

    Type oracle-instance1.

    Master username

    Type a name that you will use as the master user name to log on to your DB Instance with all database privileges. The master user name is a SQL Server Authentication login.

    Master password and confirm Password

    Type a password for your master user password. It must contain between 8 and 128 printable ASCII characters (excluding /,", and @).

  8. Choose Next to continue.

    The Configure Advanced Settings page appears.

  9. On the Configure advanced settings page, provide the information for your DB instance as shown in the following table:

    For This Parameter Do This

    Virtual Private Cloud (VPC)

    Choose Create new VPC.

    Subnet group

    Choose Create new DB subnet group.

    Public accessibility

    Choose Yes.

    Availability zone

    Choose No Preference.

    VPC security groups

    Choose Create new VPC security group.

    Database name

    Type ORCL.

    Database port

    Leave 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 in some cases a firewall might block this port. If in doubt, ask your network administrator what port you should use.

    DB parameter group

    Leave the default value.

    Option group

    Leave the default value.

    Copy tags to snapshots

    Leave this setting unselected.

    Character set name

    Choose the default value of AL32UTF8 for the Unicode 5.0 UTF-8 Universal character set.

    Enable encryption

    Choose No to enable encryption at rest for this DB instance.

    Backup retention period

    Choose 7 days.

    Backup window

    Choose No preference.

    Enhanced monitoring

    Choose Disable enhanced monitoring.

    Auto minor version upgrade

    Choose Enable auto minor version upgrade.

    Maintenance window

    Choose No preference.

  10. Choose Launch DB instance.

  11. Choose View DB instance details.

    On the RDS console, the details for new DB instance appear. The DB instance has a status of creating until the DB instance is ready to use. When the state changes to available, you can connect to the DB instance. Depending on the DB instance class and the amount of storage, it can take up to 20 minutes before the new instance is available.

    
    					My DB instances list

Connecting to Your Sample Oracle DB Instance

After Amazon RDS provisions your DB instance, you can use any standard SQL client application to connect to the instance. In this procedure you connect to your sample DB instance by using the Oracle sqlplus command line utility. To download a stand-alone version of this utility, see SQL*Plus User's Guide and Reference.

To connect to a DB Instance using SQL*Plus

  1. Find the endpoint (DNS name) and port number for your DB Instance.

    1. Open the RDS console and then choose Instances to display a list of your DB instances.

    2. Click the Oracle DB instance name to display its details.

    3. Scroll to the Connect section and copy the endpoint. Also, note the port number. You need both the endpoint and the port number to connect to the DB instance.

      
    							My DB instances list
  2. Type the following command on one line at a command prompt to connect to your DB instance by using the sqlplus utility. The value for Host is the endpoint for your DB instance, the value for Port is the port you assigned the DB instance, and the value for the Oracle SID is 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=1521))(CONNECT_DATA=(SID=ORCL)))'

    You should 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 Your Sample DB Instance

Once you are done exploring the sample DB instance that you created, you should delete the DB instance so that 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 navigation pane, choose Instances.

  3. Choose the DB instance you want to delete.

  4. For Instance actions, choose Delete.

  5. For Create final snapshot?, choose No, and select the acknowledgment.

  6. Choose Delete.

Related Topics