Create After-Update Trigger

The MaxL create after update trigger statement helps you create or replace a trigger to track state changes over a selected Essbase cube area. The trigger is activated after a data update operation completes.

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.

Note:

You cannot create or replace a trigger during a calculation, data update, or data load.

Note:

If a calculation assigns the same value to a given cell as was already present before the calculation, then triggers for that cell will not activate. In other words, if cell values are not changed, blocks are not marked as dirty, and triggers for those blocks are not activated, even if the trigger condition was otherwise met.

Syntax


Description of cretrig_aft.gif follows
Description of the illustration cretrig_aft.gif

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

Keywords

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 EastColas_Fail file in the database directory.