[20180211]11g关闭AMM.txt
--//指点别人的系统关闭AMM,使用hugepages遇到问题,主要问题是对方设置如下参数在spfile文件中:
*.memory_max_target=0
*.memory_target=0
--//通过例子说明:
1.环境:
SCOTT@book> @ &r/ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
SYS@book> create pfile='/tmp/@.ora' from spfile;
File created.
--//修改 /tmp/book.ora 文件增加如下:
*.memory_max_target=0
*.memory_target=0
2.测试:
SYS@book> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@book> startup pfile='/tmp/book.ora'
ORA-27125: unable to create shared memory segment
SYS@book> startup nomount pfile='/tmp/book.ora'
ORA-27125: unable to create shared memory segment
SYS@book> create spfile from pfile='/tmp/book.ora';
File created.
SYS@book> startup
ORA-27125: unable to create shared memory segment
3.问题解决:
--//按照前面的方法建立pfile.
SYS@book> create pfile='/tmp/@.ora' from spfile;
File created.
--//删除*.memory_max_target=0,*.memory_target=0行,重新建立spfile:
SYS@book> create spfile from pfile='/tmp/book.ora';
File created.
SYS@book> startup
ORACLE instance started.
Total System Global Area 634732544 bytes
Fixed Size 2255792 bytes
Variable Size 197133392 bytes
Database Buffers 427819008 bytes
Redo Buffers 7524352 bytes
Database mounted.
Database opened.
--//OK.
SYS@book> show parameter memory_%target
NAME TYPE VALUE
----------------- ----------- ------
memory_max_target big integer 0
memory_target big integer 0
--//oracle到处都是坑...^_^.即使是0,也不能写在参数文件里面.