Creating SQL triggers to override WebSphere Commerce database table triggers
If you need to override the SQL database table
triggers that are provided for WebSphere Commerce database tables,
you can create your own custom triggers to override the default triggers.
About this task
To create your own SQL triggers for provided WebSphere
Commerce database tables, you must drop the existing database triggers
and then create your triggers. The SQL to drop and create the triggers
for the database tables must be added to the following files:
- WC_installdir/schema/dbtype/wcs.stage.trigger.sql
- WC_installdir/schema/dbtype/wcs.droptrigger.sql
- WC_installdir\schema\dbtype\wcs.stage.trigger.sql
- WC_installdir\schema\dbtype\wcs.droptrigger.sql
These
files contain the SQL triggers for the database tables that are provided
with WebSphere Commerce. If you apply a Feature Pack to your instance,
new tables can be added to your WebSphere Commerce instance. The staging
triggers for the tables that are added through Feature Packs are in
the following files:
- WC_installdir/components/foundation/schema/fep{#}/{dbtype}/wcs.stage.trigger.foundation.sql
- WC_installdir/components/foundation/schema/fep{#}/{dbtype}/wcs.stage.trigger.foundation.drop.sql
The stagingcopy utility and the stagingprop utility can run these files to drop and create or re-create triggers.
Attention: Any custom
triggers that you create for database tables that are provided with
WebSphere Commerce can be overwritten when you apply maintenance fixes
or upgrade to a new Feature Pack or Fix Pack level.