Create a new trigger on a view in the system store.
Prerequisites
Database Version
View Trigger Privileges
SAP Sybase IQ 15.3 and 15.4
Requires one of:
DBA authority.
RESOURCE authority and you own the underlying view of the trigger.
SAP Sybase IQ
16.0
Requires one of:
CREATE ANY TRIGGER system privilege.
CREATE ANY OBJECT system privilege.
Also requires one of:
ALTER ANY OBJECT system privilege.
ALTER ANY VIEW system privilege.
You own the underlying view of the trigger.
The
SAP Sybase IQ resource is authenticated and running.
In a multiplex configuration, the coordinator node is
running.
The view on which the trigger resides only references system store tables.
Task
In the Perspective Resources view, select the resource and
select Resource > Administration Console.
In the left pane, select IQ Servers > Schema Objects > Views > Views.
Select a view from the right pane on which to create the trigger and either:
Click the arrow to the right of the name and select
Properties, or
From the Administration Console menu bar, select Resource > Properties.
The Views Properties view appears.
In the left pane, select Triggers.
In the right pane, click New.
The Create Trigger Wizard appears.
On the Welcome page, enter a unique name for the new trigger.
Click Next.
On the Events page, select one or more events to cause the trigger to fire.
Click Next.
On the Level page, indicate whether the trigger is to fire at the row or statement
level.
Click Next.
On the SQL page, enter the statement to be executed when the trigger fires.
Triggers do not fire after the execution of LOAD TABLE, TRUNCATE, or WRITETEXT
statements.
The statement window provides a template on which to build the trigger statement.
The parameters displayed are based on the options selected in the preceding pages.
Once you have made any changes in the statement window, if you return to any of the
preceding pages and change any option, when you return to the SQL page, the contents
of the statement window is overwritten with the base template; any customizations are
lost.
Click Next.
On the Comment page, enter an optional comment.
Click Finish.
Note: Unlike other wizards launched from the
properties view, changes to triggers take effect immediately. You do not need to click
OK or Apply in the properties view to
upload the change to the database.