31.1 Manually Generating the Database Schema

You can recreate the database tables after installation without having to reinstall.

  1. Stop the application server, such as Tomcat. For more information, see Stopping, Starting, and Restarting Tomcat.

  2. (Conditional) Delete the existing database.

  3. (Conditional) Create a new database with the same name as the one that you deleted in Step 2.

  4. (Conditional) Clear the database checksums.

    1. Log in to your database as idm_rpt_cfg.

    2. Execute the following command for PostgreSQL:

        DO
      $do$
       BEGIN
        IF EXISTS
         (select table_name from information_schema.tables where table_schema = 'public' and table_name = 'databasechangelog')
        THEN
         update databasechangelog set md5sum = null;
        END IF;
      END $do$

      or

      Execute the following command for Oracle:

        BEGIN
       FOR i IN
        (select null from ALL_TABLES where OWNER = user and TABLE_NAME = 'DATABASECHANGELOG')
       LOOP
        EXECUTE IMMEDIATE 'update DATABASECHANGELOG set MD5SUM = NULL';
       END LOOP;
      END;

      or

      Execute the following command for MSSQL:

      IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'DATABASECHANGELOG')
      UPDATE idm_rpt_cfg.DATABASECHANGELOG
      SET MD5SUM = NULL
  5. Define the JAVA_HOME variable. For example:

  6. Re-initialize the database using the installed script:

    • /opt/netiq/idm/apps/idrpt/bin/db-init.sh -cfg_password *** -data_password ***
    • /opt/netiq/idm/apps/idrpt/bin/db-init.sh -cfg_password *** -data_password *** -sql >
      /opt/netiq/idm/apps/idrpt/sql/output.sql
  7. Start the application server such as Tomcat. For more information, see Stopping, Starting, and Restarting Tomcat.