Cloud

This topic explains the required steps to connect to Exadata VM Cluster, Exadata Database, Autonomous AI Database on Dedicated Infrastructure, and Autonomous AI Database Serverless.

  • In an Exadata environment, you can connect to the Exadata VM Cluster that hosts the database. This topic describes the step-by-step instructions.

    1. Obtain Exadata Infrastructure Networking Details
      1. From the Oracle AI 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.
    2. 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.
        4. For SSH access (port 22): You need an inbound rule that allows SSH traffic from your specific IP address or a designated range. As a security best practice, restrict access to known IP addresses instead of allowing access from the entire internet (0.0.0.0/0).
      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 command to connect to Exadata VM Cluster using SSH step 2c.
          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 command to connect to Exadata VM Cluster using SSH step 2c.
      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.
  • To connect to your Exadata Database using Oracle SQL Developer, you must first complete the following prerequisite steps:

    1. You must configure network access so that an application or client, in this case an Amazon EC2 Windows instance running in AWS, can connect to an Oracle Database listener on port 1521, the default SQL Net port for Oracle connections.
      1. From the OCI Console, navigate to Oracle Exadata Database Service on Dedicated Infrastructure.
      2. From the left menu, select Exadata VM Clusters and then select your Exadata VM Cluster from the list.
      3. From the Database information tab, scroll down to Client security network groups section and then select the corresponding Network Security Group (NSG) that is attached to your Exadata VM Cluster.
      4. From the Network Security group page, select Security Rules and then select the Add rules button.
      5. On the Add Security Rules page, enter the following information:
        1. Select Ingress as Direction.
        2. Select CIDR as Source Type.
        3. Enter the CIDR for the Amazon EC2 Windows instance in the Source CIDR field.
        4. Select TCP as IP Protocol.
        5. Enter All in the Source Port Range field.
        6. Enter 1521 in the Destination Port Range field.
        7. Enter a description under the Allows section. For example, Allow EC2 to connect to DB on port 1521.
        8. Once you review your information, select the Add button.
        This screenshot shows how to add security rules.
    2. To obtain the connection string for your Exadata Database that you want to connect to, complete the following steps in the OCI Console.
      1. From the OCI Console, navigate to Oracle Exadata Database Service on Dedicated Infrastructure.
      2. From the left menu, select Exadata VM Clusters and then select your Exadata VM Cluster from the list.
      3. Select the Databases tab and then select the Pluggable Database or Container Database that you wish to connect to.
      4. Select the More Actions button and then select DB connection.
      5. Copy the Connection String information.
      This screenshot shows how to navigate to Database Connection.
    3. Obtain the SCAN DNS name for the connection.
      1. From the OCI Console, navigate to Oracle Exadata Database Service on Dedicated Infrastructure.
      2. From the left menu, select Exadata VM Clusters and then select your Exadata VM Cluster from the list.
      3. From the VM Cluster information tab, navigate to the Network section. Select the Copy button located next to SCAN DNS name field as it is required for the Hostname.
      This screenshot shows how to copy SCAN DNS name.
    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.
        ttttt
  • In Autonomous AI Database (Dedicated), you do not have access to the underlying virtual machines or operating system. This is by design for a fully managed, autonomous service. Instead, you can connect to the database using client tools such as Oracle SQL Developer, SQL Developer Web, or any application that supports the standard Oracle JDBC or OCI connection protocols.

    You need to have Oracle SQL Developer installed and configured on your Windows EC2 instance. For step-by-step instructions, see the Windows Systems documentation.

    There are two ways to connect to your Autonomous AI 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 AI Database, and then select Autonomous AI Database on Dedicated Infrastructure.
        2. From the left menu, select Autonomous AI 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.
  • This topic describes the steps required to connect to an Autonomous AI Database Serverless from a Jump Box (Windows EC2 Instance).

    Complete the Configure section before connecting to Autonomous AI Database Serverless.

    Note

    Add your jump box IP to the Access Control List (ACL) for Autonomous AI Database Serverless. You can add your jump box IP address when you create the database or you can navigate to existing Autonomous AI Database Serverless from AWS Console to add it your database by using the following steps:

    1. From AWS Console, select Oracle AI Database@AWS and then select Autonomous AI Databases Serverless. Select your Autonomous AI Database Serverless from the list.
    2. Select the Connectivity tab, and then select the Edit button.This screenshot shows how to add your jump box IP.
    3. From the Edit network access page, add your jump box IP address to Access Control List.

    Access Control List (ACL) provides details about how to configure network access with access control rules or a private endpoint, and describes secure client connection options. For more information, see Configure Network Access with Access Control Rules (ACLs) and Private Endpoints.

    1. Obtain Autonomous AI Databases Serverless Wallet
      1. From AWS Console, select Oracle AI Database@AWS and then select Autonomous AI Databases Serverless. Select your Autonomous AI Database Serverless from the list.
      2. From the Autonomous AI Database Serverless details page, select the Database connections button.This screenshot shows how to navigate to the database connections.
      3. From the Database connection page. enter the following information.
        1. Review the Configure authentication and connection settings for your Autonomous AI Database section.
        2. From the Download client credentials section, select Wallet type. You can choose either the Regional Wallet or Instance Wallet option.
          Note

          The Regional Wallet has the connection information for all the Autonomous AI Database Serverless instances.
        3. Select the Download wallet button to download your wallet.
          1. Enter a Password to protect the downloaded wallet.
          2. Once you enter the password, the wallet will be downloaded as .zip file. By default, the name is Wallet.zip.
          This screenshot shows how to download wallet.
    2. Connect Oracle SQL Developer to Autonomous AI Database Serverless
      1. Upload the Wallet.zip file to Jump Box.
      2. On Jump Box, launch the SQL Developer application, and then select the + icon to create a new database connection.
      3. To configure SQL Developer, complete the following substeps:
        1. In the Name field, enter a descriptive name to use for this database connection.
        2. From the Database Type dropdown list, 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 it 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. In the Configuration File field, select the Browse button to select Wallet.zip file.
        9. In the Service dropdown list, select your service to use for this connection.
        10. Select the Test button to validate connection to the database.
        11. Once the connection is successful, the Status will change to Success.This screenshot shows how to connect Oracle SQL Developer to your database.
        12. Once the connection is successful, select the Save button.
        This screenshot shows how to connect Oracle SQL Developer to your database.