Re: how to get the tablespace containers through JDBC

Re: how to get the tablespace containers through JDBC

 

  

Raghu,

I'm not sure why you're specifying JDBC, but if you're at v8.1 or above you can use a "snapshot" table to get tablespace container information. You can look up the details in the SQL Reference Vol. 1 under the Chapter on Functions. There's a bunch of interesting ones there. I find "snapshot_container" particularly useful. Where are the containers? What size are they?

To jump start your efforts, here's a sample for your from-clause:

from table(snapshot_container('', -1)) xx

The single-quoted empty string is where the DB alias goes, but if you're already connected, the syntax above works fine. You can also use "cast(null as varchar(255))" or just put in the alias of your DB.

The "-1" works on the currently connected partition. If you're in a single-partition environment, then this is fine. If you're in a multi-partition DB, then use "-2" instead to get info on all partitions. The "-2" will also work in single-partition DBs.

Some correlation variable like "xx" is required.

As with many snapshots, you can get more information depending on which monitor switches are ON at the instance level or in your session.

Hope this helps.

>>> "Raghunandan " <db2udbdba-ezmlmshield-x7490483.[Email address protected] 8/31/2007 12:02:16 AM >>>
Hi All,
I wanted to know how to get the tablespace container details from JDBC.
which table contains the container info.

Thanks
Raghu

*****************************************************************

This e-mail and its attachments contain confidential information from
HUAWEI, which is intended only for the person or entity whose address is
listed above. Any use of the information contained herein in any way
(including, but not limited to, total or partial disclosure, reproduction,
or dissemination) by persons other than the intended recipient(s) is
prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!

*****************************************************************




---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html




******************************************************************************
This e-mail is intended only for the use of the individual or entity
to which it is addressed and may contain information which is
privileged, confidential, and exempt from disclosure under applicable
law. If you are not the intended recipient, or an employee or agent
of the intended recipient, you are hereby notified that any
dissemination, distribution, or copying of this communication is
strictly prohibited. If you have received this communication in error
please notify us immediately by replying to [Email address protected]
******************************************************************************


DB2 & UDB email list listserv db2-l LazyDBA home page