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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 ? |
| |||
| 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 |
| |||
| 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. |
| ||||
| 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 |