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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Can you query Oracle to ask how busy the server is?

Re: Can you query Oracle to ask how busy the server is?

From: Jerome <vitalismanREMOVETHAT_at_gmail.com>
Date: Mon, 18 Apr 2005 16:11:41 +0200
Message-Id: <pan.2005.04.18.14.11.41.189000@gmail.com>


On Mon, 18 Apr 2005 06:33:05 -0700, deanbrown3d wrote:

> Ok I will check them, thanks for the help. All I wanted really was a
> warning that some big process is occurring right now, and that's why my
> project work is either hanging or exceedingly slow. WHen you're
> programming up a DB-based app, if it suddenly starts not responding
> when you run it, its sometimes not obvious that its a busy server, more
> likely that you messed up!
>
> Dean

Hi,

As others suggested, a quick solution would be to use v$sysstat (you must have been given the privilege to query this view):

SQL> create global temporary table tmp_sysstat on commit preserve rows as select

Table created.

SQL> select n.value-o.value from tmp_sysstat o,v$sysstat n where n.name like 'CP U used by this session' and n.statistic#=o.statistic#;

N.VALUE-O.VALUE


              2

Same query a few seconds later:

SQL> select n.value-o.value from tmp_sysstat o,v$sysstat n where n.name like 'CP U used by this session' and n.statistic#=o.statistic#;

N.VALUE-O.VALUE


             36

If the increment is big, you can assume there is some significant instance activity.

Of course you can play with the v$...stat views further to pinpoint the CPU usage.

HTH
Jerome Received on Mon Apr 18 2005 - 09:11:41 CDT

Original text of this message

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