Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2005
    Posts
    73

    Unanswered: Record Deleted/inserted.

    Plese help me in determining This.

    I have a job running. It is inseting few records into the database.
    Is there any way that i can determine the no.of records it is
    inserting per hour? This is actually a batch job from Applicatio side..


    I am trying to schedule another job which deletes thousands of records using delete statements. At the end of job how do i find out how many rows got deleted?

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Code:
    $ db2 get snapshot for application agentid 17 | grep ^Rows
    Rows deleted                               = 0
    Rows inserted                              = 0
    Rows updated                               = 0
    Rows selected                              = 12
    Rows read                                  = 18
    Rows written                               = 0
    Rows read                                  = 0
    Rows written                               = 0
    Rows deleted                               = 0
    Rows updated                               = 0
    Rows inserted                              = 0
    Rows fetched                               = 0

  3. #3
    Join Date
    Oct 2005
    Posts
    109
    one option for your second question is the SQLCA.

    after running your statements (I dunno what you are using, scripts, code or whatever), the SQLCA contains the value of how many rows have been affected in sqlerrd(5).

    See also http://publib.boulder.ibm.com/infoce...n/r0002212.htm

    In progamming C or Java you can get that using methods, on command line use db2 -a.
    Juliane

Posting Permissions

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