Rem drv: Rem Rem $Header: assoc_triggers.sql 01-jul-2005.22:01:29 gsbhatia Exp $ Rem Rem assoc_triggers.sql Rem Rem Copyright (c) 2004, 2005, Oracle. All rights reserved. Rem Rem NAME Rem assoc_triggers.sql - Rem Rem DESCRIPTION Rem Rem Rem NOTES Rem Rem Rem MODIFIED (MM/DD/YY) Rem gsbhatia 07/01/05 - New repmgr header impl Rem gsbhatia 06/26/05 - New repmgr header impl Rem gsbhatia 02/13/05 - updating repmgr header Rem gsbhatia 02/09/05 - updating repmgr header Rem gsbhatia 02/07/05 - updating repmgr header Rem ktlaw 01/11/05 - add repmgr header Rem ramalhot 08/31/04 - cutover to new assoc tables Rem ramalhot 08/25/04 - ramalhot_assoc_cleanup Rem ramalhot 08/19/04 - Created Rem REM REM The following trigger insert default entries into the assoc_defs table REM CREATE OR REPLACE TRIGGER MGMT_ASSOC_DEF_INS_UPD BEFORE INSERT OR UPDATE ON MGMT_TARGET_ASSOC_DEFS FOR EACH ROW DECLARE BEGIN IF :new.scope_target_type IS NULL THEN :new.scope_target_type := mgmt_assoc.GLOBAL_SCOPE_TARGET_TYPE ; END IF; IF :new.name_nlsid IS NULL THEN :new.name_nlsid := :new.assoc_def_name||'_name' ; END IF; IF :new.description_nlsid IS NULL THEN :new.description_nlsid := :new.assoc_def_name||'_description' ; END IF; IF :new.cardinality IS NULL THEN :new.cardinality := mgmt_assoc.OPTIONAL_MULTI_CARDINAL ; END IF; IF :new.association_type IS NULL THEN :new.association_type := mgmt_assoc.ASSOC_TYPE_RELATES_TO ; END IF; END; / show errors;