本文主要展示“Oracle11g RAC环境下如何处理ORA-00845错误”。内容简单易懂,条理清晰。希望能帮你解决疑惑。让边肖带领大家学习学习《Oracle11g RAC环境下如何处理ORA-00845错误》一文。
机房空调断电导致的机房高温自动关闭两个节点的Oracle11G RAC数据库服务器。启动服务器后,发现数据库起不来了,比如以下问题:
[oracle@DB-2 ~]$
sqlplus/as sysdba
SQL*Plus:版本
11 . 2 . 0 . 1 . 0 2017年8月2日(星期三)的生产36860 . 68868686861
版权所有(c) 1982,
2009年,甲骨文。保留所有权利。
连接到空闲
实例。
SQL启动
ORA-00845:
该系统不支持内存目标
SQL退出
原因是初始化参数MEMORY_TARGET或MEMORY_MAX_TARGET不能大于共享内存(/dev/shm)。为了解决这个问题,不应该将Oracle初始化参数调整为更大的/dev/shm。
Oracle原始参数文件相关参数文件如下:
orc L2 . memory _ max _ target=68719476736
orcl 1 . memory _ max _ target=68719476736
*.memory_target=30558650368
orc L2 . memory _ target=68719476736
orcl1.memory_target=6871947673
操作系统的共享内存(/dev/shm)参数如下:
[oracle@DB-1 shm]$
cat /etc/fstab | grep tmpfs
tmpfs /dev/shm tmpfs默认值,大小=131072M 0 0
使用vi /etc/fstab命令将两个节点的大小更改为64G,如下所示:
tmpfs /dev/shm tmpfs默认值,大小=64G 0 0
[甲骨文@CRXJ-DB-1
~]$ df -h
文件系统大小已用可用使用率%已安装于
/dev/mapper/VG _ crx JD B1-logvol 02
2.3T 1.3T 882G 60% /
tmpfs 64G 34G 30G 54% /dev/shm
/dev/sda 1 194M 33M 152M 18%/引导
>
/dev/mapper/vg_crxjdb1-LogVol01
9.9G 151M 9.2G 2% /tmp
重新尝试启动数据库,还是报ORA-00845错误,因此对将初始化参数文件spfile导出成pfile后进行编辑并重新生成spfile,过程如下:
[oracle@DB-1 ~]$
sqlplus / as sysdba
SQL*Plus: Release
11.2.0.1.0 Production on Wed Aug 2 10:36:33 2017
Copyright (c) 1982,
2009, Oracle. All rights reserved.
Connected to an idle
instance.
SQL> create
spfile from pfile='/home/oracle/pfile_yu.ora';
File created.
Elapsed: 00:00:00.21
编辑相关内容如下:
orcl2.memory_max_target=64424509440
orcl1.memory_max_target=64424509440
*.memory_target=64424509440
orcl2.memory_target=64424509440
orcl1.memory_target=64424509440
重新生成spfile并启动数据库:
SQL> create
spfile from pfile='/home/oracle/pfile_yu.ora';
File created.
Elapsed: 00:00:00.18
SQL> exit
Disconnected
[oracle@DB-1 ~]$
sqlplus / as sysdba
SQL*Plus: Release
11.2.0.1.0 Production on Wed Aug 2 10:40:30 2017
Copyright (c) 1982,
2009, Oracle. All rights reserved.
Connected to an idle
instance.
SQL> startup
ORACLE instance
started.
Total System Global
Area 6.4137E+10 bytes
Fixed Size 2219552 bytes
Variable Size 3.8118E+10 bytes
Database
Buffers 2.5770E+10 bytes
Redo Buffers 247029760 bytes
Database mounted.
Database opened.
SQL>
数据库启动成功。
在另一个节点也进行类似操作,两个节点数据库都正常启动并运行,应用能正常访问了。
注:在节点一生成完spfile后,在节点二上企图启动数据库,但还是报错:
[oracle@DB-2 ~]$
sqlplus / as sysdba
SQL*Plus: Release
11.2.0.1.0 Production on Wed Aug 2 10:35:31 2017
Copyright (c) 1982,
2009, Oracle. All rights reserved.
Connected to an idle
instance.
SQL> startup
ORA-00845:
MEMORY_TARGET not supported on this system
查看操作系统信息:
[oracle@DB-2 ~]$ df
-h|grep shm
tmpfs 64G 397M 63G 1% /dev/shm
[oracle@DB-2 ~]$
sqlplus / as sysdba
SQL*Plus: Release
11.2.0.1.0 Production on Wed Aug 2 10:46:28 2017
Copyright (c) 1982,
2009, Oracle. All rights reserved.
Connected to an idle
instance.
SQL> create
pfile='/home/oracle/pfile_yu.ora' from spfile;
create
pfile='/home/oracle/pfile_yu.ora' from spfile
*
ERROR at line 1:
ORA-01565: error in
identifying file '?/dbs/spfile@.ora'
ORA-27037: unable to
obtain file status
Linux-x86_64 Error:
2: No such file or directory
Additional
information: 3
对于以上问题,从节点一把参数文件复制过来后直接生成spfile
[oracle@DB-1
~]$ scp pfile_yu.ora DB-2:/home/oracle/pfile_yu.ora 100% 1929 1.9KB/s 00:00
[oracle@DB-2 ~]$
sqlplus / as sysdba
SQL*Plus: Release
11.2.0.1.0 Production on Wed Aug 2 10:54:48 2017
Copyright (c) 1982,
2009, Oracle. All rights reserved.
Connected to an idle
instance.
SQL> create
spfile from pfile='/home/oracle/pfile_yu.ora';
File created.
SQL> startup
ORACLE instance
started.
Total System Global
Area 6.4137E+10 bytes
Fixed Size 2219552 bytes
Variable Size 3.3554E+10 bytes
Database
Buffers 3.0333E+10 bytes
Redo Buffers 247029760 bytes
Database mounted.
Database opened.
SQL> exit
以上是“在Oracle11g RAC环境下如何处理ORA-00845错误”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注行业资讯频道!
内容来源网络,如有侵权,联系删除,本文地址:https://www.230890.com/zhan/99270.html