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.
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
- Identify any objects that need repair.
- Issue
dbmaintcommands 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 -Uor--updatePerform actions on database. -qor--quietDo not print DDL to stdout. Yor--YESAssume Yes for any prompts. -cor--createCreate files and indexes for the specified data area. -dor--dropDelete files and indexes from the specified data area. -ror--rebuildRecreate (drop and create) selected database objects. -Sor--subsetswitchesFix the subset switches for conditional indexes in the specified data area. -Lor--supplementalindexesCreate or delete Landmark supplemental indexes. -Tor--tablesCreate 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--indexesCreate or delete indexes in the specified data area. --primaryonlyAffect the primary index only. --excludeprimaryDo not affect the primary index. --excludetextDo not affect text indexes. --indexname=NAMEName of the index to be processed (can be repeated). -Eor--textonlyAffect text indexes only. -t dbTypeor--dbtype=TYPESet the database type. -Oor--selectonlySelect only files of specified type . -Vor--includeviewsInclude isView objects. --splitTable=OPTIONControl whether to include/exclude split table objects. OPTIONcan beBASE_ONLY,SPLIT_ONLY, orDEFAULT. This option is ignored for tables that are not split.--showdataareaPrint data area name. --useupgradenamesUse the upgrade names for tables. Only use if directed to by support personnel. dataareaThe 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-, ormodule-to resolve ambiguity. Useprefix-andtype-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@pathreads 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:Lon a file name selects the lobs table. A:Bon a file name selects the base table. - Inspect the DDL in the output files and edit it if necessary.
- 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.
- Use a SQL tool to issue the DDL to the database.
- Run the dbmaint utility to verify that your changes have fixed the previous mismatches.
- If necessary, reload any data that was lost during the rebuild.