ORACLE connection overrun modification, ORA-00064, ORA-12571, ORA-24324 and user connection View

Source: Internet
Author: User
(1) For ORACLE connection overrun modification, we need to adjust the maximum number of connections of the oracle database. The adjustment of the number of connections is made in the init. ora file in the dbs directory of oacle. The number of ORACLE connections (sessions) and

(1) For ORACLE connection overrun modification, we need to adjust the maximum number of connections of the oracle database. The adjustment of the number of connections is made in the init. ora file in the dbs directory of oacle. The number of ORACLE connections (sessions) and

(1) ORACLE connection overrun Modification

We need to adjust the maximum number of connections for the oracle database, and the number of connections is adjusted in the init. ora file in the dbs directory under 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 process should not only adjust init . 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.

1. When the database connection exceeds the upper limit, the new connection will fail. Check the number of allowed connections of the database.

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
2
Processes integer

NAME TYPE
----------------------------------------------------------
VALUE
------------------------------
150

# -------------- The number of database connections is 150, and the number of connections is modified.
SQL>
SQL> alter system set processes = 5000 scope = spfile;

The system has been changed.

SQL> alter system set sessions = 5000 scope = spfile;

The system has been changed.

SQL> shutdown immediate
The database has been closed.
The database has been detached.
The ORACLE routine has been disabled.

SQL> startup
ORA-00064: object is too large to allocate on this O/S)
SQL> startup
ORA-00064: object is too large to allocate on this O/S)

# ----------------------------- Failed to modify the maximum number of connections. The maximum number of connections is related to OS,

# ------------------------------- Modification may fail if the OS is the maximum number of connections.

For example, the following Unix instance (derived from)

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

SEMOPM (; 10): specifies the maximum number of signal operations that can be performed 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, Hong Kong virtual host, 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


SQL> startup
--------------- Restart orcl in services. msc, resulting in wrong ORA-00064
ORA-12571: TNS: Package write failed
SQL> startup
ORA-24324: Service handle not initialized
ORA-01041: Internal error, hostdef extension does not exist
SQL> startup
ORA-24324: Service handle not initialized
ORA-01041: Internal error, hostdef extension does not exist


------------------------------------------------

2. Modify the maximum number of connections error ORA-00064, the database cannot start

# ---------------------- (1) oracle sys dba connection, Hong Kong virtual host, at this time because of ORA-12571 error, other users cannot connect
SQL> conn sys/oracle @ orcl as sysdba
Already connected to the idle routine.

# ---------------------- (2) Start the database with pfile

SQL> startup pfile = 'd: \ oracle \ admin \ orcl \ pfile \ init. ora.105201216493 'open
The ORACLE routine has been started.

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.