4.12 Installing Oracle 19c Database on AWS

This section gives the detailed procedure for the installation of Oracle 19c database on AWS.

4.12.1 Creating Oracle Database on AWS

Perform the following steps to create Oracle database on AWS:

  1. Log in to AWS Console Portal.

  2. Go to RDS.

  3. Click Create Database to create Oracle Database in the AWS RDS environment.

  4. Choose the Templates as Developer/Test deployment.

  5. Under Connectivity select Connect to an EC2 compute resource and create database.

  6. Create EC2 instance and connect it to the above-created Database.

    To create EC2 instance do the following steps:

    1. Go to RDS and launch an instance.

    2. For engine, set below mentioned Inbound and Outbound rules:

      • Select All traffic access to all the instances within the private subnet is to be set under Inbound and Outbound rules.

      • Port 443 to be added under Outbound rules to access the Internet.

      • Port 1521 rule will be created under Outbound rules, when Actions > Network settings > Connect RDS Database is selected.

    3. For remote desktop connection (here we can deploy designer and SQLDeveloper), set the same Inbound and Outbound rules mentioned in step 6.b.

4.12.2 Setting up RDP and Installing all the required components

Perform the following steps to setup RDP:

  1. Open Windows power shell in the local machine and run the below commands to connect to RDP:

    • pfsso -s 8 --tokenmode "SMS OTP" -a -u <official emailid>
    • set AWS_PROFILE=966502642621_Fed_Account_Admin
    • (Optional) To check if login is successful:

      aws s3 ls
    • Initialize-AWSDefaultConfiguration -ProfileName 966502642621_Fed_Account_Admin -Region us-east-1
    • aws ssm start-session --target i-0d500f3a877fa5cea --document-name AWS-StartPortForwardingSession --parameters "localPortNumber=54231,portNumber=3389" --region us-east-1
  2. Connect to RDP and perform the following steps:

    1. Install SQLDeveloper and Designer, then deploy Oracle driver in that designer.

    2. Open SQL Developer and click to add a new connection.

    3. Enter the Name of database.

    4. Under User Info tab, specify Username, and Password.

    5. Under Details tab, provide the hostname as shown in the format below:

      <DB instance ID>.<random-value-by-aws>.<region>.<service>.amazonaws.com

      For example, oracle-database-1.chdgsn3tntnw.us-east-1.rds.amazonaws.com

    6. Specify the Port number.

      NOTE:By default, the port number is 1521.

    7. Select Service Name and enter the service name.

    8. Click on Test, then Connect.

    9. Right-click on the database and click Open SQL Worksheet.

    10. In the Worksheet run the commands in the install scripts for creating a user and granting permissions/privileges to the user created.

    11. Logout of SQLDeveloper and log in again as the user created in Step 2.j right-click on the oracle database and click Open SQL Worksheet. The user name should be the Database Administrator which gets created as part of the deployment of Oracle Database for Oracle AWS server.

    12. From the install script copy all the contents from CREATE A DATABASE till the end of the script. Paste the copied content in the Query Tool and run the query.