Create Cloud Credentials

AWR Hub use cloud credentials to function, follow these steps to create and configure the credentials:

  1. Generate API keys for the IAM user by clicking Add API key, and then download the private and public keys for future reference. For information, see How to Generate an API Signing Key.
  2. After the API key is added, click the Actions menu for the key, select View configuration file, and then copy and save the contents locally.
  3. Run one of the following scripts to create an OCI User principal-based credential. Select the correct script based on the database type you are adding to AWR Hub:
    • ADB-D (ATP-D, LH-D) databases: Run the following script using the ADMIN database user to create an OCI User principal-based credential in ADB-D (ATP-D/LH-D) that you want to register as an AWR source database.
      
      BEGIN                                                                                                                     
        DBMS_CLOUD.CREATE_CREDENTIAL(
          credential_name => 'AWRHUB_KEY_NEW',                                                                                                                                                                               
          user_ocid       => '<user_ocid>',                                                                                                                           
          tenancy_ocid    => '<tenancy_ocid>',                                                                                                                         
          private_key     => '<content of the private key file (excluding -----BEGIN RSA PRIVATE KEY----- / -----END RSA PRIVATE KEY----->',
          fingerprint     => '<finger_print>') ;
       END ;/
    • 19c databases:
      1. Log in via SQL Plus / as sysdba, and then create a new database user on the 19c database.
        CREATE USER <DBUserName> IDENTIFIED BY <DBPassword>;
        GRANT EXECUTE ON DBMS_AWRHUB TO <DBUserName>;
        GRANT CREATE SESSION, ALTER SESSION TO <DBUserName>;
        GRANT SELECT_CATALOG_ROLE TO <DBUserName>;
        GRANT EXECUTE ON DBMS_CLOUD TO <DBUserName>;
      2. Log in via SQL Plus using the database user credentials above, and then create credentials on the 19c database using the following procedure:
        BEGIN                                                                                                                     
          DBMS_CLOUD.CREATE_CREDENTIAL(
            credential_name => 'AWRHUB_KEY_NEW',                                                                                                                                                                               
            user_ocid       => '<user_ocid>',                                                                                                                           
            tenancy_ocid    => '<tenancy_ocid>',                                                                                                                         
            private_key     => '<content of the private key file (excluding -----BEGIN RSA PRIVATE KEY----- / -----END RSA PRIVATE KEY----->',
            fingerprint     => '<finger_print>') ;
         END ;/