Topic
  • 2 replies
  • Latest Post - ‏2013-03-28T07:29:03Z by quchl
quchl
quchl
3 Posts

Pinned topic How to find the failed sql statement in application

‏2013-03-27T14:35:47Z |
I want to find the failed sql statement in application.

run command 'db2 get snapshot for all applications'
get below information

Application name = db2wlmd
......
Dynamic SQL statements attempted = 18
Static SQL statements attempted = 7
Failed statement operations = 3

I want to find these 3 failed sql statements. Would you please let me know how? Thanks.
  • nivanov1
    nivanov1
    231 Posts

    Re: How to find the failed sql statement in application

    ‏2013-03-27T15:18:04Z  
    Not sure why you would want to do that. db2wlmd is an internal DB2 process -- the Workload Manager.

    You can create an event monitor for statements and filter the output for the issuing application name and the statement SQLCODE (returned as a part of the SQLCA element).
  • quchl
    quchl
    3 Posts

    Re: How to find the failed sql statement in application

    ‏2013-03-28T07:29:03Z  
    • nivanov1
    • ‏2013-03-27T15:18:04Z
    Not sure why you would want to do that. db2wlmd is an internal DB2 process -- the Workload Manager.

    You can create an event monitor for statements and filter the output for the issuing application name and the statement SQLCODE (returned as a part of the SQLCA element).
    Thanks nivanov1. Actually I just take the db2wlmd as the example.
    Is there any select command to get the failed SQL statement? like select * from table function or from Administrative view