Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Query for active tablespaces

Re: Query for active tablespaces

From: <fitzjarrell_at_cox.net>
Date: Wed, 10 Oct 2007 07:40:21 -0700
Message-ID: <1192027221.744994.184830@19g2000hsx.googlegroups.com>


On Oct 10, 9:08 am, Chuck <skilover_nos..._at_bluebottle.com> wrote:
> Does anyone have a query to show which tablespaces are currently being
> used by a session? What I'm using now is pretty basic and I don't think
> it will work if any of the segments are partitioned.
>
> The oracle version is 9.2. Here's the query I'm using now.
>
> SELECT DISTINCT s.tablespace_name
> FROM v$access a, dba_segments s, v$session sx
> WHERE
> /* joins */
> s.owner = a.owner
> AND s.segment_name = a.OBJECT
> AND s.segment_type = a.TYPE
> AND a.SID = sx.SID
> /* filters */
> AND sx.status = 'ACTIVE';
>
> TIA
Why wouldn't it work with partitioned tables? I'm having no problem returning accurate results in a database containing partitioned tables.

David Fitzjarrell Received on Wed Oct 10 2007 - 09:40:21 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US