Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Changing the database for Interaction History and database schema for Predictive Analytics Director

Updated on May 1, 2020

Interaction History uses databases tables that are part of the PegaDATA schema, and the Predictive Analytics Director repository uses the PegaDATA database by default. However, you can use a different database when you want to store your records outside the Pega 7 Platform, or when the PegaDATA database contains too many records.

Changing the database for Interaction History

If you use a different database vendor than the one supporting the Pega 7 Platform database, make sure that the correct JDBC drivers are available. For more details, see More about Database data instances.

  1. Create a dedicated user for the Interaction History tables with resource and connect permissions by using a database administration tool of your choice.
  2. Open the Additional_Products/DSM/Products/Interaction History/schema folder in your Pega 7 Platform distribution image.
  3. Copy the following files to the scripts folder in your local copy of the Pega 7 Platform distribution image:
    • generateIHddl.xml​
    • generateIHddl.bat/sh
  4. Open a command prompt, and go to the scripts folder.
  5. Run the generateIHddl script with the following arguments to generate the SQL files, for example:
    EnvironmentExample
    WindowsgenerateIHddl.bat --dbType oracledate --dbDataSchema IHSTORE
    UNIX and Linux./generateIHddl.sh --dbType oracledate --dbDataSchema IHSTORE
    (IBM DB2 for z/OS only) Before running the script, configure the site-dependent properties and edit the setupDatabase.properties file. Running the script takes an extra argument, --zosProperties. For more information, see the Pega 7 Platform Installation Guide for IBM WebSphere and IBM DB2 for z/OS.
    • dbType (Oracle: oracledate, IBM DB2 for LUW: udb, IBM DB2 for z/OS: db2zos, PostgreSQL: postgres, MS SQL Server: mssql)
    • dbDataSchema
  6. Open the schema/generated folder in your local copy of the Pega 7 Platform distribution image to access the generated IH_install_on_<dbType>.sql file. Use your database administration tool to run the SQL file that populates and configures the Interaction History schema.
  7. Define a new JDBC data source for Interaction History in the Pega 7 Platform server by following the steps for the application server of your choice. The JNDI entry to configure for this data source is jdbc/ihDataSource.
  8. Create a database data instance that points to the schema with the Interaction History tables.
  9. Use a JDBC connection pool to connect to the jdbc/ihDataSource data source.
  10. In the Records Explorer, go to SysAdmin > Database Table.
  11. Filter the results by Data-Decision-IH to view the Interaction History database tables.
  12. Change the database setting of the database table data instances to use the connection that was configured in step 1.
Testing the connectivity to the database throws errors about the table containing internal properties. You can safely ignore these errors.

Besides generating the SQL files to populate an empty schema, the generateIHddl batch/shell script supports drops and upgrade options. Both actions require that you provide the database driver, JDBC URL, and database credentials.

  • Clear the schema by using the drops action argument. For example, generate the IH_drops_on_oracledate.sql file in the generated folder to clear the tables in an Oracle database.

    generateIHddl.bat --action drops --dbSchema IHSTORE --dbType oracledate --driverJar c:\usr\JDBCdrivers\ojdbc6.jar --url jdbc:oracle:thin:@localhost:1521:ORCL --username IH_USER --password IH_USER

  • Update the contents of the schema by using the upgrade action argument. For example, generate the IH_upgrade_on_oracledate.sql file in the generated folder to update the tables in an Oracle database.

    generateIHddl.bat --action upgrade --dbSchema IHSTORE --dbType oracledate --driverJar c:\usr\JDBCdrivers\ojdbc6.jar --url jdbc:oracle:thin:@localhost:1521:ORCL --username IH_USER --password IH_USER

Although running the script should result in removing the generated folder, check the time stamp of the generated files. If the time stamp is not up to date, delete the generated folder and run the script again.

Changing the database for the Predictive Analytics Director repository

  1. Create the following resources using a database administration tool of your choice:
    • A dedicated user for the Predictive Analytics Director repository tables with create table, create index, create view, create sequence, and drop table permissions.
    • A dedicated schema for the Predictive Analytics Director repository.
  2. Create a database instance to connect to the database schema.
  3. Reference the new database instance from the Predictive Analytics Director Settings landing page. For more information, see Selecting an internal database.

You have created dedicated database tables for Interaction History and the database schema for the Predictive Analytics Director repository. You can now change the default settings and reference the new resources.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us