Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Join Date
    Jan 2003
    Location
    Zutphen,Netherlands
    Posts
    256

    Unanswered: no authority for doing runstats on sysibm.sysattributes

    When running the command:

    reorgchk update statistics for table all

    for a specific database , some databases are correctly handled but one gives an error message concerning not having authority on table sysibm.sysattributes (this table is empty !). I cannot fathom why, since the auth id has all priviliges turned on.

    Is there a way to just run statistics on just the datatables belonging to a certain schema?
    Ties Blom
    Senior Application Developer BI
    Getronics Healthcare
    DB2,ORACLE,Powercenter,BusObj,Access,
    SQL, SQL server

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    You need one of the following to run Reorgchk:

    - sysadm or dbadm authority
    - CONTROL privilege on the table

    There is a schema option on Reorgchk.

  3. #3
    Join Date
    Jan 2003
    Location
    Zutphen,Netherlands
    Posts
    256
    please point out schema syntax if you have this available.........
    Ties Blom
    Senior Application Developer BI
    Getronics Healthcare
    DB2,ORACLE,Powercenter,BusObj,Access,
    SQL, SQL server

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Here is the PDF file for the version 7.2 Command Reference manual. If you go up a level, you can download all the manuals with an FTP program or open them with Acrobat.

    They also have NLS versions of the manuals (in the NLV folder), but I don't know the numbering scheme for a specific language.

    ftp://ftp.software.ibm.com/ps/produc...r/db2n0e71.pdf

  5. #5
    Join Date
    Jan 2003
    Location
    Zutphen,Netherlands
    Posts
    256

    Wink

    Thanks very much for the link (I prefer english stuff anyway :-) )
    Ties Blom
    Senior Application Developer BI
    Getronics Healthcare
    DB2,ORACLE,Powercenter,BusObj,Access,
    SQL, SQL server

  6. #6
    Join Date
    Jan 2003
    Location
    Zutphen,Netherlands
    Posts
    256
    reorgchk update statistics for table system

    does work , updating statistics for the system tables. But for schema target the following throws an error message:

    reorgchk update statistics for table target

    What am i missing in the update statistics run?
    Ties Blom
    Senior Application Developer BI
    Getronics Healthcare
    DB2,ORACLE,Powercenter,BusObj,Access,
    SQL, SQL server

  7. #7
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    What is the error message?

  8. #8
    Join Date
    Jan 2003
    Location
    Zutphen,Netherlands
    Posts
    256
    SQL0104N An unexpected token "target" was found following table.
    Expected tokens may include : "<qualifier.table-name>"
    SQLSTATE = 42601
    Ties Blom
    Senior Application Developer BI
    Getronics Healthcare
    DB2,ORACLE,Powercenter,BusObj,Access,
    SQL, SQL server

  9. #9
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Assuming the name of the table is "target", and the schema name is "db2admin" (as an example), then try the following to run against one table:

    db2 reorgchk update statistics on table db2admin.target

    Use the following to run against all tables in the schema:

    db2 reorgchk update statistics on schema db2admin

  10. #10
    Join Date
    Jan 2003
    Location
    Zutphen,Netherlands
    Posts
    256
    Well the schema name in this case is target (just as the authorization id)
    Perhaps connecting as db2admin will do the trick...

    Alas ,that does not work either...........
    Ties Blom
    Senior Application Developer BI
    Getronics Healthcare
    DB2,ORACLE,Powercenter,BusObj,Access,
    SQL, SQL server

  11. #11
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    db2 reorgchk update statistics on schema target

  12. #12
    Join Date
    Jan 2003
    Location
    Zutphen,Netherlands
    Posts
    256
    Nope. Same kind of error message complaining about expecting "table" instead of "schema"
    Ties Blom
    Senior Application Developer BI
    Getronics Healthcare
    DB2,ORACLE,Powercenter,BusObj,Access,
    SQL, SQL server

  13. #13
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    db2 reorgchk update statistics on table all

    What version and fixpak of DB2 are you using? What Operating system?

  14. #14
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    OK, it looks like the update statistics can only be used on:

    db2 reorgchk update statistics on table target

    but target is not necessarily a schema (although it can be), but target must be a user that is the run time authorization ID (used to submit the command) and is also the owner of the tables.

  15. #15
    Join Date
    Jan 2003
    Location
    Zutphen,Netherlands
    Posts
    256
    We have version 7.1 running (out of the box) on NT , which has done a perfect job sofar.............
    Ties Blom
    Senior Application Developer BI
    Getronics Healthcare
    DB2,ORACLE,Powercenter,BusObj,Access,
    SQL, SQL server

Posting Permissions

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