Deprecated feature: Resolving identifiers

XML data to be loaded into a target database must contain identifiers for XML elements that require them. To generate or locate identifiers for catalog entities in the XML document, use the idresgen utility.

Before you begin

Configure the loading utilities

Procedure

  1. Create an XML file that describes the data by using either of the following ID resolution methods:
    OptionDescription
    Using internal-alias ID resolution When you use internal-alias resolution, an alias is substituted in place of the primary key (identifier) in the XML document. This alias is then used elsewhere in the XML file to refer to that element. You do not need to know the unique indexes necessary to build the XML file.

    Internal aliases must be used consistently throughout the file. If an address-book ID ADDRBOOK_ID is aliased to @addrbook_1, all foreign key references to that ID in the file must use @addrbook_1. Aliases are transient. They are not saved; and they cannot be used in a separate XML file without introducing the aliases again.

    Using unique-index ID resolution Unique-index resolution, the default behavior of the idresgen utility, is used when there is no entry in the properties file or when there is no properties file. Unique-index resolution uses any of the specified unique indexes on a table as a means of locating the identifier.
    To update the contents of the database, you need to know the unique key from the primary table in the database. You can query your database.
    db2 describe indexes for table schema.tablename show detail
  2. If necessary, add table names to the SUBKEYS table.
    The following snippet shows an example of creating an entry in the SUBKEYS table.
    
    db2 insert into SUBKEYS Values ( -1, 'mytable',
    'mytable_primary_key',10000,50,0,2147483647)
    

    The idresgen utility resolves identifiers for primary tables. A primary table is one that is listed in the KEYS or SUBKEYS table. If it is necessary to resolve identifiers for a table that is not in KEYS or SUBKEYS, add the table to the SUBKEYS table before you run the idresgen utility.

  3. Select an appropriate method to resolve entities.
    load
    None of the records in the file exist in the database.
    update
    All records in the file exist in the database.
    mixed
    Some records in the file exist in the database.
  4. Run idresgen utility.
  5. If there are errors, review troubleshooting: idresgen utility.