Oracle View and modify the maximum number of connections

Source: Internet
Author: User
Tags sessions sqlplus

First step, on the cmd command line, enter sqlplus or Open command window directly in Plsql

Step two, follow the prompts to enter the user name and password

1. View processes and Sessions parameters

12345678910111213 SQL> show parameter processes  NAMETYPE        VALUE   db_writer_processes                 integer1  gcs_server_processes                integer0  job_queue_processes                 integer10   log_archive_max_processes           integer2  processes                           integer50

12345678910111213 SQL> show parameter sessions  NAMETYPE        VALUE  license_max_sessions                integer0  license_sessions_warning            integer0   logmnr_max_persistent_sessions      integer1  sessions                            integer60  shared_server_sessions              integer

 2. Modifying processes and Sessions values  

1234567 SQL> altersystem set processes=300 scope=spfile;   系统已更改。   SQL> alter system set sessions=335 scope=spfile;  系统已更改。

 3. Modifying the processes and sessions values must restart the Oracle server to take effect

The number of connections to Oracle (sessions) is related to the number of processes in its parameter file (process), and their relationships are as follows:
Sessions= (1.1*process+5)

Pick (ii)

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

  To view the number of connections for the current session of the database:
Elect Count (*) from v$session;

  To view the number of concurrent connections for a database:
Select COUNT (*) from v$session where status= ' ACTIVE ';

  To view the session established by the current database:
Select Sid,serial#,username,program,machine,status from V$session;

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

Or: Show parameter processes;

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

(requires restarting the database to make changes to the number of connections)

Restart database:

shutdown immediate;

startup;

See which users are currently working with 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: UNIX 1 users session corresponds to an operating system process, while Windows embodies the thread.

start Oracle

su-oracle

sqlplus system/pwd as SYSDBA//Enter S QL

Startup//Start database

lsnrctl start//Start monitoring

sqlplus "/as sy Sdba "

shutdown immediate;

startup mount;

ALTER DATABASE open;

However: I changed the maximum to 1200,java 356 and then the error

Oracle View and modify the maximum number of connections

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.