I have 2 applications writing to a single table. A couple times a week a transaction is rolled back because of a deadlock/timeout. The applications batch their inserts, but I do not know if it's 1 transaction with multiple insert statements or a single transaction for every insert statement.
Is there a db2pd command or similar tool I can use to see if records inserted into the table were from a single transaction? I'm open to any suggestions that will help me learn more about how the database handled the transactions.
You need to know whether it is a deadlock or a timeout. You approach each one differently. With a deadlock, you can use an event monitor to locate the cause. With a timeout, you have a transaction taking up a lot of time and not releasing locks in a timely manner. Look here for how to diagnose these: IBM DB2 9.5 Information Center for Linux, UNIX, and Windows