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: Another tricky SQL

Re: Another tricky SQL

From: Mladen Gogala <gogala_at_sbcglobal.net>
Date: Sat, 11 Feb 2006 05:47:56 GMT
Message-Id: <pan.2006.02.11.05.47.55.244126@sbcglobal.net>


On Fri, 10 Feb 2006 09:56:02 -0800, Graham wrote:

> 1, 01/01/06 12:00:30, 01/01/06 12:02:28
> 2, 01/01/06 12:00:56, 01/01/06 12:03:01
> 3, 01/01/06 12:02:10, 01/01/06 12:02:90
> 4, 01/01/06 12:05:10, 01/01/06 12:09:58
> 5, 01/01/06 12:06:00, 01/01/06 12:07:24

Your intervals are overlapping. It's almost impossible to do this accurately. Rewriting monitors so that they can count the number of simultaneous occurrences. In addition to that, may be counting processes from V$SESSION or, maybe even using some scripting language and count like this:

#!/usr/bin/perl -w
use strict;
open FL,'pgrep -l "[a-z]mail"|';
my (@proc)=<FL>;
print "There are ",scalar(@proc)," processes active:\n"; map { print "Process:$_"; } @proc;

If your operating system is windows, your best bet is to have a towel and the guide handy. And remember: don't even let a Vogon read you his poetry.

The output is:
There are 3 processes active:

Process:3171 sendmail
Process:3179 sendmail
Process:4255 fetchmail

This can be easily adjusted to count processes with different patterns and done outside of the instance. There are some things for which pathologically eclectic rubbish lister is better suited then Oracle RDBMS.

-- 
http://www.mgogala.com
Received on Fri Feb 10 2006 - 23:47:56 CST

Original text of this message

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