Oracle views and modifies the number of connections (process/session/concurrency, etc.) _oracle

Source: Internet
Author: User
1. Query the current process of the database number of connections:
Copy Code code as follows:

Select COUNT (*) from v$process;

2. View the number of connections for the current session of the database:
Copy Code code as follows:

Elect Count (*) from v$session;

3. View the number of concurrent connections to the database:
Copy Code code as follows:

Select COUNT (*) from v$session where status= ' ACTIVE ';

4. View the session established by the current database:
Copy Code code as follows:

Select Sid,serial#,username,program,machine,status from V$session;

5. The maximum number of connections allowed by the query database:
Copy Code code as follows:

Select value from v$parameter where name = ' processes ';

Or order: Show parameter processes;
6. Modify the maximum number of connections allowed by the database:
Copy Code code as follows:

alter system SET processes = Scope = SPFile;

(Need to restart the database to achieve the number of connections to modify)
To restart the database:
Copy Code code as follows:

Sql>shutdown immediate;
sql>startup;

See which users are currently using the data:
Copy Code code as follows:

Sql>select osuser,a.username,cpu_time/executions/1000000| | ' S ', Sql_fulltext,machine
Sql>from v$session A,v$sqlarea b
Sql>where a.sql_address = b.address
Sql>order by cpu_time/executions Desc;

Note: UNIX 1 user sessions correspond to one operating system process, while Windows embodies the thread.
Start Oracle
Copy Code code as follows:

Su-oracle
Sql>sqlplus system/pwd as SYSDBA/enter SQL
Sql>sta Rtup//Start the database
Sql>lsnrctl start/start listening
Sqlplus "/as sysdba"
Sql>shutdown immediate;//Shutdown Database
S Ql>startup Mount;
Sql>alter database open;

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.