Controlling data definition by object name with exceptions

You can register an object name with exceptions in the object registration table (ORT) as a way to control data definition.

About this task

You can allow some applications to control specific sets of registered objects while allowing other applications to use data definition statements for unregistered objects.

Procedure

To control data definition by object name with exceptions:

  1. Choose not to control all applications. On the DSNTIPZ installation panel, specify the following value for option 2:
    2 CONTROL ALL APPLICATIONS ===> NO
    When you specify NO, you allow unregistered applications to use data definition statements on some objects.
  2. On the DSNTIPZ installation panel, complete option 4 as follows:
    4 UNREGISTERED DDL DEFAULT ===> ACCEPT
    This option does not restrict the use of data definition statements for objects that are not registered in the ORT. Therefore, any application can use data definition language for any unregistered object.
  3. Register all controlled objects in the ORT. Use a name and qualifier to identify a single object. Use only one part of a two-part name to identify a set of objects that share just that part of the name. For each controlled object, use APPLMATCHREQ = Y. Enter the name of the plan or package collection that controls the object in the APPLIDENT column.
  4. For each set of controlled objects (identified by only a simple name in the ORT), register the controlling application in the ART. You must supply values for the APPLIDENT, APPLIDENTTYPE, and QUALIFIEROK columns of the ART.

Example

The following two tables assume that the installation option REQUIRE FULL NAMES is set to NO. The following table shows entries in the ORT for the following controlled objects:
Table 1. Table DSN_REGISTER_OBJT for object control with exceptions
QUALIFIER NAME TYPE APPLMATCHREQ APPLIDENT APPLIDENTTYPE
KIM OBJ1 C Y PLANX P
FENG OBJ2 C Y PLANX P
QUENTIN OBJ3 C Y PACKX C
EDWARD OBJ4 C Y PACKX C
  TABA C Y PLANA P
  TABB C Y PACKB C
  • The objects KIM.OBJ1, FENG.OBJ2, QUENTIN.OBJ3, and EDWARD.OBJ4, all of which are controlled by PLANX or PACKX. Db2 cannot interpret the object names as incomplete names because the objects that control them, PLANX and PACKX, are registered, with QUALIFIEROK=N, in the corresponding ART as shown in the following table:
    Table 2. Table DSN_REGISTER_APPL for object control with exceptions
    APPLIDENT APPLIDENTTYPE DEFAULTAPPL QUALIFIEROK
    PLANX P N N
    PACKX C N N
    PLANA P N Y
    PACKB C N Y

    In this situation, with the combination of installation options shown previously, any application can use data definition language for objects that are not covered by entries in the ORT. For example, if HOWARD has the CREATETAB privilege, HOWARD can create the table HOWARD.TABLE10 through any application.

  • Two sets of objects, *.TABA and *.TABB, are controlled by PLANA and PACKB, respectively.