Support of nested transactions within IBM DB2 Stored Procedure
Posted on 2006-05-08
Does IBM DB2 support nested transactions? I would like to have a stored procedure that logs messages and errors to a database table and then leverage the stored procedure within other stored procedures. However, when I have a stored procedure that is in the middle of a database transaction and then calls the "logging stored procedure", I want to make sure the log entry is written which requires a commit. This commits everything including the calling stored procedures transaction. I need to write/commit the log entry while leaving the calling stored procedures transaction open.
From what I can tell it doesn't seem that DB2 allows for nested database transactions, so I'm not sure how I can accomplish this.