Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2004
    Posts
    24

    Unanswered: SQL Logging - How do to get parameter values

    I am trying to diagnose some sql problems on DB2 v9.1. I am using the Activity monitor to check for the SQL statements that I am having the problems with. I can get the SQL statement, but it does not show the values passed into the query statement's parameters:

    select * from FBNEXUS.FBCLIENTTRANS clienttran0_ inner join FBNEXUS.FB_OFFICES fboffice1_ on clienttran0_.OFFICEID=fboffice1_.ID where fboffice1_.ID=? and clienttran0_.TRANSDATE=?

    Is there a way I can get the values for the parameters passed into this query?

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    I think statement event monitor might provide this information, but I'm not sure.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Feb 2004
    Posts
    24
    I tried to create a statement monitor from the control center. It works, but it does not give me the SQL text let alone the parameter values. There must be some way of doing this. How can I log the SQL statments that get executed on DB2?

  4. #4
    Join Date
    Jan 2005
    Posts
    36
    Try using the SNAP_GET_DYN_SQL_v91 snapshot.

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by James Frankman
    I tried to create a statement monitor from the control center. It works, but it does not give me the SQL text
    That probably was a snapshot monitor; what you need is an event monitor.
    ---
    "It does not work" is not a valid problem statement.

  6. #6
    Join Date
    Feb 2004
    Posts
    24
    I have tried the event monitor for statements. Attached is a screenshot of the output I get. Notice that the '?' marks are still in the query. Is there something else I need to configure to show the parameter values?
    Attached Thumbnails Attached Thumbnails screenshot3.PNG  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •