Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    33

    Arrow Unanswered: How to check which tablespace an index is in?

    Hi all,

    pls help on the captioned, thanks!

    ME

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    In the catalog view syscat.tables there is a column called index_tbspace that should provide what you need. If it is null, the indexes for the table are in the same tablespace as the data (tbspace).

    In version 8, the syscat.indexes view has added a column called TBSPACEID which maps to the tablespace name in syscat.tablespaces.
    Last edited by Marcus_A; 03-30-04 at 23:40.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Mar 2004
    Location
    San Antonio
    Posts
    5
    If you are using DB2 in os/390 or z/os you can use following query
    SELECT TSNAME FROM SYSIBM.SYSTABLES WHERE NAME IN (SELECT TBNAME
    FROM SYSIBM.SYSINDEXES WHERE NAME=' index name')

Posting Permissions

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