Requesting drop impact reports
Drop impact reports identify other Db2 objects, plans, and packages that are impacted when an object is dropped. These reports are useful tools that can help you avoid dropping objects that adversely impact other objects, plans, and packages. Consider generating a drop impact report whenever you drop an object.
Procedure
To request drop impact reports:
- On the DB2 Administration Menu (ADB2) panel, specify option 1, and press Enter.
- On the System Catalog (ADB21) panel, specify any selection criteria at the bottom, specify option D, and press Enter.
- On the Databases (ADB21D)
panel, issue the DROP line command to drop a database and press Enter:
Figure 1. Using the DROP command on the Databases (ADB21D) panel DB2 Admin ------------------- DD1A Databases ----------------- Row 1 to 3 of 3 Command ===> Scroll ===> PAGE Commands: GRANT MIG DIS STA STO UTIL MOVETB Line commands: T - Tables S - Table spaces X - Indexes G - Storage group ICS - IC status DIS - Display database STA - Start database STO - Stop database A - Auth ? - Show all line commands Storage Buffer Created Index Select Name Owner Group Pool DBID By T E BPool I * * * * * * * * * * ------ -------- -------- -------- -------- ------ -------- - - -------- - DBOC0001 NNAGAI SYSDEFLT BP0 546 NNAGAI U BP1 N DBOCA001 NNAGAI SYSDEFLT BP0 545 NNAGAI U BP1 N DROP DBOCMNN1 NNAGAI SYSDEFLT BP0 1120 NNAGAI E BP1 N ******************************* END OF DB2 DATA *******************************
- On the Drop Database
(ADB26DD) panel, ensure that the Display Drop Impact Report
field is set to YES, and press Enter:
Figure 2. The Drop Database panel (ADB26DD) DB2 Admin ---------------------- DD1A Drop Database --------------------- 15:38 Command ===> DROP DATABASE Name ===> DBOCMNN1 (? to look up) All objects in the database will be dropped. Display Drop Impact Report ===> YES (Yes, No, or Batch)
The DROP Impact Analysis Summary (ADB2DIP) panel is displayed. The following figure shows a portion of this panel.Figure 3. DROP Impact Analysis Summary (ADB2DIP) panel DB2 Admin -------------- DD1A DROP Impact Analysis Summary -------------- 12:47 Command ===> Scroll ===> PAGE SQL Statement: DROP DATABASE "DBOCMNN1" Line commands: S - Show blank - Suppress Items to Items to Constraints to DROP or REVOKE Count Invalidate Count Remove Count ---------------- ------- ---------- ------- -------------------- ------- S Databases . . . : 1 S Aliases . : 1 S Check Constraints . : 0 S Table spaces . : 3 S Packages : 0 S Ref. Constraints . : 0 S Tables . . . . : 2 S Plans . . : 0 S Unique Constraints : 4 S Aux. tables . . : 0 ======= S Masks . . . . . . . : 0 S XML tables . . : 0 Total . . : 1 S Permissions . . . . : 0 S History tables : 0 ======= S Clone tables . : 0 Total . : 4 S Indexes . . . . : 4 S Authorizations : 0 S Synonyms . . . : 0 S Views . . . . . : 1 S Procedures . . : 0 S Functions . . . : 0 S Triggers . . . : 1 S User data types : 0 S Sequences . . . : 0 S Packages . . . : 0 S Variables . . . : 0 ======= Total . : 12
-
Press Enter to display the DROP Impact Analysis
Details (ADB2DIPD) panel. This panel displays all objects that are impacted by dropping the object. The
following figure shows a portion of this panel.
Figure 4. Partial display of the DROP Impact Analysis Details (ADB2DIPD) panel DB2 Admin ---------- DD1A DROP Impact Analysis Details ----- Row 1 to 17 of 17 Command ===> Scroll ===> PAGE SQL Statement: DROP DATABASE "DBOCMNN1" Commands: RE-SORT DROP Line commands: S - Show object DRD - DROP RESTRICT on DROP Owner/ Sel Type Object Name/Grantor>Grantee Schema Note * * * * --- ------ --------------------------- -------- ------------------------------- D----- DBOCMNN1------------------- NNAGAI S DBOCMNN1.TSOCM231 NNAGAI UTS - PBG T TBOCM231_TEACHER_PBR NNAGAI ALI NNGVAL NNAGAI Orphaned Alias UC TEACHER_ID NNAGAI Primary key UC TEACHER_ID1 NNAGAI Unique key X IU01_TEACHER_PBR NNAGAI Cluster X IU02_TEACHER_PBR NNAGAI J MYTRIG2INT NNAGAI S DBOCMNN1.TSOCM232 NNAGAI Segmented T TBOCM232_TEACHER_PBG NNAGAI UC TEACHER_ID NNAGAI Primary key UC TEACHER_ID1 NNAGAI Unique key X IU01_TEACHER_PBG NNAGAI Cluster X IU02_TEACHER_PBG NNAGAI S DBOCMNN1.TSOCM233 NNAGAI UTS - PBG V NNVWTCH NNAGAI View of a Table
On the DROP Impact Analysis Details (ADB2DIPD) panel, you can issue the following commands:
- Primary commands
-
- RE-SORT
- Re-sorts the table to its original sequence.
- DROP
- Proceed to drop the
object.Restriction: On the panel, you must type the Drop command on the primary command line and press Enter. You cannot issue the command by positioning the cursor on the DROP primary command and pressing Enter.
- Sort
- Sort the table based on one or more columns.
- Line commands
-
- S
- Shows more details about an object.
- DRD
- Drop Restrict on Drop for the object.