Oracle Database Instance (RDS) on AWS


Amazon Relational Database Service (Amazon RDS) is a web service that makes it easier to set up, operate, and scale a relational database in the cloud. It provides cost-efficient, resizable capacity for an industry-standard relational database and manages common database administration tasks.
Why do you want a managed relational database service? Because Amazon RDS takes over many of the difficult or tedious management tasks of a relational database:
·        When you buy a server, you get CPU, memory, storage, and IOPS, all bundled together. With Amazon RDS, these are split apart so that you can scale them independently. If you need more CPU, less IOPS, or more storage, you can easily allocate them.
·        Amazon RDS manages backups, software patching, automatic failure detection, and recovery.
·        To deliver a managed service experience, Amazon RDS doesn't provide shell access to DB instances, and it restricts access to certain system procedures and tables that require advanced privileges.
·        You can have automated backups performed when you need them, or manually create your own backup snapshot. You can use these backups to restore a database. The Amazon RDS restore process works reliably and efficiently.
·        You can get high availability with a primary instance and a synchronous secondary instance that you can fail over to when problems occur. You can also use MySQL, MariaDB, or PostgreSQL Read Replicas to increase read scaling.
·        You can use the database products you are already familiar with: MySQL, MariaDB, PostgreSQL, Oracle, Microsoft SQL Server.
·        In addition to the security in your database package, you can help control who can access your RDS databases by using AWS Identity and Access Management (IAM) to define users and permissions. You can also help protect your databases by putting them in a virtual private cloud.
The basic building block of Amazon RDS is the DB instance. A DB instance is an isolated database environment in the cloud.  A DB instance can contain multiple user-created databases, and you can access it by using the same tools and applications that you use with a stand-alone database instance. You can create and modify a DB instance by using the AWS Command Line Interface, the Amazon RDS API, or the AWS Management Console.
Each DB instance runs a DB engine. Amazon RDS currently supports the MySQL, MariaDB, PostgreSQL, Oracle, and Microsoft SQL Server DB engines. Each DB engine has its own supported features, and each version of a DB engine may include specific features. Additionally, each DB engine has a set of parameters in a DB parameter group that control the behavior of the databases that it manages.
The computation and memory capacity of a DB instance is determined by its DB instance class. You can select the DB instance that best meets your needs. If your needs change over time, you can change DB instances
The basic building block of Amazon RDS is the DB instance. This is the environment in which you run your Oracle databases.
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 AWS Management Console, choose the AWS Region in which you want to create the DB instance.
3.     In the navigation pane, choose Databases.
If the navigation pane is closed, choose the menu icon at the top left to open it.
4.     Choose Create database to open the Select engine page.
The Oracle editions that are available vary by AWS Region.

1.     In the Select engine window, choose the Select button for the Oracle DB engine you want to use and then choose Next.
2.     The next step asks if you are planning to use the DB instance you are creating for production. If you are, choose Production. When you choose Production, the following are preselected in a later step:
·        Multi-AZ deployment failover option
·        Provisioned IOPS storage option
·        Enable deletion protection option
3.     Choose Next to continue. The Specify DB details page appears.
On the Specify DB details page, specify your DB instance information.
4.     Choose Next to continue. The Configure advanced settings page appears.
On the Configure advanced settings page, provide additional information that RDS needs to launch the DB instance.
5.     Choose Create database.
6.     On the final page, choose View DB instance details.
On the RDS console, the details for the new DB instance appear. The DB instance has 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 storage allocated, it could take several minutes for the new instance to be available.
After Amazon RDS provisions your Oracle DB instance, you can use any standard SQL client application to connect to the DB instance. In this topic, you connect to a DB instance that is running the Oracle database engine by using Oracle SQL Developer or SQL*Plus.
Each Amazon RDS DB instance has an endpoint, and each endpoint has the DNS name and port number for the DB instance. To connect to your DB instance using a SQL client application, you need the DNS name and port number for your DB instance.
You can find the endpoint for a DB instance using the Amazon RDS console or the AWS CLI.
To find the endpoint using the console
1.     Sign in to the AWS Management Console and open the Amazon RDS console athttps://console.aws.amazon.com/rds/.
2.     In the upper-right corner of the console, choose the AWS Region of your DB instance.
3.     Find the DNS name and port number for your DB Instance.
a.     Choose Databases to display a list of your DB instances.
b.     Choose the Oracle DB instance name to display the instance details.
c.     On the Connectivity tab, copy the endpoint. Also, note the port number. You need both the endpoint and the port number to connect to the DB instance.
In this procedure, you connect to your DB instance by using Oracle SQL Developer..
To connect to your DB instance, you need its DNS name and port number. For information about finding the DNS name and port number for a DB instance
To connect to a DB instance using SQL Developer
1.     Start Oracle SQL Developer.
2.     On the Connections tab, choose the add (+) icon.
3.     In the New/Select Database Connection dialog box, provide the information for your DB instance:
·        For Connection Name, enter a name that describes the connection, such as Oracle-RDS.
·        For Username, enter the name of the database administrator for the DB instance.
·        For Password, enter the password for the database administrator.
·        For Hostname, enter the DNS name of the DB instance.
·        For Port, enter the port number.
·        For SID, enter the Oracle database SID.
The completed dialog box should look similar to the following.
4.     Choose Connect.
5.     You can now start creating your own databases and running queries against your DB instance and databases as usual. To run a test query against your DB instance, do the following:
              In the Worksheet tab for your connection, enter the following SQL query.

SELECT NAME FROM V$DATABASE;

Choose the execute icon to run the query.

SQL Developer returns the database name.

You can use a utility like SQL*Plus to connect to an Amazon RDS DB instance running Oracle.
To connect to your DB instance, you need its DNS name and port number..
Example To connect to an Oracle DB instance using SQL*Plus
In the following examples, substitute the user name of your DB instance administrator. Also, substitute the DNS name for your DB instance, and then include the port number and the Oracle SID. The SID value is the name of the DB instance's database that you specified when you created the DB instance, and not the name of the DB instance.

sqlplus user_name@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dns_name)(PORT=port))(CONNECT_DATA=(SID=database_name)))

You should see output similar to the following.
SQL*Plus: Release 12.1.0.2.0 Production on Mon Aug 21 09:42:20 2017                

After you enter the password for the user, the SQL prompt
appears.

SQL>

Note
The shorter format connection string (Easy connect or EZCONNECT), such as sqlplus USER/PASSWORD@LONGER-THAN-63-CHARS-RDS-ENDPOINT-HERE:1521/DATABASE_IDENTIFIER, might encounter a maximum character limit and should not be used

Comments

Post a Comment