How Oracle can see which users are currently connected to the database

Source: Internet
Author: User

how Oracle can see which users are currently connected to the database
  can execute the following statements: Select username,serial#, sid from V$session;  ---Query user session alter system kill session ' serial#, sid ';---Delete related user sessions   suggest background login Delete user Session 1, query the number of connections to Oracle SELECT COUNT (*) From V$session;2, querying the number of concurrent connections for Oracle SELECT COUNT (*) from v$session where status= ' ACTIVE '; 3, view the number of connections for different users select Username,count (username) from V$session where username are not null GROUP by username;4, view all users: SELECT * from all_users;5, view user or role system permissions (direct assignment System permissions to a user or role): SELECT * from Dba_sys_privs;select * from user_sys_privs;6, view role (can only view roles owned by logged-on users) SELECT * from Role_sys _privs;7, viewing User object permissions: SELECT * FROM Dba_tab_privs;select * from All_tab_privs;select * from user_tab_privs;8, view all roles: SELECT * From dba_roles;9, view the roles owned by the user or role: SELECT * from Dba_role_privs;select * from User_role_privs;10, See which users have SYSDBA or Sysoper system permissions (requires appropriate permissions when querying) SELECT * from v$pwfile_users;  Modify the maximum number of connections allowed for the database: Alter system SET processes = 300 Scope = spfile;  View cursor Count select * from V$open_cursor Where user_name= '   Query database maximum number of connections allowed: Select value from v$ parameter where Name = ' processes '; or: Show parameter processes;  the maximum number of cursors allowed for the query database: Select value from v$parameter where name = ' Open_cursors '   View Oracle version Select banner from sys.v_$version;  displays the number of cursors opened by the user "SYSTEM" for each session in descending order select O.sid, Osuser, Machine, COUNT (*) num_curs  from v$open_cursor O, v$session s  where user_name = ' SYSTEM ' and O.sid=s.sid   GROUP by O.sid, Osuser, machine  order by num_curs desc;

How Oracle can see which users are currently connected to the database

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.