12.2 Manually Generating the Database Schema after the Installation

You can recreate the databases after installation without having to reinstall. The following steps apply to Identity Governance, Identity Reporting, and Workflow. Identity Governance and Identity Reporting provide a database initialization script that clears the checksums before initializing the databases for Identity Governance and Identity Reporting. Each script contains variables for the JRE path and the installation path for either Identity Governance or Identity Reporting, depending on the feature. Workflow has its own intitialization script with variables for the JRE path and the installation path.

If you have changed your database information, you must ensure that the database initialization file contains the proper information for your database. For more information, see Section 5.12.3, Updating the Identity Governance Database Initialization File for the Database Changes.

To manually generate the database schema:

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

  2. Record the names of the databases.

  3. (Conditional) Perform the following steps to recreate the existing database.

    1. Back up the data in the database.

    2. Drop the existing database.

    3. Create a new database with the same name as the one that you deleted in the prior step.

  4. Open the database initialization script in a text editor and ensure that the installation paths for Java and Identity Governance, Identity Reporting, or Workflow match what is in your environment.

    1. Access the directory where the database installation script resides. This is the default installation location:

      • Identity Governance

        • Linux: /opt/netiq/idm/apps/idgov/bin

        • Windows: c:\netiq\idm\apps\idgov\bin

      • Identity Reporting

        • Linux: /opt/netiq/idm/apps/idrpt/bin

        • Windows: c:\netiq\idm\apps\idrpt\bin

      • Workflow Engine [4.2]

        • Linux: /opt/netiq/idm/apps/wfe/bin

        • Windows: c:\netiq\idm\apps\wfe\bin

    2. Open the database script in a text editor.

      • Linux: db-init.sh

      • Windows: db-init.bat

    3. Ensure that the following items have the correct paths for your environment.

      • install_path: Installation path for Identity Governance.

      • java_home: Installation path for the JRE that was installed with Zulu OpenJDK.

      • reporting_path: Installation path for Identity Reporting.

    4. Save and close the file.

    5. Open the Workflow database script in a text editor.

      • Linux: db-init-wfe.sh

      • Windows: db-init-wfe.bat

    6. Ensure that you have the correct JRE and Workflow installation paths for your environment.

    7. Save and close the file.

  5. (Conditional) If you do not want to generate SQL to re-initialize the databases, you can initialize the databases using the database scripts by entering the following at a command prompt in the directory where the database script resides.

    • Linux: ./db-init.sh -password database-password [4.2]./db-init-wfe.sh -dbpwd database-password -consumerpwd aa-clientpassword-encrypt-storepass encryption-keystore-password -storepwd truststore-password

    • Windows: db-init.bat -password database-password [4.2]db-init-wfe.bat -dbpwd database-password -consumerpwd aa-clientpassword-encrypt-storepass encryption-keystore-password -storepwd truststore-password

  6. (Conditional) If you want to generate a single SQL file for re-initializing the databases, perform the following steps:

    1. Enter the following at a command prompt in the directory where the database script resides.

      • Linux: ./db-init.sh -password database-password -sql > /opt/netiq/idm/apps/idrpt/sql/output.sql [4.2]./db-init-wfe.sh -dbpwd database-password -consumerpwd aa-clientpassword-encrypt-storepass encryption-keystore-password -storepwd truststore-password -sql > /opt/netiq/ idm/apps/wfe/sql/output.sql

      • Windows: db-init.bat -password database-password -sql > c:\netiq\idm\apps\idrpt\sql\output.sql [4.2]db-init-wfe.bat -dbpwd database-password -consumerpwd aa-clientpassword-encrypt-storepass encryption-keystore-password -storepwd truststore-password -sql > c:\netiq\idm\apps\wfe\sql\output.sql

    2. Have your database administrator open the output.sql file in a text editor and create a SQL file for each section in the file for each database listed. You must re-initialize each database one by one.

    3. Have the database administrator run each SQL script that they create in the prior step to re-initialize the databases.

  7. Start the application server such as Apache Tomcat. For more information, see Section 3.5.3, Starting and Stopping Apache Tomcat.