-
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