MobiLink model generated After Update trigger causing recursive error -
03-16-2010
, 02:57 PM
Hi,
I've created a new MobiLink model using the wizard but am running
into
a problem with the generated After Update triggers recursively
firing.
The geneated trigger is as follows:
CREATE TRIGGER "syusr_user_upd" AFTER UPDATE
OF "syusr_id", "syusr_name", "syusr_is_readonly",
"syusr_termination",
"syusr_created_user", "syusr_created_date", "syusr_changed_user",
"syusr_changed_date", "syusr_staff_type", "locsvc_id",
"created_global_database_id", "changed_global_database_id",
"syusr_pwd", "syusr_is_dba", "syusr_upload_encounters"
ORDER 1
ON "app_owner"."syusr_user"
REFERENCING
NEW AS inserted
OLD AS deleted
FOR EACH STATEMENT
BEGIN
/* Update the column last_updated in modified row. */
UPDATE "app_owner"."syusr_user"
SET "last_updated" = CURRENT TIMESTAMP
FROM inserted
WHERE "app_owner"."syusr_user"."syusr_id" =
inserted."syusr_id";
END;
Here is the output from the database log showing the trigger
recursively firing:
I. 03/16 12:07:11. <,8,PREPARE,update "syusr_user" SET "syusr_pwd"
=ENCRYPT ( ? , '=2v3crETuC9@7raj' ) WHERE "syusr_id" =?
I. 03/16 12:07:11. >,8,PREPARE,131120
I. 03/16 12:07:12. <,8,DESC_OUT,131120
I. 03/16 12:07:12. >,8,DESC_OUT
I. 03/16 12:07:12. <,8,DESC_IN,131120
I. 03/16 12:07:12. >,8,DESC_IN
I. 03/16 12:07:12. <,8,EXEC,131120
I. 03/16 12:07:12. H,8,0,nvarchar,'tester4'
I. 03/16 12:07:12. H,8,1,nvarchar,'tester4'
I. 03/16 12:07:12. [,8,syusr_user_upd,9,update app_owner.syusr_user
set last_updated = current timestamp from inserted where
app_owner.syusr_user.syusr_id = inserted.syusr_id
I. 03/16 12:07:12. [,8,syusr_user_upd,9,update app_owner.syusr_user
set last_updated = current timestamp from inserted where
app_owner.syusr_user.syusr_id = inserted.syusr_id
I. 03/16 12:07:12. [,8,syusr_user_upd,9,update app_owner.syusr_user
set last_updated = current timestamp from inserted where
app_owner.syusr_user.syusr_id = inserted.syusr_id
I. 03/16 12:07:12. [,8,syusr_user_upd,9,update app_owner.syusr_user
set last_updated = current timestamp from inserted where
app_owner.syusr_user.syusr_id = inserted.syusr_id
I. 03/16 12:07:12. [,8,syusr_user_upd,9,update app_owner.syusr_user
set last_updated = current timestamp from inserted where
app_owner.syusr_user.syusr_id = inserted.syusr_id
I. 03/16 12:07:12. [,8,syusr_user_upd,9,update app_owner.syusr_user
set last_updated = current timestamp from inserted where
app_owner.syusr_user.syusr_id = inserted.syusr_id
I. 03/16 12:07:12. [,8,syusr_user_upd,9,update app_owner.syusr_user
set last_updated = current timestamp from inserted where
app_owner.syusr_user.syusr_id = inserted.syusr_id
I. 03/16 12:07:12. [,8,syusr_user_upd,9,update app_owner.syusr_user
set last_updated = current timestamp from inserted where
app_owner.syusr_user.syusr_id = inserted.syusr_id
I. 03/16 12:07:12. [,8,syusr_user_upd,9,update app_owner.syusr_user
set last_updated = current timestamp from inserted where
app_owner.syusr_user.syusr_id = inserted.syusr_id
I. 03/16 12:07:12. [,8,syusr_user_upd,9,update app_owner.syusr_user
set last_updated = current timestamp from inserted where
app_owner.syusr_user.syusr_id = inserted.syusr_id
I. 03/16 12:07:12. [,8,syusr_user_upd,9,update app_owner.syusr_user
set last_updated = current timestamp from inserted where
app_owner.syusr_user.syusr_id = inserted.syusr_id
.....
I. 03/16 12:07:24. I,8,0,1,1,
I. 03/16 12:07:24. P,8,UPDATE KEYSET[ inserted<seq> JNL
syusr_user<ASA142> ]
I. 03/16 12:07:24. ],8,syusr_user_upd,9
I. 03/16 12:07:24. I,8,0,1,2,
I. 03/16 12:07:24. P,8,UPDATE KEYSET[ inserted<seq> JNL
syusr_user<ASA142> ]
I. 03/16 12:07:24. ],8,syusr_user_upd,9
I. 03/16 12:07:24. I,8,0,1,3,
I. 03/16 12:07:24. P,8,UPDATE KEYSET[ inserted<seq> JNL
syusr_user<ASA142> ]
I. 03/16 12:07:24. ],8,syusr_user_upd,9
I. 03/16 12:07:24. I,8,0,1,4,
....
I. 03/16 12:07:34. P,8,UPDATE KEYSET[ inserted<seq> JNL
syusr_user<ASA142> ]
I. 03/16 12:07:34. ],8,syusr_user_upd,9
I. 03/16 12:07:34. I,8,0,1,1006,
I. 03/16 12:07:34. P,8,UPDATE KEYSET[ syusr_user<ASA142> ]
I. 03/16 12:07:34. E,8,-274,Procedure or trigger calls have nested
too
deeply
I. 03/16 12:07:34. >,8,EXEC
I. 03/16 12:07:34. <,8,ROLLBACK
I'm at a loss to understand why this trigger is repeadly firing so
any
help would be appreciated.
thanks,
Steve |