Using the Build Data Definition Language Utility to Fix Dictionary Mismatches

This procedure guides you in using the bldibmddl to fix any dictionary mismatches you encounter.

Caution: 
The bldibmddl utility does not save, copy, or back up any of the data in a table before it drops the table. Therefore, use the utility carefully. If you have questions about the result of a combination of options, Lawson recommends that you first run the utility without the -U option and direct the output file to a text file. Review the generated DDL to ensure that the utility is doing what you expect.

To Fix Mismatches

  1. Identify any objects that need repair.
  2. Issue bldibmddl commands to generate DDL to fix the problems you have identified in step 1.
    Note: Send the DDL to one or more files―do not issue it directly to the database.

    Use the following syntax and commands:

    bldibmddl [-UqaoRDTIEKGBWXSV] [-u DbLoginName] [-p Password] productline|dataarea [systemcode] [filename]

    -U

    Update and create objects in the database.

    If you use -U , the generated SQL statements update the IBM DB2 database definition. Otherwise, SQL statements are generated but not executed. If you are working with critical data, do not use the update mode without first examining the DDL. Instead, the preferred method is to direct the output to a file that you can examine, edit if necessary, and issue the command to the database through the SQL utility.

    -q Quiet mode. Do not echo DDL to stdout.
    -a

    Positioning mode. Start at:

    dataarea [systemcode] [filename]

    If you use the -a option, you can start the utility at a specific system code or file.

    -o Offline mode. The command is run without connecting to the database.
    -R

    Rebuild; drop objects before creating.

    If you do not specify either the -R or -D option, output is generated to create tables and indexes.

    -D

    Drop objects only.

    If you do not specify either the -R or -D option, output is generated to create tables and indexes.

    -T

    Affect table objects only.

    If you do not specify the -T or -I option, output is generated for both tables and indexes.

    -I

    Affect index objects only.

    If you do not specify the -T or -I option, output is generated for both tables and indexes. If you do not specify either the -R or -D option, output is generated to create tables and indexes.

    -E Affect text index objects only. Use with the -I option.
    -S

    Generate DDL into files by system codes:

    dbname.systemcode.ddl

    -V Print the utility version.
    -G Affect trigger objects only.
    -B

    Affect non-native objects only.

    Cannot be used with the -U option, but requires the -T and/or -I options.

    The default parameter combination is -BTI.

    -W

    Affect native view objects only.

    Cannot be used with -U or any other object type option.

    -X

    Affect non-native view objects only.

    Cannot be used with -U or any other object type option.

  3. Inspect the DDL in the output files and edit it if necessary.
  4. If you need to save any data before you drop a table for rebuilding, use the dbdump utility to unload the data.
    Caution: 
    Dumping data, changing the data definition, and reloading the same data are not data safe operations and could corrupt data. This procedure should be performed only by someone with expert knowledge of the database and Lawson data.
  5. Use a SQL tool to issue the DDL to the database.
  6. Run the verifyibm utility to verify that your changes have fixed the previous mismatches.
  7. If necessary, reload any data that was lost during the rebuild.