How Oracle can see how many connections are modified, number of processes, number of users, and relationships between the three

Source: Internet
Author: User
Tags dedicated server

Sql> Select COUNT (*) from V$session #连接数
Sql> Select Count (*) from v$session where status= ' ACTIVE ' #并发连接数
Sql> Show parameter Processes #最大连接

Process: This parameter limits the number of operating system processes that can connect to the SGA (or the number of threads in the Windows system), which must be large enough to be applied to the background process and all dedicated server processes, in addition, The number of shared server processes and scheduling processes is also counted. Therefore, in a dedicated server environment, this is a way to limit the number of concurrent connections.

Sessions: is applied to the Oracle hierarchy, not the operating system hierarchy. This parameter limits the number of concurrent logons to a specified instance without considering logging on through a dedicated server or a shared server.

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 (System permissions that are directly assigned to a user or role):
SELECT * from Dba_sys_privs;
SELECT * from User_sys_privs;

6. View the roles (only the roles owned by the logged-in user) that contain the permissions
SELECT * from Role_sys_privs;

7. View 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;

To modify the maximum number of connections allowed for a database:
alter system SET processes = + scope = SPFile;

To view the number of cursors
Select * from V$open_cursor Where user_name= '

Maximum number of connections allowed for query database:
Select value from v$parameter where name = ' processes ';
Or: Show parameter processes;

Maximum number of cursors allowed for query database:
Select value from v$parameter where name = ' Open_cursors '

View Oracle Versions
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 how many connections are modified, number of processes, number of users, and relationships between the three

Related Article

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.