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

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.
Updated on 2013-03-28T07:29:03Z at 2013-03-28T07:29:03Z by quchl
  • nivanov1
    nivanov1
    231 Posts
    ACCEPTED ANSWER

    Re: How to find the failed sql statement in application

    ‏2013-03-27T15:18:04Z  in response to quchl
    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
      ACCEPTED ANSWER

      Re: How to find the failed sql statement in application

      ‏2013-03-28T07:29:03Z  in response to nivanov1
      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