Create After-Update Trigger

Create or replace a trigger to track state changes over a selected cube area.

Triggers help you track whether designated constraints are violated during updates (events) in the area, and allow you to specify resultant actions to execute if violations are detected. Minimum permission required: Database Manager.

Create an after-update trigger if you want the trigger to be activated after the entire data update operation is completed. This is the only type of trigger supported in aggregate storage mode. When after-update triggers are used, the trigger fires when an update operation on level-0 data cells is complete, and the update operation as a whole has met any condition specified for the cube area.

For more information about the Essbase triggers feature, see the Oracle Essbase Database Administrator's Guide.

Note:

You cannot create or replace a trigger during a calculation, or a data load (including a lock and send).

Syntax

Syntax diagram for create after-update trigger.TRIGGER-NAMECUBE-AREA or MDX-SETCONDITIONACTION

Use create after update trigger to create a trigger in the following ways:

KeywordDescription

create after update trigger

Create a new after-update trigger.

create or replace after update trigger

Create an after-update trigger, or replace an existing trigger of the same name.

where <cube area>

Define the area of the database to be tracked. Use a valid, symmetric MDX slicer specification.

when <condition>

Define the condition to be tested for using the keyword WHEN followed by a valid MDX conditional expression.

then <action>

Define the action to be taken if the WHEN condition is met. See examples in Examples of Triggers.

end

The END keyword must terminate every create trigger statement.

Example

create or replace after update trigger Sample.Basic.EastColas
where (Jan, Sales, Actual, [100], East)
when Jan > 20 then spool EastColas_Fail end;

Logs a message in the $ARBORPATH\app\Sample\Basic\trig\EastColas_Fail file.