Logging in to your RDS Custom for Oracle database as SYS - Amazon Relational Database Service

Logging in to your RDS Custom for Oracle database as SYS

After you create your RDS Custom DB instance, you can log in to your Oracle database as user SYS, which gives you SYSDBA privileges. You have the following login options:

  • Get the SYS password from Secrets Manager, and specify this password in your SQL client.

  • Use OS authentication to log in to your database. In this case, you don't need a password.

Finding the SYS password for your RDS Custom for Oracle database

Your can log in to your Oracle database as SYS or SYSTEM or by specifying the master user name in an API call. The password for SYS and SYSTEM is stored in Secrets Manager. The secret uses the naming format do-not-delete-rds-custom-resource_id-uuid. You can find the password using the AWS Management Console.

To find the SYS password for your database in Secrets Manager
  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the RDS console, complete the following steps:

    1. In the navigation pane, choose Databases.

    2. Choose the name of your RDS Custom for Oracle DB instance.

    3. Choose Configuration.

    4. Copy the value underneath Resource ID. For example, you resource ID might be db-ABC12CDE3FGH4I5JKLMNO6PQR7.

  3. Open the Secrets Manager console at https://console.aws.amazon.com/secretsmanager/.

  4. In the Secrets Manager console, complete the following steps:

    1. In the left navigation pane, choose Secrets.

    2. Filter the secrets by the resource ID that you copied in step 5.

    3. Choose the secret named do-not-delete-rds-custom-resource_id-uuid, where resource_id is the resource ID that you copied in step 5. For example, if your resource ID is db-ABC12CDE3FGH4I5JKLMNO6PQR7, your secret will be named do-not-delete-rds-custom-db-ABC12CDE3FGH4I5JKLMNO6PQR7.

    4. In Secret value, choose Retrieve secret value.

    5. In Key/value, copy the value for password.

  5. Install SQL*Plus on your DB instance and log in to your database as SYS. For more information, see Step 3: Connect your SQL client to an Oracle DB instance.

Logging in to your RDS Custom for Oracle database using OS authentication

The OS user rdsdb owns the Oracle database binaries. You can switch to the rdsdb user and log in to your RDS Custom for Oracle database without a password.

  1. Connect to your DB instance with AWS Systems Manager. For more information, see Connecting to your RDS Custom DB instance using Session Manager.

  2. In a web browser, go to https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html.

  3. For the latest database version that appears on the web page, copy the .rpm links (not the .zip links) for the Instant Client Basic Package and SQL*Plus Package. For example, the following links are for Oracle Database version 21.9:

    • https://download.oracle.com/otn_software/linux/instantclient/219000/oracle-instantclient-basic-21.9.0.0.0-1.el8.x86_64.rpm

    • https://download.oracle.com/otn_software/linux/instantclient/219000/oracle-instantclient-sqlplus-21.9.0.0.0-1.el8.x86_64.rpm

  4. In your SSH session, run the wget command to the download the .rpm files from the links that you obtained in the previous step. The following example downloads the .rpm files for Oracle Database version 21.9:

    wget https://download.oracle.com/otn_software/linux/instantclient/219000/oracle-instantclient-basic-21.9.0.0.0-1.el8.x86_64.rpm wget https://download.oracle.com/otn_software/linux/instantclient/219000/oracle-instantclient-sqlplus-21.9.0.0.0-1.el8.x86_64.rpm
  5. Install the packages by running the yum command as follows:

    sudo yum install oracle-instantclient-*.rpm
  6. Switch to the rdsdb user.

    sudo su - rdsdb
  7. Log in to your database using OS authentication.

    $ sqlplus / as sysdba SQL*Plus: Release 21.0.0.0.0 - Production on Wed Apr 12 20:11:08 2023 Version 21.9.0.0.0 Copyright (c) 1982, 2020, Oracle. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.10.0.0.0