Oracle启动报错:ORA-00845: MEMORY_TARGET not supported on this system

Linux大全评论683 views阅读模式

今天启动Oracle的时候,报错

[root@localhost ~]#su - oracle

[oracle@localhost ~]$lsnrctl start

lsnrctl: error while loading shared libraries: /u01/app/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied

解决办法:在root用户下执行以下命令

[root@localhost ~]# setenforce 0

[root@localhost ~]#su - oracle

[oracle@localhost ~]$lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 20-SEP-2012 19:03:03

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Log messages written to /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                20-SEP-2012 19:03:04
Uptime                    0 days 0 hr. 0 min. 1 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
The listener supports no services
The command completed successfully

问题解决。

[oracle@localhost ~]$ sqlplus / as sysdba

SQL> startup

报错:ORA-00845: MEMORY_TARGET not supported on this system

    
问题定位:安装数据库时或者修改了参数MEMORY_TARGET或者SGA_TARGET的大小。
           SGA参数的大小超过了操作系统/dev/shm的大小。
           linux安装完后默认/dev/shm为物理内存的一半。

技术背景:linux大内存支持(Very Large Memory)中,使用了shmfs/tmpfs选项,ramfs也可以。
           /dev/shm目录挂载类型为tmpfs,此共享内存用于交换,尤其对于大文件优势明显。
           相对于ramfs,tmpfs的优势在于动态调整物理内存的占用,而ramfs不能调整。
           /dev/shm与swap的区别:shm基于内存的文件系统,swap基于硬盘的文件系统。

解决方法:

1、调整MEMORY_TARGET(11G)或者SGA_TARGET(9i,10G)大小(不建议)。

2、调整/dev/shm的大小。
   修改/etc/fstab,重新mount /dev/shm,然后就可以启动数据库了。

企鹅博客
  • 本文由 发表于 2019年9月8日 19:04:59
  • 转载请务必保留本文链接:https://www.qieseo.com/186266.html

发表评论