Re: SQL statements

From: Pradhan <empradhan_at_dplus.net>
Date: Tue, 27 Jul 1999 00:15:01 -0400
Message-ID: <Hvan3.636$kF2.1886_at_newsfeed.slurp.net>


Oops

2. How many active users are in the system?

     Select * from V$license;
Pradhan

Pradhan wrote in message <2DMl3.259$xA.897_at_newsfeed.slurp.net>...
>
>Puneet Khanna wrote in message <7n7dv4$7g8$1_at_nntp3.uunet.ca>...
>>I want to know SQL statements for -
>>
>>1. Checking how long database instance is up.
> there is a system view named v$lock and look for the column like ttime or
>so.. then
>following will give you the how long instance was up.
>
> select max(time)/86400 from v$lock;
>
>>2. How many active users are in the system.
>
> select count(*) from v$session;
>
> only thing here is it also gives you the background processes and
>in general case they are 6 processes .
>
>>3. Are there any locking problems.
>
> select * from v$lock;
>
>check for the sessions which are not background processes
>lgwr (log writer) and some times smon (system monitor) background
>processes will have lock on some object continuously... disregard them
>and look for the other processes.
>
>>
>>Thanks in advance,
>>Puneet
>>
>
>
>HTH
>Pradhan
>
>
Received on Tue Jul 27 1999 - 06:15:01 CEST

Original text of this message