Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / September 2006

Tip: Looking for answers? Try searching our database.

tablespace query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
arnoalblas@yahoo.co.uk - 29 Sep 2006 21:05 GMT
Newbie question

Is there a way using SQL to see which tables use a particular
tablespace?
Knut Stolze - 29 Sep 2006 21:30 GMT
> Newbie question
>
> Is there a way using SQL to see which tables use a particular
> tablespace?

SELECT tbspaceid
FROM syscat.tables

or if you prefer the names:

SELECT ( SELECT tbspace
        FROM   syscat.tablespaces AS ts
        WHERE  ts.tbspaceid = t.tbspaceid )
FROM   syscat.tables

Signature

Knut Stolze
DB2 Information Integration Development
IBM Germany

Artur - 01 Oct 2006 00:26 GMT
DB2 Control Center can help you to learn, how to write such SQLs.

Just right click on selected tablespace and choose "Show related", and
then look for the "Show SQL" button. It will show SQL that queries DB2
system calalog. You can do the same with other objects and relations,
like "what are the indexes for the table?".

-- Artur Wronski
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.