Skip to main content

Importing rules and data by using a direct connection to the database

Suggest edit Updated on May 11, 2022

Use the prpcUtils tool to import rules and data by connecting directly to the database. This is most commonly done for a stopped instance.

Before you begin:
  • Before you import an archive, review the content of the archive to better understand the potential issues associated with any uncapped ruleset versions.
  • Your access group must have the SchemaImport privilege and the dynamic system setting database/AutoDBSchemaChanges must be true.
  • If your access group does not have the SchemaImport privilege or the dynamic system setting database/AutoDBSchemaChanges is false, the system does not apply the schema changes and the failure response indicates the reason for failure.
Note: Do not import an archive into an active runtime instance of Pega Platform.
  1. If encryption is enabled on the cluster, but it is not enabled with a dynamic system setting, enable encryption on the update script by adding the following line to the prconfig.xml file:
    <env name="cluster/encryption/enabled" "value=true" />
  2. For IBM Db2 for z/OS, configure the import properties.

    If you are importing an application with schema changes and a separate DB-Admin-DB-Name and you are using IBM Db2 for z/OS, configure the import parameters before you import the application, or the import will fail.

    For more information about configuring the import parameters, see IBM Db2 for z/OS: Preparing to import an application with schema changes and a separate DB-Admin-DB-Name. For more information about your application, see your database administrator.
  3. Configure the common properties of the prpcUtils.properties file.

    Property name Value
    pega.jdbc.driver.jarPath to the database driver .jar file.
    pega.jdbc.driver.classThe database driver class.
    pega.database.typeDatabase vendor type.
    pega.jdbc.urlURL of your database.
    pega.jdbc.usernameDatabase user name.
    pega.jdbc.password Database password.
    rules.schema.nameIf you use a split schema, the value for the rules schema name. If you do not use a split schema, the value for the schema name.
    data.schema.nameIf you use a split schema, the value for the data schema name.

  4. Configure the required properties of the prpcUtils.properties file.

    Property name Value
    import.archive.pathThe relative path to the archive from the \utils\ folder or the full path to the archive. If the path is a folder, the tool processes all archive files in that folder.
    import.mode The import mode:
    • import: (Default) Update existing instances and remove duplicates. Use the import.existing.instances property to override this setting.
    • install: Import new instances. Do not import or update existing instances. The log file includes an exception message for each instance that already exists.
    • hotfix: Update existing instances and remove duplicates. If the archive time stamp is older than the existing instance, skip updating the instance or inserting the duplicate.
    import.existing.instancesHow the import action handles existing instances:
    • skip: (Default) Skip instances that already exist in different rulesets or versions.
    • override: Replace instances that already exist in different rulesets or versions.
    import.codesetNameThe name of the code set to receive the Java .class files.
    import.codeset.versionThe code set version to receive the Java .class files, for example: 01-01-01

  5. Configure the optional properties of the prpcUtils.properties file.

    Property name Value
    import.nofailonerrorSpecify whether to continue the import after a failure and skip instances that fail to import. The default is true. Set to false to stop the import if any import action fails. The default is false , which will fail on error.
    import.commit.countThe number of data instances processed with each database commit to balance memory usage and performance. The default of 100 is sufficient for most environments.
    import.compile.librariesSpecify whether to compile libraries after import. The default is true.
    import.allowImportWithMissingDependenciesSpecify whether to allow the import to continue even if the archive is dependent on missing products. The default is false.
    import.preserveOrderSpecify whether to import archives in the order specified in the import file. The default is false, which does not enforce any order.
    import.bypassSchemaSpecify whether to apply database schema changes during the import. The default is false. If you have already applied the schema changes manually, set this to true.
    import.skipBackup Specify whether to bypass saving history points and creating restore points during import. As a best practice, leave this set to the default, false, to save history points and create restore points.
    import.enable.defaultcontext Specify whether to allow triggers for Pega Platform to run while performing command-line imports. The default is false. To allow triggers to run during imports, uncomment this property and set to true.
    import.insecureOperatorsAs a best practice, and by default, new operators are disabled on import and existing operators are not updated. Setting import.insecureOperators to true does not disable new operators and allows updates of existing operators.
    import.allow.inherited.connectionsSpecify whether to import inherited database name instances. The default setting is false.
    import.bypass.column.populationIf an import adds columns to existing tables, specify whether to bypass automatically exposing and populating the new columns during the import. The default setting is false.
    import.bypass.schema.changes.to.descendant.tables

    If an import changes an existing class, specify whether to bypass automatically making changes to descendent tables. The default setting is false.

  6. Save and close the prpcUtils.properties file.
  7. Run the prpcUtils.bat or prpcUtils.sh script with the import option, for example:
    prpcUtils.bat import

    Optional: Pass one or more arguments.

    prpcUtils script argument Value
    connPropFileThe full path to the connection.properties file that includes information for multiple targets.
    driverClassYour JDBC driver class. For example, oracle.jdbc.OracleDriver.
    driverJARLocation of your JDBC .jar file.
    dbTypeDatabase vendor type, such as mssql, udb, oracledate, postgres, and db2zos.
    dbURLJDBC URL to the database.
    dbUserDatabase user name.
    dbPasswordDatabase password.
    archivePathFull path to the archive to be imported or exported.
    propFileThe full path to the properties file, to override the default prpcUtils.properties.
    hfixActionIf manageHotfixes is selected, sets the hotfix operation. Valid values are commit, rollback, generateDDL, install, and scan.
    rulesSchemaThe rules schema.
    dataSchemaThe data schema.
    noFailOnErrorSet to true or false. When enabled, instances that fail to import are skipped and import continues instead of failing.
    UPega user name.
    PPega password.
    accessGroupAccessGroup in which the Rule-Declare-Index of the classes being exposed exists. Applicable for the expose utility if --U or --P are not provided.

  • Previous topic Importing rules and data by submitting a request to an active instance
  • Next topic Generating a DDL file of schema changes that are referenced from an archive file
Did you find this content helpful? YesNo

Have a question? Get answers now.

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

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