Script sp_add_trigger.sql, sp_change_trigger.sql and sp_remove_triggers.sql invalidates triggers that have REFERENCING clause.
i.e. Before run sp_add_trigger.sql:
CREATE TRIGGER TEST_TRIGGER BEFORE INSERT OR UPDATE ON TEST_TABLE
REFERENCING NEW AS INSERTED
FOR EACH ROW
DECLARE
CtemCount NUMBER;
BEGIN
IF INSERTING OR UPDATING ('SQLN')THEN
:INSERTED.UPPERA := UPPER(:INSERTED.SQLN);
END IF;END;
After run sp_add_trigger.sql:
CREATE trigger TEST_TRIGGER BEFORE INSERT OR UPDATE on TEST_TABLE
FOR EACH ROW WHEN(USER != 'SPLEX')
DECLARE
CItemCount NUMBER;
BEGIN
IF INSERTING OR UPDATING ('SQLN')THEN
:INSERTED.UPPERA := UPPER(:INSERTED.SQLN);
END IF;END;
As you can see, the script removes the REFERENCING clause.
This issue affects three Shareplex util scripts:
Please download the new version (attached) of the script and run it instead of the standard one that is on Shareplex util folder.