ORA-27125: unable to create shared memory segment

简介: OS环境:CentOS release 6.5 (Final) Oracle版本:Oracle Database 10g Enterprise Edition Release 10.2.
OS环境:CentOS release 6.5 (Final)
Oracle版本:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit

场景:数据库startup的时候报如下错误

*******************************************************************************
[oracle@localhost ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on 星期二 5月 31 09:10:45 2016
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
已连接到空闲例程。
SQL> startup
ORA-27125: unable to create shared memory segment
Linux-x86_64 Error: 1: Operation not permitted
*********************************************************************************
解决方法:
When a process uses some memory, the CPU is marking the RAM as used by that process. For efficiency, the CPU allocate RAM by chunks of 4K bytes (it's the default value on many platforms). Those chunks are named pages. Those pages can be swapped to disk, etc.
Since the process address space are virtual, the CPU and the operating system have to remember which page belong to which process, and where it is stored. Obviously, the more pages you have, the more time it takes to find where the memory is mapped. When a process uses 1GB of memory, that's 262144 entries to look up (1GB / 4K). If one Page Table Entry consume 8bytes, that's 2MB (262144 * 8) to look-up.
Most current CPU architectures support bigger pages (so the CPU/OS have less entries to look-up), those are named Huge pages (on Linux), Super Pages (on BSD) or Large Pages (on Windows), but it all the same thing.

步骤如下:
[oracle@localhost ~]$ id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)
root@localhost ~]# more /proc/sys/vm/hugetlb_shm_group 
0
[root@localhost ~]# echo 502 >/proc/sys/vm/hugetlb_shm_group
[root@localhost ~]# su - oracle
[oracle@localhost ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on 星期二 5月 31 09:12:05 2016
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
已连接到空闲例程。
SQL> startup
ORACLE 例程已经启动。
Total System Global Area 5016387584 bytes
Fixed Size                  2027640 bytes
Variable Size            1124077448 bytes
Database Buffers         3875536896 bytes
Redo Buffers               14745600 bytes
数据库装载完毕。
数据库已经打开。
相关文章
|
6月前
|
Oracle 关系型数据库
Customer RecommendedORA-27090 - Unable to Reserve Kernel Resources for Asynchronous Disk I/O
Customer RecommendedORA-27090 - Unable to Reserve Kernel Resources for Asynchronous Disk I/O
49 4
|
Oracle 关系型数据库 数据库
ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist的原因分析
        今天突然接到同事电话,说oracle数据库连接不上了,我远程过去用pl/sql developer登录,提示ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist.意思是oracle无法使用,共享内存领域不存在。
2327 0
|
SQL 关系型数据库 Oracle
ORA-01466: unable to read data - table definition has changed
1. Oracle建议我们等待大约5分钟之后再进行flashback query新创建的表,否则可能会碰到这个错误ORA-01466: unable to read data - table definition has changed.
1791 0
|
关系型数据库 数据库管理 Oracle
|
SQL Oracle 关系型数据库
ORACLE ORA-04030之 out of process memory when trying to allocate
    近期巡检中,一oracle 11g rac节点出现ORACLE ORA-04030之 out of process memory when trying to allocate报错,查询ORACLE官方MOS确定是:BUG11852492,原因是用户会话单进程占用PGA超过4GB异常终止,根据MOS文章1325100.1的建议:可以根据服务器实际情况及SQL运行的实际情况放开PGA单进程使用内存空间的限制到16GB。
1649 0