Configure Codar reporting database user

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

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

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

To configure the Codar reporting database user, complete the following steps:

  1. Create a read-only user.

    Caution The user name 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 one of the following, based on the database you are using with Codar:

    Oracle

    Run the following commands to create the CodarReportingDBRole role and CodarReportingDBUser user:

    Create user CodarReportingDBUser identified by CodarReportingDBUser;
    Create role CodarReportingDBRole;
    Grant CREATE SESSION to CodarReportingDBUser;
    Grant CodarReportingDBRole to CodarReportingDBUser;
    Alter user CodarReportingDBUser default role CodarReportingDBRole;

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

    For example, if the Codar database user is named CodarDBUser, run the following command:

    Grant CREATE ANY SYNONYM to CodarDBUser

    Microsoft SQL

    Add a reporting database user (CodarReportingDBUser) to the Codar database with no roles:

    CREATE LOGIN CodarReportingDBUser WITH PASSWORD = '<codarreportingdbuser_password>';
    CREATE USER CodarReportingDBUser FOR LOGIN CodarReportingDBUser WITH DEFAULT_SCHEMA = codar;

    PostgreSQL

    From the psql prompt, enter the following:

    CREATE ROLE CodarReportingDBUser LOGIN PASSWORD '<codarreportingdbuser_password>' NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT;
    GRANT CONNECT ON DATABASE codardb to CodarReportingDBUser;

  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 Codar. See Restart Codar for instructions.

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

    RPT_RSC_CAPACITY_V