Configure the CSA Reporting Database User

This section explains how to configure the CSA reporting database user and role and run the schema installation script to define a read-only user required to use the reporting capabilities of CSA.

If you already configured the CSA reporting database user and role and defined the CSA reporting database user when running the installer or upgrade installer, you do not need to repeat these steps (the CSA reporting database user is already configured).

If you installed or upgraded CSA but did not configure the CSA reporting database user during the installation or upgrade and want to use the reporting capabilities of CSA, complete the tasks in this section.

Create the CSAReportingDBUser

To configure the CSA reporting database user, do the following:

  1. Create a read-only user.

    Caution The username cannot contain more than one dollar sign symbol ($). For example, c$adb is a valid name but c$$adb and c$ad$b are not valid names.

    For example, do the following, based on the database you are using with CSA:

    Oracle

    Run the following commands to create the CSAReportingDBRole role and CSAReportingDBUser user:

    Create user CSAReportingDBUser identified by CSAReportingDBUser;
    Create role CSAReportingDBRole;
    Grant CREATE SESSION to CSAReportingDBUser;
    Grant CSAReportingDBRole to CSAReportingDBUser;
    Alter user CSAReportingDBUser default role CSAReportingDBRole;

    You will also need to add the CREATE ANY SYNONYM privilege to the CSA database user. This allows the CSA database user to create synonyms for the CSA reporting (read-only) database user.

    For example, if the CSA database user is named CSADBUser, run the following command:

    Grant CREATE ANY SYNONYM to CSADBUser

    Microsoft SQL

    Add a reporting database user (CSAReportingDBUser) to the CSA database with no roles:

    CREATE LOGIN CSAReportingDBUser WITH PASSWORD = '<csareportingdbuser_password>';
    CREATE USER CSAReportingDBUser FOR LOGIN CSAReportingDBUser WITH DEFAULT_SCHEMA = csa;

    PostgreSQL

    From the psql prompt, enter the following:

    CREATE ROLE CSAReportingDBUser LOGIN PASSWORD '<csareportingdbuser_password>' 
    NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT;				
    GRANT CONNECT ON DATABASE csadb to CSAReportingDBUser;
  2. Run the following script:

    Oracle

    CSA_HOME/scripts/reporting/oracle/grant-reporting-user.sql

    Microsoft SQL

    CSA_HOME\scripts\reporting\mssql\grant-reporting-user.sql

    PostgreSQL

    CSA_HOME/scripts/reporting/postgresql/grant-reporting-user.sql

  3. Restart CSA. See Restart CSAfor instructions.

  4. The CSA reporting database user can access the data using the following view:

    RPT_RSC_CAPACITY_V

Edit the CSAReportingDBUser Password

To modify the password for the CSA reporting database user, do the following:

  1. Run the database command to modify the CSAReportingDBUser password:

    Note: See the database vendor documentation for the database user password requirements.

    For example, do one of the following, based on the database you are using with CSA:

    Oracle:

    $ALTER USER CSAReportingDBUser IDENTIFIED BY 'newpassword'

    Microsoft SQL:

    $ALTER login CSAReportingDBUser WITH PASSWORD = 'newpassword' OLD_PASSWORD = 'oldpassword'

    PostgreSQL:

    $ALTER USER CSAReportingDBUser PASSWORD 'newpassword'

  2. Restart CSA. See Restart CSAfor instructions.