We're in the process of converting our sql stored procedures to db2 luw stored procedures.
Is there a way to set the isolation level for the entire stored procedure like in sql - set transaction isolation level read uncommitted?
I know i could just use "with UR" after every join but would just prefer to do this with one statement. Is this possible and where would you place it in a db2 sp? I've attached an example sp. Where would the statement go for this?
CREATE PROCEDURE TEMP_PROC1 (IN NAMEA VARCHAR(125))
DYNAMIC RESULT SETS 1
DECLARE GLOBAL TEMPORARY TABLE SESSION.TEMP_TABLE
) ON COMMIT PRESERVE ROWS NOT LOGGED WITH REPLACE;
INSERT INTO SESSION.TEMP_TABLE
SELECT NAME FROM SYSIBM.SYSTABLES
WHERE NAME = NAMEA;
DECLARE c2 CURSOR WITH RETURN FOR