SQL/MX 2.x Installation and Management Guide (G06.24+, H06.03+)

Adding, Altering, and Dropping SQL/MX Database
Objects
HP NonStop SQL/MX Installation and Management Guide523723-004
9-38
Dropping Triggers
If PURGEDATA fails in response to a process, processor, or system error, it uses
the RECOVER utility to recover the operation. If the PURGEDATA operation
cannot be canceled, RECOVER returns an error.
For more information about the PURGEDATA utility, see Using PURGEDATA to Delete
Data From Tables on page 10-35 and the SQL/MX Reference Manual.
Steps for Dropping a Table’s Data Only
1. Start an MXCI session. Enter a LOG command to initiate a log file for statements
and commands entered in this session. Keep the log for your records.
2. Determine the name of the table containing the data you wish to drop.
3. Use the PURGEDATA utility to drop the data.
4. Make new TMF online dumps of all affected partitions.
For more information and examples of dropping only the data from a table, see the
SQL/MX Reference Manual.
Dropping Triggers
To drop a trigger from an SQL/MX table, use the DROP TRIGGER statement.
To drop a trigger, you must own its schema or be the super ID. If you specify the
CASCADE option for the DROP TRIGGER statement, you can also drop any objects
used by the trigger (for example, tables, views or columns).
For more information, see the SQL/MX Reference Manual.
Steps for Dropping a Trigger
1. Start an MXCI session. Enter a LOG command to initiate a log file for statements
and commands entered in this session. Keep the log for your records.
2. Determine the name of the trigger you wish to drop.
3. Use the DISPLAY USE OF command to identify which user modules are
associated with this object. See the similarity check criteria in the SQL/MX
Programming Manual for C and COBOL and the SQL/MX Programming Manual for
Java to determine if your changes are likely to cause similarly check to fail and
force automatic recompilation. If they will, you should SQL compile these modules
after making the changes to avoid expensive automatic recompilations at run time.
SQL applications that are running while you make these changes will still undergo
automatic recompilation.
For information about explicit and automatic recompilation, see the SQL/MX
Programming Manual for C and COBOL and the SQL/MX Programming Manual for
Java. For information about using DISPLAY USE OF, see Checking Module
Dependencies With DISPLAY USE OF on page 11-20 and the SQL/MX Reference
Manual.