Lawson DBA Tables (law_dba tables)

Lawson has created a group of tables, known collectively as the Lawson DBA tables (law_dba tables). The tables allow database administrators to take advantage of IBM DB2 for OS/390 features that are not available from the standard Lawson database utilities. They provide a high degree of control over the DDL that is generated for database objects. You can make changes to database objects outside of Lawson which are maintained through create/drop operations.

The Lawson DBA tables are created in IBM DB2 and used as part of the Lawson repository. Because they are stored in the IBM DB2 database, you can use native IBM DB2 tools to monitor and alter the tables. The tables are referenced by the ibmdb database driver and any other utilities that directly access Lawson tables in an IBM DB2 database.

Each entry in the Lawson DBA tables is identified by the name of the table or index for which that entry specifies parameters. You do not need to make an entry for every table and index for the feature to work: ibmdb and the other utilities only check for values if an object has an entry in the table.

Reasons to Use the Lawson DBA Tables

Following are some examples of the kinds of functionality that the law_dba_tables provide. Descriptions of law_dba Tables

  • Assign a Lawson table into its own database

    Being able to assign a table to its own database is a function that many IBM DB2 for OS/390 DBAs require which dbdef does not support. You use law_dba_table to specify this functionality. If the table is partitioned, other Lawson DBA tables are also needed.

  • Create multiple indexes locations

    When you use the Database Space Definition form to define a database space, you also define a separate location to hold the indexes in that database space. This method restricts you to one location for all indexes on a table. If a table has multiple indexes that are frequently accessed at the same time, putting them on different disks could speed up physical input and output. Also, a large table with many indexes can make it impossible to put all indexes on that table on a single disk drive. In either of these cases, it helps to separate the indexes to different drives. To create multiple index locations, use law_dba_index. If the table is partitioned, you also need other Lawson DBA tables.

  • Create partitioned tables

    In Lawson, partitioning is only available through the Lawson DBA tables. Typically, you make specifications for each of the tables when you implement partitioning.

How law_dba Tables Work

You can think of the law_dba tables as bolt-ons to the Lawson database utilities. You create tables that contain descriptions of how you want a particular table to behave.

Once created, the tables affect the DDL that is generated during create and drop operations, but they do not trigger those operations. Another event must cause the create and drop actions to take effect. For example, suppose you add rows to a law_dba table and then run dbreorg. Unless a condition triggers create/drop to occur, tables are not created. The exception to this is when you make changes to the law_dba table. If you want a law_dba table change to take effect immediately, you could run dbreorg with the -g parameter or run the alter tables utility.

Names in law_dba Tables

Each entry in the law_dba tables is identified by the name of the table or index as used in DB2, which might not be the same when specified in Lawson. For example, for SYSTEM or R_SYSTEM, use R_**. This entry specifies parameters. You do not need to make an entry for every table and index for the law_dba_table feature to work: ibmdb and the other utilities only check for values if an object has an entry in the table.

Columns in law_dba_tables that accept text are formatted as varchar(128) per the most recent SQL standard. This is more characters than the IBM DB2 system currently supports. IBM DB2 supports 18 characters for table and index names and eight characters for database and table space names. To avoid confusion, do not use names that are longer than IBM DB2 supports.