Parameter settings for concurrent Oracle connections

Source: Internet
Author: User

Related error prompt
OERR: ORA-12519 TNS: no appropriate service handler found
Client Connection intermittent failure, error ORA-12519
Cause: the listener cocould not find any available service handlers that are
Appropriate for the client connection.
Action: run "lsnrctl services" to ensure that the instance (s) have registered
With the listener, and are accepting connections. Check the lsnrctl service and the instance has been registered,
When the status shows ready, you can connect.
When the listener believes the current number of connections has reached maximum load,
It may set the state of the service handler for an instance to "blocked" and begin refusing
Incoming client connections with either of the following errors: ora-12519 or ora-12516
Using dynamic service registration, PMON obtains the current connection status through SERVICE_UPDATE, but SERVICE_UPDATE has a time interval,
Therefore, the number of connections displayed by listener may be different from the current number of connections.
Query solution:
Check whether the number of existing processes in the database has reached the processes parameter size.
1. select count (*) from v $ process; obtain the current number of processes in the database.
2. select value from v $ parameter where name = 'processs'; obtain the maximum number of processes.
3. If the upper limit is reached, modify the processes size in initSID. ora.
4. Restart the database to the nomount state, execute create spfile from pfile, and start up open.
Queries the maximum number of concurrent queries since the database is started.
Modify the maximum number of connections:
Alter system set processses = 300 scope = spfile;
Restart the database:
Shutdown immediate;
Startup;
-- View which users are currently using 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;
2
Sometimes we need to adjust the maximum number of connections of the oracle database, and the number of connections is adjusted in the init. ora file in the dbs directory of the oacle.
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)
However, when we increase the number of processes, the database often cannot be started. This is because a unix system parameter is missing: semmns is the core parameter, which is the semaphore parameter of the unix system. Each process occupies a semaphore. After the semmns is adjusted, You need to restart the unix operating system to make the parameter take effect. However, its size is subject to hardware memory or oracle sga. Range: 200--2000.
However, the init <sid>. the parameters in the ora file, and OS kernel parameters should be adjusted, such as AIX, HPUX, Solaris, SCO, and UNIXWare. OS adjustments need to be restarted, this parameter cannot be set simply based on the number of terminals connected to the server. The most important thing is to consider how many sessions will be connected simultaneously (when using some middleware with shared connections, in general, it does not need to be too large). Of course, we need to consider some Oracle background processes, and some system maintenance work requires more connections.
When oracle is adjusted on my atmp large front-end machine, it uses the unixware operating system. When adjusting the number of links, you must adjust the core parameters first.
The following figure shows how to adjust the key parameters:
Sh Max 1000000000
SHMMIN 1
SHMMNI 200
SHMSEG 15
SEMMNI 1000
SEMMSL 300
SEMMNS 230
SEMOPM 20
Semmni, semmns, and semmsl must be increased, at least 18 larger than processes;
SEMMNI (150;): specifies the number of signals recognized in the core. This is the number of unique signals that can be activated at any given time. The default value is 150. The maximum value is automatically adjusted by the system.
SEMMSL (25,300; 150): specifies the maximum semaphore value for each signal recognition. The default value is 25.
The sum of the PROCESSES of all the databases except the maximum db in SEMMNS + 2 * The PROCESSES + 10 * of the maximum db *
Number of instances. For example, if the three instance processes are 100, 100, and 200 respectively, then = (100 + 100) + 2*200 + 10*3 = 630
Tyle = "LINE-HEIGHT: 150%; FONT-FAMILY: "> SEMOPM (; 10): specifies the maximum number of signal operations that can be executed in each system call semop. The default value is 10.
SHMMAX (132132,3741824; 524288): specifies the maximum part size of the shared memory. Equals 0.5
× Number of physical memory bytes
SHMMNI (100;): specifies the maximum value of the shared memory identifier within the system range.
SHMSEG (6, 15, 6): specifies the number of shared memory blocks (or identifiers) associated with each process. The default value is 6. The maximum value of the shared memory block associated with each process is related to the unused space of the process. Therefore, although a process has a shared memory block less than the SHMSEG value, it may not be associated with other processes because of its limited space.
Adjusted:
Processes = 50 # SMALL
# Processes = 100 # MEDIUM
# Processes = 200 # LARGE
From: http://gerrywxy.spaces.live.com/blog/cns! 10FE174F8521A5F! 206. entry
Modify the maximum number of connections in oracle 150
Use sys to log on with sysdba permissions:
C: "sqlplus/nolog
SQL> conn/as sysdba
SQL> show parameter processes;
NAME TYPE VALUE
-----------------------------------------------------------------------------
Aq_tm_processes integer 1
Db_writer_processes integer 1
Job_queue_processes integer 10
Log_archive_max_processes integer 1
Processes integer 150
SQL> alter system set processes = 300 scope = spfile;
The system has been changed.
SQL> show parameter processes;
NAME TYPE VALUE
-----------------------------------------------------------------------------
Aq_tm_processes integer 1
Db_writer_processes integer 1
Job_queue_processes integer 10
Log_archive_max_processes integer 1
Processes integer 150
SQL> create pfile from spfile;
The file has been created.
Restart the database. OK!


Author: ERDP Technical Architecture"

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.