Trigger Nodes

This section covers the following topics:

How the Trigger Nodes Work

The Trigger node is a child of the Triggers node. It represents an associated trigger on a table or view. Double-clicking a Trigger node displays the trigger specification and body in the PL/SQL Code Editor for editing.

To perform actions on a Trigger node, right-click on the node and from the menu, choose the appropriate command. To view the node's properties, select the node and/or click Properties in the node's menu.

Menu Options

Menu Option Description

Edit

Edits the trigger in the PL/SQL Code Editor. Alternatively, you can double-click the Trigger node to display its specification and body in the PL/SQL Code Editor.

Compile

Compiles the trigger.

Compile Debug

Compiles the trigger with debug information.

This is required before PL/SQL code can be debugged. See Compiling a PL/SQL Program with Debug Information.

Generate Create Script

Writes the trigger definition to a .sql file.

If the object associated with the trigger node is deleted from the database backend, this menu option does the following:

Displays a message indicating that this object no longer exists in Oracle Database, and the script will not be generated.

Generate Create Script to Project

Generates the trigger definition to a .sql file and adds the .sql file to an open Oracle Database Project.

If multiple objects in Server Explorer are selected, a master SQL script is created in the Oracle Database Project Scripts folder. This master script contains calls to individual child SQL scripts (one for each schema object) generated into the various schema object folders and this master script is ordered with dependencies taken into consideration.

If there are multiple open Oracle Database projects, Visual Studio prompts you to select the project to add the script to.

This operation can also be performed by dragging and dropping the Server Explorer node(s) directly onto a database project folder.

See Managing Oracle Script Files for more information.

Note: Oracle Database Project Version 2 projects are not supported. To add scripts to this project type, use Import Schema or Add Existing Item menu items on an Oracle Database Project Version 2 project folder, or use the Schema Compare tool.

Dependencies and References

Opens the Dependencies and References Viewer for viewing the dependencies that this object has on other database schema objects.

Copy

Copies the trigger.

Delete

Drops the trigger.

Refresh

Updates the Trigger node.

Properties

Displays the Properties window.