Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2009
    Posts
    272

    Unanswered: uncommitted select statement

    DB2 V9.5 FP5 : Single partitioned environment

    Our diaglog complained that one the transaction was using more log space.
    This is what the message said. "Active log is held by application handle 6783".

    When I took a snapshot of that application it showed a select statement.

    Select * from table

    The application's idle time was more than a day.


    Does a select statement consume transaction logs ? Could this situation happen because that select statement was not committed ? Does an uncommitted select statement use transaction logs at all? I am kind of confused. Can someone help me clariy ?

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    No, queries do not write to the transaction log. Apparently, there was an update executed in the same unit of work before the SELECT that you saw in the snapshot.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Nov 2011
    Posts
    334
    Could you plz provide the output of " get snapshot for applications agentid 6783"?
    Maybe the transaction is waiting for committing.

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Even though no data is written to the logs during a select, you want to make sure that a commit is issued (implicitly or explicitly) in order to release the share locks on the table or row (or page if z/OS).
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

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