If you run the following statement, there are differing commit and rollback increases, whether run in Toad, or in the Command Line Processor (CLP):
select COMMIT_SQL_STMTS,ROLLBACK_SQL_STMTS from SYSIBMADM.SNAPDB
- When you execute this script several times in Command Line Processor with commit, the count of commit and rollback increases by 1.
- When you run this statement several times in Toad for DB2, with the Autocommit option On, the count of commit increases by 3 and rollback increases by 2.
What is the reason for the differing behaviour?
Toad may issue rollback/commits at various points in its procesing.
This is to be sure that there are no residual CATALOG LOCKS being held.
Toad uses the .NET data provider, which is different from CLP. Sometimes the data provider, at times, may hold catalog locks, so additional COMMITS/ROLLBACKS were added to the code. This is normal behavior.