Using the Build Data Definition Language Utility to Fix Dictionary Mismatches

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

Caution: 

The dbmaint 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 dbmaint 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:

    dbmaint [OPTIONS] dataarea [name]

    Program Option Description
    -U or --update Perform actions on database.
    -q or --quiet Do not print DDL to stdout.
    Y or --YES Assume Yes for any prompts.
    -c or --create Create files and indexes for the specified data area.
    -d or --drop Delete files and indexes from the specified data area.
    -r or --rebuild Recreate (drop and create) selected database objects.
    -S or --subsetswitches Fix the subset switches for conditional indexes in the specified data area.
    -L or --supplementalindexes Create or delete Landmark supplemental indexes.
    -T or --tables Create or delete tables in the specified data area.
    --alterlobstorage (Oracle only) Alter LOB storage attributes.
    --movelobstorage (Oracle only) Move LOB storage.
    -I (uppercase i) or --indexes Create or delete indexes in the specified data area.
    --primaryonly Affect the primary index only.
    --excludeprimary Do not affect the primary index.
    --excludetext Do not affect text indexes.
    --indexname=NAME Name of the index to be processed (can be repeated).
    -E or --textonly Affect text indexes only.
    -t dbType or --dbtype=TYPE Set the database type.
    -O or --selectonly Select only files of specified type .
    -V or --includeviews Include isView objects.
    --splitTable=OPTION Control whether to include/exclude split table objects. OPTION can be BASE_ONLY, SPLIT_ONLY, or DEFAULT. This option is ignored for tables that are not split.
    --showdataarea Print data area name.
    --useupgradenames Use the upgrade names for tables. Only use if directed to by support personnel.
    dataarea The data area to affect through dbmaint.
    name

    A list of names of dictionary files, business classes, modules, database spaces, or business class patterns to execute the command against.

    Use the prefixes file-, pattern-, space-, or module- to resolve ambiguity. Use prefix- and type- to select files by prefix name or types used. File names can be the long or classic name and can include ? and *. Specifying "!" anywhere in the list will complement the selected files. Specifying @path reads names from the file, one per line. A hyphen ( - ) indicates stdin. Wildcard characters may need to be quoted in the command line or they will be interpreted by the command processor. A :L on a file name selects the lobs table. A :B on a file name selects the base table.

  3. Inspect the DDL in the output files and edit it if necessary.
  4. If you need to save off any data before you drop a table for rebuilding, use the dbexport utility to unload the data.
    Caution: 

    Exporting 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 dbmaint utility to verify that your changes have fixed the previous mismatches.
  7. If necessary, reload any data that was lost during the rebuild.