Changing the related objects for a table
When altering a table in Db2® Admin Tool, you can easily view related objects, such as table spaces, databases, indexes, views, and foreign keys. You can alter those objects as well.
Procedure
To change the related objects for a table:
- On the DB2 Administration Menu (ADB2) panel, select option 1, and press Enter.
- On the System Catalog (ADB21) panel, specify any selection criteria at the bottom, specify option T, and press Enter.
- On the Tables, Views, and Aliases (ADB21T) panel, issue the ALT command against the table whose related objects you want to change.
- On the ALTER Table (ADB27C) panel, issue the NEXT command.
-
On the Alter Objects (ADB27CA) panel, issue the REL line command against the table whose related objects you want to change.
The ALT - Related Objects (ADBP7REL) panel displays a list of related objects.
- Optional:
If the type of object that you want to change is not listed (for example, no indexes are listed), take the following actions to add those objects to this list:
- Exit back to the Alter Objects (ADB27CA) panel.
- Issue the ALTOPT command.
- On the ALTER Options Menu (ADBP7OP) panel, specify option 2 (REL options).
- On the ALTER Choose Related Objects (ADBP7OBJ) panel, specify YES for the object type that you want to include
- Issue the NEXT command.
- Exit back to the Alter Objects (ADB27CA) panel.
- Issue the REL line command against the table again. The list should now include the objects that you requested.
-
On the ALT - Related Objects (ADBP7REL) panel, issue the A line command against the object that you want to change.
The A line command adds the object to the list of objects on the Alter Objects (ADB27CA) panel
Figure 1. ALT - Related Objects (ADBP7REL) panel ADBP7REL -------------- VA1A ALT - Related Objects -------- Row 1 to 17 of 17 Command ===> Scroll ===> PAGE Line commands: S - Show object A - Add object Related objects for table: DSN8A10.DEPT Sel Type Object Name Qualifier Info 1 Info 2 Note * * * * * * --- ------- -----------------------> --------- -------> -------> ------------- D------ DSN8DA1A---------------- SYSADM S DSN8SA1D SYSADM Segmented T DEPT DSN8A10 DSN8DA1A DSN8SA1D Y DEPT SYSADM DSN8A10 DEPT CHR RDD DSN8A10 DEPT Child CHR RED DSN8A10 EMP Child CHR DEPTNO DSN8A10 PROJ Child PAR RDD DSN8A10 DEPT Parent PAR RDE DSN8A10 EMP Parent X XDEPT1 DSN8A10 DSN8A10 DEPT Primary X XDEPT2 DSN8A10 DSN8A10 DEPT X XDEPT3 DSN8A10 DSN8A10 DEPT V VDEPMG1 DSN8A10 DSN8A10 DEPT V VDEPT DSN8A10 DSN8A10 DEPT V VEMPDPT1 DSN8A10 DSN8A10 DEPT V VHDEPT DSN8A10 DSN8A10 DEPT V VPHONE DSN8A10 DSN8A10 DEPT - Exit back to the Alter Objects (ADB27CA) panel.
- On the Alter Objects (ADB27CA) panel, use the A line command to alter any object.
- Specify the changes to the object.
- Exit back to the Alter Objects (ADB27CA) panel.
- Generate an ALT job