DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: active users query

  1. #1
    Join Date
    Mar 2008
    Posts
    140

    active users query

    We are having oracle application server and at backend oracle Database server.

    What is the sql Query to know how many users are using the application concurrently?


    thanks,

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    What exactly are you looking for?
    Is this what you mean?

    Code:
    SET ECHO OFF
    SET LINESIZE 132
    COLUMN username FORMAT A20
    COLUMN machine  FORMAT A40
    COLUMN program  FORMAT A20
    COLUMN cnt      FORMAT 999
    SELECT username, machine, SUBSTR(program, 1, 20) program, COUNT(*) cnt
    FROM v$session
    WHERE username IS NOT NULL
    GROUP BY username, machine, program
    ORDER BY 1,2,3;
    SET ECHO ON

  3. #3
    Join Date
    Mar 2008
    Posts
    140
    How can I know the IP address or hostname of the client from where the application is launched.


    thanks,

  4. #4
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Check MACHINE column on v$session system view.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width