Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2002
    Location
    Delaware
    Posts
    186

    Unanswered: Mimic DB stats with db2look

    I am trying to copy the stats for my prod db to my dev db, I am running db2look -d database -m -o output.file, when I go to import, it tells me its unable to update the entry in the database. It doesn't exist. How does it get created.

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: Mimic DB stats with db2look

    Can you post the message and the statement which issues it ...

    Cheers

    Sathyaram

    Originally posted by quigleyd
    I am trying to copy the stats for my prod db to my dev db, I am running db2look -d database -m -o output.file, when I go to import, it tells me its unable to update the entry in the database. It doesn't exist. How does it get created.

  3. #3
    Join Date
    Nov 2002
    Location
    Delaware
    Posts
    186
    I ran the db2look command to mimic the stats to copy to the other system. The following is 1 of the many messages I get,

    UPDATE SYSSTAT.COLUMNS SET COLCARD=0, NUMNULLS=0, AVGCOLLEN=5 WHERE COLNAME = 'VARDATA' AND TABNAME = 'AANK' AND TABSCHEMA = 'SAPR3
    '
    SQL0100W No row was found for FETCH, UPDATE or DELETE; or the result of a
    query is an empty table. SQLSTATE=02000

    I need to load these stats so I can test some query's and figure out whats going wrong with them and check their performace.

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    If you are trying to update the sysstat.columns view, you will have to be the owner of the table (eg. AANK) or control over the table or be the DBADM ...

    If you look at the view defn of SYSSTAT.COLUMNS(text column in SYSCAT.VIEWS) you will see that only tables over which the connected user has privileges is included in the view.

    HTH

    Cheers

    Sathyaram


    Originally posted by quigleyd
    I ran the db2look command to mimic the stats to copy to the other system. The following is 1 of the many messages I get,

    UPDATE SYSSTAT.COLUMNS SET COLCARD=0, NUMNULLS=0, AVGCOLLEN=5 WHERE COLNAME = 'VARDATA' AND TABNAME = 'AANK' AND TABSCHEMA = 'SAPR3
    '
    SQL0100W No row was found for FETCH, UPDATE or DELETE; or the result of a
    query is an empty table. SQLSTATE=02000

    I need to load these stats so I can test some query's and figure out whats going wrong with them and check their performace.

  5. #5
    Join Date
    Nov 2002
    Location
    Delaware
    Posts
    186
    I have dbadm access when I try to run this, I have tried running it as the SAPR3 account too, with no luck, any other ideals.

Posting Permissions

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