468,257 Members | 1,439 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,257 developers. It's quick & easy.

Catalog-view to get tablespace-state?

On DB2 EEE v8.2 on Linux/Windows/Unix, is there any
catalog view that I can query with SQL to find tablespace-state?
The state is not visible via SYSCAT.TABLESPACES.
The state is visible by parsing the output of command "list
tablespaces".
The state is visible via a snapshot view.
BUT the question is whether there is any SQL-query on the catalog (not
snapshot views) that gives the tablespace-state information ?

Mar 21 '06 #1
3 3308
Here is the SQL query that may work for you using snapshot table
function as:

select tablespace_name, tablespace_state from table(
snapshot_tbs_cfg(<your_database_name>, <partition_number>)) s

I see no reason you should be restricted by only using the system
catalog views from SQL.

Regards,
-Eugene

Mar 21 '06 #2
Thanks, I already knew about the snapshot technique, as
per my original posting, however that is only applicable
if you have a database on which db2updv8 has been
run. I have subsequently learned that the answer
to my question for currently released versions of DB2
is that there are only the two methods that I mentioned
in the original posting to achieve what i needed.
So be it.

Mar 22 '06 #3
AFAK, the SQL snapshot tabe functions were available since V8.1, but in
your original message you mentioned you have V8.2 LUW, that's why I
assumed you coud use them including snapshot_tbs_cfg() in your case.

Regards,
-Eugene

Mar 22 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Jefferis NoSpamme | last post: by
2 posts views Thread by Simon Strandgaard | last post: by
4 posts views Thread by Thomas Sommer | last post: by
3 posts views Thread by maricel | last post: by
4 posts views Thread by bikkaran | last post: by
2 posts views Thread by sandeep.manthena | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.