Home » SQL & PL/SQL » SQL & PL/SQL » How many users are connected to the database (Oracle 9.2.)
How many users are connected to the database [message #298599] Wed, 06 February 2008 13:14 Go to next message
nghorakavi
Messages: 4
Registered: February 2008
Junior Member
Hi
I am running a SQL query.
Can any one tell me the command (SQL Query) how to get the number of users are connected to the database

Thanks,
Narasimha.
Re: How many users are connected to the database [message #298601 is a reply to message #298599] Wed, 06 February 2008 13:29 Go to previous messageGo to next message
BlackSwan
Messages: 25041
Registered: January 2009
Location: SoCal
Senior Member
SELECT COUNT(*) FROM V$SESSION;
will give a close approximation.
Re: How many users are connected to the database [message #298815 is a reply to message #298599] Thu, 07 February 2008 15:38 Go to previous messageGo to next message
Bill B
Messages: 1484
Registered: December 2004
Senior Member
And to get rid of the database processes, try

select count(*) from v$session where type <> 'BACKGROUND';
Re: How many users are connected to the database [message #298818 is a reply to message #298815] Thu, 07 February 2008 15:47 Go to previous message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
select count(*) from v$session where type <> 'BACKGROUND' and username is not null;

Wink
Regards
Michel
Previous Topic: Db link name problem
Next Topic: ORA-02292: integrity constraint - violated - child record
Goto Forum:
  


Current Time: Tue Dec 06 14:24:56 CST 2016

Total time taken to generate the page: 0.07788 seconds