The following queries will list all objects for DATA and INDEX tablespaces
Hope this helps
-- Tablespace and tables
SELECT
TS.TBSPACEID
,TS.TBSPACE
,TB.NAME
FROM SYSIBM.SYSTABLESPACES TS
,SYSIBM.SYSTABLES TB
WHERE
( TS.TBSPACE LIKE 'MY_TBSPACE'
AND TS.TBSPACEID = TB.TID)
ORDER BY TB.NAME
WITH UR;
ROLLBACK;
-- Index space, table and indexes
SELECT
TS.TBSPACEID
,TS.TBSPACE
,TI.TBNAME
,TI.NAME
FROM SYSIBM.SYSTABLESPACES TS
,SYSIBM.SYSINDEXES TI
WHERE
TS.TBSPACE LIKE 'MY_IDXSPACE'
AND TS.TBSPACEID = TI.TBSPACEID
ORDER BY TI.TBNAME,TI.NAME
WITH UR;
ROLLBACK;
Raul Delhumeau
-----Original Message-----
From: Sheth Jignesh
[mailto:db2udbdba-ezmlmshield-x54790753.[Email address protected]
Sent: Thursday, January 27, 2005 9:39 AM
To: LazyDBA Discussion
Subject: Tablespace
Hi,
I need to find out what tables, indexes and other objects that are assigned
to a particular tablespace. Is there a command or query that I can run to
list all the objects for a particular tablespace ?
Thanks.
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
DB2 & UDB email list listserv db2-l LazyDBA home page