Cloud

This topic explains the required steps to connect to Exadata VM Cluster, Exadata Database, and Autonomous Database.

  • Obtain Exadata Infrastructure Networking Details
    1. From the Oracle Database@AWS dashboard, select Exadata VM clusters. From the resource list, select the VM cluster name link.
    2. Expand the Virtual machines section to review details about your virtual machines.
    3. Select the specific Virtual machine name link of the VM you want to connect.
    4. Take a note of the Private IP address from the Summary section.

    Connect to the Exadata VM Cluster (using SSH)

    This topic explains the required steps to create an Amazon EC2 instance within the same VPC as Exadata VM Cluster, generate an SSH key pair and configure connectivity to Exadata VM Cluster through the OCI console.
    1. Create an Amazon EC2 Linux Instance
      1. Create an Amazon EC2 Linux instance in a VPC peered with an ODB Network where your Exadata VM Cluster resides.
      2. Assign an Elastic IP ( Public IP) to your Amazon EC2 instance.
      3. Download and securely store the SSH private key (.pem) file that is generated during the Amazon EC2 instance creation process.
    2. Connect to Amazon EC2
      1. Based on your operating system, complete the following substeps:
        1. Mac OS:
          1. Run the following command from your terminal to change your directory to the location where your PEM key is stored:
            cd /path/to/your/pem/file
          2. Run the following command from your terminal to modify the permissions of your .pem file to restrict access:
            chmod 400 DemoClient.pem
            Note

            Replace the DemoClient.pem with your file name before running the command.
          3. Run the following command to use the Elastic IP to connect to Amazon EC2 instance.
            ssh -i DemoClient.pem ec2-user@<EC2-Elastic-IP>
            Note

            Replace <EC2-Elastic-IP> with the Elastic IP or public IP of your Amazon EC2 instance before running the command.
          4. Once you log into your Amazon EC2 instance, run the following command on the Amazon EC2.
        2. Windows:
          1. Run the following command from your PowerShell or Command Prompt to change your directory to the location where your .pem file is stored:
            cd "C:\path\to\your\pem\file"
          2. Check the permissions. This step is optional.
            Note

            Windows doesn’t use the chmod command. Hoewever, you can ensure that only your user account has access to the PEM file. Right-click the file, select Properties, and then navigate to the Security tab to adjust the permissions.
          3. Run the following SSH command.
             ssh -i DemoClient.pem ec2-user@<EC2-Elastic-IP>
            Note

            • Replace the DemoClient.pem with your file name before running the command.
            • Replace <EC2-Elastic-IP> with the Elastic IP or public IP of your Amazon EC2 instance before running the command.
          4. Once you log into your Amazon EC2 instance, run the following command on the Amazon EC2.
    3. Connect from Amazon EC2 to Exadata VM Cluster Using SSH
      1. Copy your Exadata VM Cluster's private key into the Amazon EC2 instance.
      2. Change your directory to the location where your private key file is copied.
      3. Run the following command from your terminal to change the permissions of your private key to give only the owner read access and restrict access for all other users and groups.
        chmod 400 DemoExadataVm1.pem
        Note

        Replace the DemoExadataVm1.pem with your file name before running the command.
      4. Run the following command to connect to your VM using the Private IP address of your cluster.
        ssh -i ~/DemoExadataVm1.pem <exadata_user>@<Exadata-VM-Private-IP>
        Note

        • Replace <exadata_user> with your user information that you have for your Exadata before running the command.
        • Replace <Exadata-Private-IP> with your Private IP address of Exadata VM Cluster before running the command.
  • Add a New Rule to the Security Group
    1. From the AWS console, select the Amazon EC2 service.
    2. From the Instances section, select the Instances tab.
    3. From the Instances list, select the Instance ID link, and then select the Security tab.
    4. Expand the Outbound section, and then select the Outbound rules.
    5. Select the outbound rule that you are using, and then select the Edit outbound rules button.
    6. From the Edit outbound rules page, complete the following substeps:
      1. From the Type dropdown list, select Custom TCP.
      2. Enter 1521 into the Port Range field.
      3. From the Destination dropdown list, select Custom, and then enter your CIDR range
      4. The Description field is optional. You can enter a description which helps to identify it easier.
      This screenshot shows the required steps for Security Group
    7. Review your information, and then select the Save Rules button.

    To learn how to add Egress rule for Amazon EC2 windows security group, see Configure security group rules.

    Connect from SQL Developer to Exadata Database
    • Ensure your Windows EC2 instance can reach the Exadata Database Server
    • Test basic connectivity. Since ping won’t work (as it uses ICMP, not TCP), you can use tools like tnsping, or telnet to port 1521/1522, or test with SQL*Plus.
    1. Launch the SQL Developer application and select the + icon to create a new database connection.
    2. To configure SQL Developer, complete the following substeps:
        1. In the Name field, enter the Name to use for this database connection.
        2. In the Database Type field, select Oracle.
        3. In the Username field, enter the name of the user for whom this database connection is being created. For example, you can enter ADMIN.
        4. In the Password field, enter the password of the user.
        5. In the Role field, select the default role to assign to the user.
        6. Select the Save Password checkbox if your security rules allow.
        7. In the Connection Type field, select the Basic option as your database connection type.
        8. Enter the Hostname information by providing your Exadata Database private IP address.
        9. You can enter 1521 as the Port information or provide your listener port.
        10. Enter a descriptive Service name.
        11. Select the Test button. The Status at the bottom of the connections list should show Success. If the connection is not successful, the wallet may be out of date or the Exadata Database may not be running.
        12. Once the connection is successful, select the Save button.
        This screenshot shows how to configure SQL Developer.
  • Prerequisites:
    • To connect to Autonomous Database from SQL Developer, ensure that the EC2 instance has an egress rule allowing outbound traffic on port 1521.
    • Download and install SQL Developer on the Amazon EC2 instance.
    There are two ways to connect to your Autonomous Database:
    1. Using a Wallet import.
    2. Using manual TNS configuration.
    1. Using a Wallet Import
      1. To download the Wallet, complete the following substeps:
        1. Navigate to the OCI console, select Oracle Database, and then select Autonomous Database on Dedicated Infrastructure.
        2. From the left menu, select Autonomous Database, and then select your Compartment.
        3. From the list, select the database that you want to connect.
        4. Select the Database connection button, and then select the Download wallet button.
        5. On the Download wallet page, enter a wallet password in the Password field and confirm the password in the Confirm password field.
        6. Select Download to save the client security credentials zip file. By default the file name is: Wallet_ databasename .zip. You can save this file as any file name you want.
      2. To transfer the wallet to Amazon EC2, complete the following substeps:
        1. Upload the Wallet_<dbname>.zip file to your Amazon EC2 Windows instance.
          Note

          You can use RDP file copy, WinSCP, Amazon S3, or any other secure method.
        2. Save the file an accessible directory. For example: C:\ADB_Wallet\
      3. To extract the wallet, complete the following substeps:
        1. Right-click the .zip file, and then select Extract All.
        2. Make sure that the folder contain the following files:
          1. cwallet.sso
          2. ewallet.p12
          3. sqlnet.ora
          4. tnsnames.ora
          5. tnsnames.ora
          6. tnsnames_connection_string.txt
          7. truststore.jks
      4. To review tnsnames.ora, complete the following substeps:
        1. Launch the tnsnames.ora file in Notepad.
        2. Note the service names. For example :
          <dbname>_high = (description= (address=(protocol=tcps)(port=1522)(host=<adb_host>)) (connect_data=(service_name=<dbname>_high.adb.<region>.oraclecloud.com)) (security=(ssl_server_dn_match=yes)))

        These service names (_low, _medium, _high, _tpurgent) correspond to workload profiles.

      5. To configure SQL Developer, complete the following substeps:
          1. In the Name field, enter the Name to use for this database connection.
          2. In the Database Type field, select Oracle.
          3. In the Username field, enter the name of the user for whom this database connection is being created. For example, you can enter ADMIN.
          4. In the Password field, enter the password of the user.
          5. In the Role field, select the default role to assign to the user.
          6. Select the Save Password checkbox if your security rules allow.
          7. In the Connection Type field, select the Cloud Wallet option as your database connection type.
          8. From the Configuration File dropdown list, select your wallet that you previously downloaded.
          9. From the Service dropdown list, select your service that you are using.
          10. Select the Test button to test that the data your provided will allow the specified user to connect to the database.
            Note

            The Status must show the Success message. If the connection is not successful, it may be because the wallet is out of date or your ADB is not currently running.
          11. When it is complete, select the Save button, and then select the Connect button.
          This screenshot shows the steps how to connect to Autonomous Database.
    2. Using Manual TNS Configuration
      Note

      There are prerequisites that must be completed for the manual connection. You need to complete the following:
      • You must obtain the IP address, and database service name to connect. For more information, see Cloud.
      • You must obtain the service name from the tnsnames.ora file. For more information, see Step 4 in the Using a Wallet Import section.
      1. Launch the Oracle SQL Developer application, and then select the green plus (+) button .
      2. To configure your database connection, complete the following substeps:
        1. In the Name field, enter the Name to use for this database connection.
        2. In the Database Type field, select Oracle.
        3. In the Username field, enter the name of the user for whom this database connection is being created. For example, you can enter ADMIN.
        4. In the Password field, enter the password of the user.
        5. In the Role field, select the default role to assign to the user.
        6. Select the Save Password checkbox if your security rules allow.
        7. In the Connection Type field, select the Basic option as your database connection type.
        8. From the Details tab, enter your Hostname, Port and Service name.
        9. Select the Test button to test that the data your provided will allow the specified user to connect to the database.
          Note

          The Status must show the Success message. If the connection is not successful, it may be because the wallet is out of date or your Exadata is not currently running.
        10. When it is complete, select the Save button, and then select the Connect button.
        This screenshot shows the steps of manual TNS configuration.