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 using the Add API Key option and download the private and public key for future reference.
    Graphic shows API Keys


    Graphic shows the API Key dialog.

  2. Once the API key is added for the IAM user, click View Configuration File and copy and save the contents locally.
    Graphic shows the View Configuration file menu option.

  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 into AWR Hub:
    • ADB-D (ATP-D, ADW-D) databases: Run the following script using ADMIN database user to create an OCI User principal based credential in ADB-D (ATP-D/ ADW-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. Login via SQL Plus / as sysdba and then Create a new DB 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. Login via SQL Plus using the DB user credentials above and 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 ;/