测试库执行startup时提示(11.2.0.1): 查询ORA-27154的错误 : vcD4KPHA+PC9wPgoKPHRhYmxlIHdpZHRoPQ=="100%" border="0" cellpadding="0" cellspacing="0"> Error: ORA-27154Text: post/wait create failed ----------------------------------------------
测试库执行startup时提示(11.2.0.1):
查询ORA-27154的错误:
喎?http://www.2cto.com/kf/ware/vc/" target="_blank" class="keylink">vcD4KPHA+PC9wPgoKPHRhYmxlIHdpZHRoPQ=="100%" border="0" cellpadding="0" cellspacing="0">
Error: ORA-27154 Text: post/wait create failed --------------------------------------------------------------------------- Cause: internal error, multiple post/wait creates attempted simultaneously Action: check errno and contact Oracle Support
df查看磁盘空间还有很多,不存在占满的情况。
查看报错中的semget含义:
提示segmet的含义是get a semaphore set identifier,即获取一个信号量集标识符。说明此错误可能和未获得信号量有关,No
space left on device不是指存储空间,而是指信号量资源。
从MOS的介绍看(949468.1),一系列的报错出现10.1.0.2到11.2.0.2的范围内。给出了示例:
$ ipcs -ls
------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 100
semaphore max value = 32767
产生的原因是,从原理上看,32000信号量可用,一个信号量标识符能包含最大250个信号量。但是ipcs命令展示每个信号量标识符仅能让Oracle包含最大156个信号量。
$ ipcs
..
------ Semaphore Arrays --------
key semid owner perms nsems
0x450e15bd 0 root 666 1
0x0000cace 32769 root 666 1
0x358b172c 327683 oracle 660 104
0x9053d038 11075588 oracle 660 156
0x9053d039 11108357 oracle 660 156
0x9053d03a 11141126 oracle 660 156
0x9053d03b 11173895 oracle 660 156
..
那么可用的最大信号量就是156*128=19968,不是32000。
解决方法增加可包含的信号量,这里根据SEMMNI参数来调整设置。
1. 查询当前kernel的信号量参数值。
# /sbin/sysctl -a " grep sem
2. 修改/etc/sysctl.conf文件的SEMMNI参数。
从kernel.sem
= 250 32000 100 128修改为kernel.sem
= 250 32000 100 200
3. 使用# /sbin/sysctl -p让修改生效。
结合到我这里的情况,首先查看ipcs的结果:
数据库启动后,需要从操作系统上分配共享内存和信号量,信号量就相当于OS的内存锁,类似于Oracle的latch(注意Oracle的锁和latch的区别),每个进程需要获取操作系统内存时,需要先获得信号量才能申请内存。
从上述指令可以看到最大可用的信号量是100,信号量标识符集最大是128,呃,这里失误,当时没有查看到ipcs实际的信号量标识符集。这里4个参数的含义:
The maximum number of sempahores that can be in one semaphore set. It should be same size as maximum number of Oracle processes. 一个信号量集中允许的最大信号量数。需要和Oracle的process个数相同。
SEMMNS 100 Defines the maximum semaphores on the system.
This setting is a minimum recommended value, for initial installation only. The SEMMNS parameter should be set to the sum of the PROCESSES parameterfor each Oracle database, adding the largest one twice, and then adding an additional 10 for each database.
系统允许的最大信号量数,SEMMNS参数应设置为最大的PROCESSES值,再加上额外的10,算出来的总和。(注意这里说明该值是最小的建议值)
SEMOPM 32 Defines the maximum number of operations for each semop call
每次信号量调用的最大操作数。
SEMMNI 128 Defines the maximum number of semaphore sets in the entire system
系统中信号量集的最大值。
可以推测SEMMNS=SEMMSL * SEMMNI。
但上述示例中:100100 * 128,SEMMNS最大允许的信号量(建议最小值)只有100,显然不能满足计算结果的数量。而且从Oracle官方文档看到的对于这几个参数的推荐值:
Configuring Kernel Parameters
Verify that the kernel parameters shown in the following table are set to values greater than or equal to the recommended value shown. The procedure following the table describes how to verify and set the values.
Parameter | Value | File |
---|---|---|
semmsl
semmns semopm semmni |
250
32000 100 128 |
/proc/sys/kernel/sem |
进而可以推断报错提示的sskgpcreates可能和process数量有关,kernel中和该值有关的参数是SEMMNS,和上述推测的结论相同,即PROCESS过多,但允许的最大信号量过少,两者不匹配,导致No
space left on device提示信号量资源不足。
解决方法如MOS指点的,修改信号量参数值,可以用:
系统允许包含的最大信号量集)的计算关系,还有就是SEMMNS定义的是Defines
the maximum semaphores on the system. This setting is a minimum recommended value,for initial installation only. 即允许的最大信号量,但这个值是用于初始安装的最小推荐值。
3.
借助baidu或google甚至MOS查找问题,可能找到解决方案,但更重要的是能够知道原因,进而了解问题出现的场景,结合自己的问题,确定是同一类之后,再执行操作,一句话:要谨慎。

Stored procedures are precompiled SQL statements in MySQL for improving performance and simplifying complex operations. 1. Improve performance: After the first compilation, subsequent calls do not need to be recompiled. 2. Improve security: Restrict data table access through permission control. 3. Simplify complex operations: combine multiple SQL statements to simplify application layer logic.

The working principle of MySQL query cache is to store the results of SELECT query, and when the same query is executed again, the cached results are directly returned. 1) Query cache improves database reading performance and finds cached results through hash values. 2) Simple configuration, set query_cache_type and query_cache_size in MySQL configuration file. 3) Use the SQL_NO_CACHE keyword to disable the cache of specific queries. 4) In high-frequency update environments, query cache may cause performance bottlenecks and needs to be optimized for use through monitoring and adjustment of parameters.

The reasons why MySQL is widely used in various projects include: 1. High performance and scalability, supporting multiple storage engines; 2. Easy to use and maintain, simple configuration and rich tools; 3. Rich ecosystem, attracting a large number of community and third-party tool support; 4. Cross-platform support, suitable for multiple operating systems.

The steps for upgrading MySQL database include: 1. Backup the database, 2. Stop the current MySQL service, 3. Install the new version of MySQL, 4. Start the new version of MySQL service, 5. Recover the database. Compatibility issues are required during the upgrade process, and advanced tools such as PerconaToolkit can be used for testing and optimization.

MySQL backup policies include logical backup, physical backup, incremental backup, replication-based backup, and cloud backup. 1. Logical backup uses mysqldump to export database structure and data, which is suitable for small databases and version migrations. 2. Physical backups are fast and comprehensive by copying data files, but require database consistency. 3. Incremental backup uses binary logging to record changes, which is suitable for large databases. 4. Replication-based backup reduces the impact on the production system by backing up from the server. 5. Cloud backups such as AmazonRDS provide automation solutions, but costs and control need to be considered. When selecting a policy, database size, downtime tolerance, recovery time, and recovery point goals should be considered.

MySQLclusteringenhancesdatabaserobustnessandscalabilitybydistributingdataacrossmultiplenodes.ItusestheNDBenginefordatareplicationandfaulttolerance,ensuringhighavailability.Setupinvolvesconfiguringmanagement,data,andSQLnodes,withcarefulmonitoringandpe

Optimizing database schema design in MySQL can improve performance through the following steps: 1. Index optimization: Create indexes on common query columns, balancing the overhead of query and inserting updates. 2. Table structure optimization: Reduce data redundancy through normalization or anti-normalization and improve access efficiency. 3. Data type selection: Use appropriate data types, such as INT instead of VARCHAR, to reduce storage space. 4. Partitioning and sub-table: For large data volumes, use partitioning and sub-table to disperse data to improve query and maintenance efficiency.

TooptimizeMySQLperformance,followthesesteps:1)Implementproperindexingtospeedupqueries,2)UseEXPLAINtoanalyzeandoptimizequeryperformance,3)Adjustserverconfigurationsettingslikeinnodb_buffer_pool_sizeandmax_connections,4)Usepartitioningforlargetablestoi


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

Atom editor mac version download
The most popular open source editor

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

WebStorm Mac version
Useful JavaScript development tools

Dreamweaver CS6
Visual web development tools
