View and modify connections in Oracle

Source: Internet
Author: User

1. query the number of connections to the current process of the database:
Select count (*) from V $ process;
2. view the number of connections in the current session of the database:
Elect count (*) from V $ session;

3. view the number of concurrent connections of the database:
Select count (*) from V $ session where status = 'active ';
4. view the session information of the current database:
Select Sid, serial #, username, program, machine, status from V $ session;
5. query the maximum number of connections allowed by the database:
Select value from V $ parameter where name = 'processs ';
Or command: Show parameter processes;
6. Modify the maximum number of connections allowed by the database:
Alter system set processses = 300 scope = spfile;
(You must restart the database to modify the number of connections.)

Restart the database:
SQL> shutdown immediate;
SQL> startup;
Check which users are using the data:
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:One session of a Unix user corresponds to an operating system process, while windows is embodied in a thread.

Start Oracle
Su-Oracle
SQL> sqlplus system/pwd as sysdba // enter SQL
SQL> startup // start the database
SQL> LSNRCTL start // start the listener

sqlplus "/As sysdba"
SQL> shutdown immediate; // close the database
SQL> startup Mount;
SQL> alter database open;

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.