Unix Technical Forum

Catalog-view to get tablespace-state?

This is a discussion on Catalog-view to get tablespace-state? within the DB2 forums, part of the Database Server Software category; --> On DB2 EEE v8.2 on Linux/Windows/Unix, is there any catalog view that I can query with SQL to find ...


Go Back   Unix Technical Forum > Database Server Software > DB2

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 07:27 AM
mike
 
Posts: n/a
Default 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 ?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 07:27 AM
Eugene F
 
Posts: n/a
Default Re: Catalog-view to get tablespace-state?

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 07:28 AM
mike
 
Posts: n/a
Default Re: Catalog-view to get tablespace-state?

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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 07:28 AM
Eugene F
 
Posts: n/a
Default Re: Catalog-view to get tablespace-state?

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:46 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com