If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > How to check which tablespace an index is in?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-30-04, 21:16
john_wsm john_wsm is offline
Registered User
 
Join Date: Mar 2004
Posts: 33
Arrow How to check which tablespace an index is in?

Hi all,

pls help on the captioned, thanks!

ME
Reply With Quote
  #2 (permalink)  
Old 03-30-04, 22:18
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
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.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390

Last edited by Marcus_A; 03-30-04 at 22:40.
Reply With Quote
  #3 (permalink)  
Old 03-31-04, 16:13
damru damru is offline
Registered User
 
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')
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On