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: Questions for DBAs

Re: Questions for DBAs

From: Mark Malakanov <markmal_at_sprint.ca>
Date: Sat, 26 Jun 1999 20:14:28 -0300
Message-ID: <w_dd3.164982$r_1.37866803@newscontent-02.sprint.ca>

<argosy22_at_my-deja.com> wrote in message news:7l0kfr$d0b$1_at_nnrp1.deja.com...
> Hi all,
>
> I have been querying the data dictionary, finding
> out lots about it.
>
> I'm still trying to figure out:
> - what is the query to find out which queries
> are currently running

select s.username,st.sql_text
from v_$sqlarea sa, v_$sqltext st, v_$session s where
  s.status='ACTIVE' and
  s.username is not null and
  sa.address=st.address and
  s.sql_address=sa.address
order by sa.hash_value, st.piece;

> - what is the query to find out how much "space"
> a user currently available to them (or is left for
> everyone)

select q.username, q.tablespace_name, q.bytes used_bytes,  decode(max_bytes,-1,'UNLIMITED',max_bytes) quota,  sum(f.bytes) ts_free_bytes
from dba_free_space f, dba_ts_quotas q
where q.tablespace_name = f.tablespace_name group by q.username, q.tablespace_name, q.bytes, q.max_bytes;

Regards,
Mark Received on Sat Jun 26 1999 - 18:14:28 CDT

Original text of this message

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