Trigger source code is stored in a data dictionary RDAREA, and trigger SQL objects are stored in a data dictionary LOB RDAREA. The log collection mode for the data dictionary RDAREA is ALL, and the log collection mode for the data dictionary LOB RDAREA is PARTIAL. Therefore, if an error occurs, the source code can be recovered to its most recent status from the backup and the log. The SQL objects, however, can only be recovered to their status at the time of the most recent backup. Therefore, the following considerations are important:
- Always have a recent backup on hand
Make frequent backups of the data dictionary LOB AREA, so that if an error occurs you can recover from a recent backup. Use the pdcopy command with -M x or -M r specified.
For details about how to make backups, see the HiRDB Version 9 System Operation Guide.
- Re-create the trigger SQL objects
If you do not have a recent backup of the data dictionary LOB RDAREA, use the pdmod command to reinitialize the data dictionary LOB RDAREA. Then execute ALTER ROUTINE with ALL specified, which will re-create all trigger SQL objects.