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

Thread: Database users

  1. #1
    Join Date
    Apr 2007
    Posts
    2

    Database users

    Hello All,

    How can I find " how many users are connected to the database ,which user is connected to which machine and which user is doing what activity at the database level .

    Can somebody help me in this plz.


    bYe,

    Raj

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Code:
    select  s.sid "sid", 
            s.status "status", 
            p.spid "o/s sid", 
            s.serial# "serial #", 
            s.username "db user", 
            s.osuser "client user", 
            s.server "server", 
            s.machine "machine", 
            s.terminal "terminal", 
            s.program "program" 
     from   v$session s, 
            v$process p 
     where  s.paddr = p.addr 
     order by s.status
    /
    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