ORACLE Maximum number of connections problem _oracle

Source: Internet
Author: User
Tags semaphore sessions
Show parameter processes;
And then
To change the number of system connections
Alter system set processes=1000 Scope=spfile;
The following is a detailed procedure and instructions
Problem Description: Client Connection Database error
Ora-12516:tns: The listener could not find the available handle for the matching protocol stack
resolution Process:
1. View the current number of sessions, processes, and sessions values, and found that the values of the session number and 2 parameters are already very approximate
Sql*plus:release 10.2.0.1.0-production on Monday October 9 15:50:21 2006
Copyright (c) 1982, +, Oracle. All rights reserved.
Sql> Conn/as SYSDBA
is connected.
Sql> Select COUNT (*) from v$session;
COUNT (*)
----------
45

Sql> Show parameter processes
NAME TYPE VALUE
------------------------------------ ----------- ----------------------
Aq_tm_processes integer 0
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
------------------------------------ ----------- ----------------------
Java_max_sessionspace_size integer 0
Java_soft_sessionspace_limit integer 0
License_max_sessions integer 0
license_sessions_warning integer 0
Logmnr_max_persistent_sessions Integer 1
Sessions Integer 60
Shared_server_sessions integer

2. modifying processes and Sessions values
Sql> alter system set PROCESSES=300 Scope=spfile;
The system has changed.
Sql> alter system set SESSIONS=300 Scope=spfile;
The system has changed.

3. View the processes and sessions parameters, but the changes did not take effect
Sql> Show parameter processes
NAME TYPE VALUE
------------------------------------ ----------- ----------------------
Aq_tm_processes integer 0
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
------------------------------------ ----------- ----------------------
Java_max_sessionspace_size integer 0
Java_soft_sessionspace_limit integer 0
License_max_sessions integer 0
license_sessions_warning integer 0
Logmnr_max_persistent_sessions Integer 1
Sessions Integer 60
Shared_server_sessions integer

4. Restart the database for the changes to take effect
sql> shutdown Immediate

Sql> Startup

Sql> Show parameter processes
NAME TYPE VALUE
------------------------------------ ----------- ----------------------
Aq_tm_processes integer 0
Db_writer_processes Integer 1
Gcs_server_processes integer 0
Job_queue_processes Integer 10
Log_archive_max_processes Integer 2
Processes integer 300
Sql> Show Parameter Sessions
NAME TYPE VALUE
------------------------------------ ----------- ----------------------
Java_max_sessionspace_size integer 0
Java_soft_sessionspace_limit integer 0
License_max_sessions integer 0
license_sessions_warning integer 0
Logmnr_max_persistent_sessions Integer 1
Sessions Integer 335
Shared_server_sessions integer
The final test to increase the number of connections to 50,100 did not report ORA-12516 error.

There are times when we need to adjust the maximum number of links to the Oracle database, and the number of links is adjusted to the DBS under Oacle
Record the adjusted Init.ora in the file.
The number of connections to Oracle (sessions) is related to the number of processes (process) in its parameter file, and their relationships are as follows:
Sessions= (1.1*process+5)
But when we increase the number of process numbers, the database does not start. This is because we also missed a Unix system parameter:
It is the semmns in the core parameter, which is the semaphore parameter of the UNIX system. Each process consumes one semaphore. Semmns
After tuning, the UNIX operating system needs to be restarted for the parameters to take effect. However, its size is subject to hardware memory or Oracle
Sga. Ranges range from 200--2000 to different sizes.
However, processes modifications should not only adjust the parameters in the Init.ora file, but should also adjust the OS kernel
Parameters, like Aix,hpux,solaris,sco,unixware, the OS adjustment needs to be restarted, and this parameter
The settings can not be simply based on how many terminals to connect to this server,
The key is to consider how many simultaneous sessions (when using some of the shared-connected middleware, generally do not need to be too big),
Of course, there are some Oracle background processes to consider, and some system maintenance work requires more connections.
My atmp on the big front machine when adjusting to Oracle, it uses the UnixWare operating system, in doing the number of links to adjust
, you need to adjust the core parameters first.
The key key related parameters are adjusted as follows:
SHMMAX 1000000000
Shmmin 1
Shmmni 200
Shmseg 15
Semmni 1000
SEMMSL 300
Semmns 230
SEMOPM 20
Which SEMMNI,SEMMNS,SEMMSL to increase, at least 18 larger than the processes;
Semmni (10,10000;150): Specifies the number of signal recognition in the core. This is the only thing that can be activated at any given time
A signal set quantity. The default value is 150. The maximum value is generated automatically by system adjustment.
SEMMSL (25,300;150): Specifies the maximum number of semaphores in each signal recognition. The default value is 25.
Semmns the number of processes+10* instances of the processes and +2* maximum db of all DB except the maximum db. Like 3 instances in
The number of processes is 100, 100, 200, then = (100+100) +2*200+10*3=630
SEMOPM (10,20;10): Specifies the maximum number of semaphore operations that can be performed in each system call SEMOP.
The default value is 10.
SHMMAX (131072,1073741824;524288): Specifies the maximum value for the shared memory portion size.
equals 0.5x of physical memory bytes
Shmmni (10,1000;100): Specifies the maximum value for system-wide shared memory identities.
Shmseg (6,15;6): Specifies the number of shared memory blocks (or identities) associated with each process. The default value is 6. With every
The maximum value of a process-related shared memory block is related to the unused space that is owned by the process. Thus, although a process has less than
Shmseg a shared memory block of values that may not be associated with other processes because of its limited space.
In Init.ora, adjust to:
processes = m # SMALL
#processes = MEDIUM
# processes = # LARGE
The processes is the number of the maximum number of connections to adjust, we just need to adjust this parameter can be, the other parameters can
To keep the default values.
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.