Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Posts
    14

    Question Unanswered: Figuring out state of tablespaces and other..

    Hi,

    1.
    What is the best way to figure out the "State" of tablespaces.

    One of the way is to use the "list tablespaces show detail" command and parse the output.

    Question is, is there a more direct and/or better way to figure this out.

    The requirement here is to ensure that the tablespaces are in "normal" state when logging in a piece of hardware. If not do some auto corrective action, to make it normal, so that the database is usable and the apps on that hardware works ok.

    2.
    Within the app, along with the tablespace check, I'm also planning to check the status of each tables in the DB using the following SQL:

    "select status from syscat.tables where tabname = 'whatevertable' ".

    If the status is not as expected, I'm running the following corrective SQL:

    " set integrity for whatevertable immediate checked "

    Any thoughts.

    Thanks in advance.
    M2001

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

    Re: Figuring out state of tablespaces and other..

    For 1, you can use Admin APIs ...

    For 2, Technically that is OK ...

    But in practice, why do you think the table would have gone to a check pending status ... It will be nice to ensure that your previous apps which put the table in check pending state should be followed by a script that will do 'SET INTEGRITY' on all affected tables ...
    The same is true in the first case also ...

    Cheers

    Sathyaram

    Originally posted by M2001
    Hi,

    1.
    What is the best way to figure out the "State" of tablespaces.

    One of the way is to use the "list tablespaces show detail" command and parse the output.

    Question is, is there a more direct and/or better way to figure this out.

    The requirement here is to ensure that the tablespaces are in "normal" state when logging in a piece of hardware. If not do some auto corrective action, to make it normal, so that the database is usable and the apps on that hardware works ok.

    2.
    Within the app, along with the tablespace check, I'm also planning to check the status of each tables in the DB using the following SQL:

    "select status from syscat.tables where tabname = 'whatevertable' ".

    If the status is not as expected, I'm running the following corrective SQL:

    " set integrity for whatevertable immediate checked "

    Any thoughts.

    Thanks in advance.

Posting Permissions

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