RE: Trigger problem

RE: Trigger problem

 

  

Hi Richard
SQLCODE -751 illegal COMMIT or ROLLBACK makes sense within the context of a
trigger - any triggered action must form part of the same unit of work, so
it follows you cannot COMMIT or ROLLBACK within that procedure, since the
UOW doesn't end until the procedure does! If the procedure is called outside
a trigger, an explicit COMMIT inside the procedure is of course perfectly
valid, even desirable.
HTH
Alex Levy
Sustainable Software Ltd.

> -----Original Message-----
> From: Olsen Richard N.
> [mailto:db2udbdba-ezmlmshield-x65660668.[Email address protected]
> Sent: 6 May 2008 16:36
> To: LazyDBA Discussion
> Subject: Trigger problem
>
> Error: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2]
> SQL0723N An error occurred in a triggered SQL statement in
> trigger "SERDB.TRE07ADD". Information returned for the error
> includes SQLCODE "-751", SQLSTATE "38003" and message tokens
> "STORED PROCEDURE,SERDB.E06ADD ". SQLSTATE=09000, SQL State:
> 09000, Error Code:
> -723
>
>
>
> I am receiving the above error anytime I attempt an insert on
> table E07.
> Upon insert, the trigger should call a stored procedure which
> updates records on table E06. Both trigger and stored
> procedure were created without error. The above message
> doesn't make any sense given the situation, the reference
> manual doesn't help me either. I'm running V7.1 on Z/os.
> Would anyone have suggestions on what I should do? The stored
> procedure works fine when testing under procedure builder.
>
>
>
> Thank you,
>
>
>
> Richard N. Olsen
>
> Database Administrator
>
> SC Department of Disabilities & Special Needs
>
> Phone: (803) 898-9811
>
> Email: [Email address protected]
>
>
>
>
>
> ---------------------------------------------------------------------
> TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
> To post a dba job: http://jobs.lazydba.com To Subscribe :
> http://www.LazyDBA.com To unsubscribe:
> http://www.lazydba.com/unsubscribe.html
>
>
>
>
>
>
> E-mail message checked by Spyware Doctor (5.5.0.212) Database
> version: 5.09760 http://www.pctools.com/en/spyware-doctor/





E-mail message checked by Spyware Doctor (5.5.0.212)
Database version: 5.09760
http://www.pctools.com/en/spyware-doctor/

DB2 & UDB email list listserv db2-l LazyDBA home page