Deprecated feature: Configuring the idresgen utility
Configuring the idresgen utility involves changing two property files: DB2ConnectionCustomizer.properties, and IDResolveKeys.properties. The DB2ConnectionCustomizer.properties file describes how the idresgen utility handles time stamps, storage, and database drivers. The IDResolveKeys.properties file specifies which columns of a primary entry should be used as lookups for tables that require the identifier of a primary row.
Procedure
-
Increase the Java virtual machine (JVM) heap size that is used for the idresgen utility.
By default, the maximum amount of memory that is allocated to the JVM heap is 64 MB. If this heap size is not increased, the JVM can eventually run out of memory during the ID resolving process. The maximum amount of memory that is allocated to the Java heap can be varied by using the JVM
-mx
option in the Java command. If you are loading files that are more than 500 MB, then increase the JVM heap size to 512 MB or 1024 MB. - Optional:
Change the directory for the idresgen utility error log. By default, the idresgen utility
writes the error log to the following directory:
- The directory where the input file resides.
- WC_userdir/instances/ instance_name/logs
-
Update the IdResolveKeys.properties file to define how keys are generated
as the data is resolved. The file is in the following directory:
- WC_installdir/properties
- WC_installdir\properties
The values that you set in the IdResolveKeys.properties file depend on whether you must generate identifiers, generate cascaded primary keys, or generate compound keys.
An example is provided for each type:
-
Change how the idresgen utility handled cursors by editing the
DB2ConnectionCustomizer.properties file. This file is in
IdResGen.zip compressed file in the following directory.
- WC_installdir/lib/loader/
- WCDE_installdir\workspace\wc\lib\loader\
When you use the idresgen utility that is provided with WebSphere Commerce Developer this step is optional.
The following lines in the ID Resolver customizer property file specify how the idresgen utility handles cursors:
Where:SpecifyCursorHold = yes CursorHold = false
Parameter Parameter setting SpecifyCursorHold Specifies whether to hold the cursor across transactions. The default value is SpecifyCursorHold = no CursorHold If this property is set to true (CusorHold = true), cursors are not closed when a transaction is committed or rolled back. All resources that are acquired during the unit of work are held. Locks on specific rows and objects that are implicitly acquired during the unit of work, however, are released. -
The idresgen utility must be using the thick client during instance creation and the migration
process. The bootstrap data gets processed during these processes.
By default, the idresgen utility uses the Oracle thick JDBC client. To change the idresgen utility to use the Oracle thin JDBC client:
-
Create an entry in the REFKEYS table that describes the required foreign relationship.
The REFKEYS table is created to represent a foreign relationship between tables that does not exist in the database. Generally, the database schema describes the foreign relationship by creating a foreign key declaration that links a column of a table to another table. If the database schema does not have a foreign relationship that is defined and the identifiers have to be resolved as a foreign key, create a REFKEYS table. Create the table that is based on the following SQL:
Where:CREATE TABLE "REFKEYS" ( "FKTABLE_NAME" CHAR(18) NOT NULL , "FKCOLUMN_NAME" CHAR(18) NOT NULL , "TABLENAME" CHAR(18) NOT NULL );
- FKTABLE_NAME
- The foreign (or "child") table name
- FKCOLUMN_NAME
- The foreign column name
- TABLENAME
- The primary (or "parent") table name