Using the Build Data Definition Language Utility to Fix Dictionary Mismatches
This procedure guides you in using the bldora11ddl / bldora12ddl to fix any dictionary mismatches you encounter.
-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 bldora11ddl / bldora12ddl 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:
bldora11ddl / bldora12ddl [-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 Oracle 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 sqlplus 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.-K
Create an additional index without a descending column for the primary key constraint. Use this option if you need to replicate an Oracle table that has a descending column.
Running bldora11ddl / bldora12ddl with the
-K
option allows creation of a primary key to enable replication of tables with a descending column in the primary index. The-K
option generates an additional index without a descending column for the primary key constraint. The intent of the-K
option is to get around the Oracle limitation of not allowing primary key constraints on indexes with one or more descending columns.Use bldora11ddl / bldora12ddl with
-UIK
after you run a dbreorg or dbcreate to restore the optional primary key indexes which are dropped in the dbreorg process.bldora11ddl / bldora12ddl, when used without the
-K
option, also drops the optional primary key indexes. Run the utility with-UIK
to restore the optional primary keys after the tables are rebuilt with either dbcreate or bldora11ddl / bldora12ddl.-u DbLoginName
The database login name to use. -p Password
The password for the database login name. - Inspect the DDL in the output files and edit it if necessary.
-
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.
- Use a SQL tool to issue the DDL to the database.
- Run the verifyora11 / verifyora12 utility to verify that your changes have fixed the previous mismatches.
- If necessary, reload any data that was lost during the rebuild.