Chapter 5 Building Triggers and Procedures
Rebuilding triggers manually
You can rebuild triggers manually at any time.
To rebuild triggers manually:
- Select Tools→Rebuild Objects→Rebuild Triggers to open the Trigger Rebuild window.
- Specify a rebuild mode. You can choose between the following options:
- Delete and Rebuild – all triggers attached to templates are deleted and rebuilt, including those to which you have made modifications
- Preserve – only those triggers attached to templates that have not been modified are deleted and rebuilt. Any triggers that you have modified are preserved.
- The Trigger selection box shows an expandable tree view of trigger types. There are three levels in this tree:
- All trigger types supported by the current DBMS
- All trigger templates corresponding to the trigger types
- All template items defined for each trigger template
For example, in the list below, the two template items InsertChildParentExist
and InsertTooManyChildren
are used in the BeforeInsertTrigger
template that is, in turn, used in all triggers with a time of Before
and an event type of Insert
:
You can select which trigger types, trigger templates, and template items will be rebuilt by expanding the appropriate nodes and selecting or clearing the check boxes as required.
- <optional> Click the Error Messages tab to define the types of error messages to generate. For more information about this tab, see the "Creating and generating user-defined error messages" section.
- <optional> Click the Selection tab. to specify which tables to rebuild the triggers for.
- Click OK to begin the rebuild process.
Progress is shown in the Output window. You can view the triggers that have been created from the Triggers page of the table property sheet, or from the List of Triggers.
Copyright (C) 2005. Sybase Inc. All rights reserved.
|
|