View and modify the maximum number of connections in oracle

Source: Internet
Author: User

View and modify the maximum number of connections in oracle
Step 1: In the cmd command line, enter sqlplus or directly open command window in plsql

Step 2: Enter the user name and password as prompted

1. view the processes and sessions Parameters

SQL> show parameter processes  NAME                                 TYPE        VALUE  db_writer_processes                 integer    1  gcs_server_processes                integer    0  job_queue_processes                 integer    10  log_archive_max_processes           integer    2  processes                           integer    50
SQL> show parameter sessions  NAME                                 TYPE        VALUE  license_max_sessions                integer    0  license_sessions_warning            integer    0  logmnr_max_persistent_sessions      integer    1  sessions                            integer    60  shared_server_sessions              integer
  2. Modify the values of processes and sessions.  
SQL> alter system set processes = 300 scope = spfile; the system has been changed. SQL> alter system set sessions = 335 scope = spfile; the system has been changed.

 3. to modify the processes and sessions values, the oracle server must be restarted to take effect.

The number of ORACLE connections (sessions) is related to the number of processes in the parameter file. Their relationships are as follows:
Sessions = (1.1 * process + 5)

Abstract (2)

  Query the number of connections of the current process in the database:
Select count (*) from v $ process;

   View the number of connections of the current session of the database:
Elect count (*) from v $ session;

   View the number of concurrent connections of the database:
Select count (*) from v $ session where status = 'active ';

   View the Sessions established by the current database:
Select sid, serial #, username, program, machine, status from v $ session;

  Query the maximum number of connections allowed by the database:
Select value from v $ parameter where name = 'processs ';

Or: show parameter processes;

   Modify the maximum number of connections allowed by the database:
Alter system set processses = 300 scope = spfile;

(You need to restart the database to modify the number of connections)

  Restart the database:

Shutdown immediate;

Startup;

   Check which users are using the data:

Select osuser, a. username, cpu_time/executions/1000000 |'s ', SQL _fulltext, machine

From v $ session a, v $ sqlarea B

Where a. SQL _address = B. address

Order by cpu_time/executions desc;

Note: one session in UNIX corresponds to an operating system process, while Windows is reflected in the thread.

Start oracle

Su-oracle

Sqlplus system/pwd as sysdba // enter SQL

Startup // start the database

Lsnrctl start // start the listener

Sqlplus "/as sysdba"

Shutdown immediate;

Startup mount;

Alter database open;

However, when I change the maximum value to 1200, an error is returned in java 356.

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.