• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Qry for Number Of User Connected to SQL/Oracle Database.

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the query to find the no of user connected to Oracle database or SQL database ?
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch!

I'm afraid such functionality is vendor-specific. I cannot help with other databases, but in Oracle you might probably query the V$SESSION performance view (and count number of rows), although you need quite powerful privileges to be able to do this. There might even be a better dynamic view which would contain the aggregated number of sessions, you might want to look in more detail yourself.

Be careful when interpreting the number you get this way. Some users can have several active connections of their own, and conversely one connection can be shared by many users (if it is a connection managed by connection pool on an application server, for example).
reply
    Bookmark Topic Watch Topic
  • New Topic