When a transaction is active, do not issue a SET TRANSACTION statement. A transaction becomes active when a DDL or a DML statement is issued. The only statements that you can place between the BEGIN WORK and the SET TRANSACTION statements are SET statements such as SET EXPLAIN, SET CONSTRAINT, SET DATASKIP, and so on.