Creating and dropping Db2® objects

You can use the Objects utility to create and drop Db2® objects without needing to know the SQL commands for these operations.

The Db2® Object Functions panel is option 3.2 from the Primary Option Menu panel. From the Db2® Object Functions panel you can select the Db2® object type you want to create or drop:

  1. Specify the relevant number in the Object Type entry field. When you first display the Db2® Object Functions panel, this field is initialized to 3 (Table).
  2. If you intend to drop an object but would like FM/Db2 to display a Drop Confirmation panel before it actually drops the object you have specified, ensure the Confirm object drop option is checked.
  3. To create the specified object type, type C on the command line.

    To drop the specified object type, type D on the command line.

  4. Press Enter.
Supported actions for each Db2 object shows the Db2® object types you can create or drop.
Table 1. Supported actions for each Db2® object

This table has three columns.

Object Type Create Drop
Database Yes Yes
Table space Yes Yes
Table Yes Yes
View Yes Yes
Alias Yes Yes
Index Yes Yes
Synonym Yes Yes
Distinct Type Yes Yes
Function Yes Yes
Stored Procedure Yes Yes
Trigger Yes Yes
Auxiliary Table Yes No1

Related references

1
Notes:
  1. Use table drop. Populated auxiliary tables can only be dropped by dropping their associated base table. To drop an unpopulated auxiliary table without dropping its base table:
    • Use the drop table function (by selecting Object Type 3 and entering D on the command line on the Db2® Object Functions panel.
    • Specify the auxiliary table as the table to drop.