redhat5.8下oracle11g启动失败
# redhat5.8下oracle11g启动失败
### 日志文件路径
-----------------------------
tail -f /u01/app/oracle/product/11.2.0/db_1/startup.log
### 内存调小后启动失败
-----------------------------
启动数据库报ora-00845
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
由于设置sga的大小超过了操作系统/dev/shm的大小
[root@oracle2 bin]# df -k /dev/shm
文件系统 1K-块 已用 可用 已用% 挂载点
tmpfs 2030564 1152224 878340 57% /dev/shm
[root@oracle2 bin]# cat /etc/fstab
LABEL=/ / ext3 defaults 1 1
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
metalink的文档:doc id:note:460506.1中进行说明。一是修改参数文件,二是修改/dev/shm大小。
原因: 内存小于oracle参数中要求的内存大小
解决办法: 增大/dev/shm的大小,建议设置为4g
[root@oracle2 bin]# cat /etc/fstab
LABEL=/ / ext3 defaults 1 1
#tmpfs /dev/shm tmpfs defaults 0 0
tmpfs /dev/shm tmpfs defaults,size=4096m 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
[root@oracle2 bin]# umount /dev/shm
[root@oracle2 bin]# mount /dev/shm
[root@oracle2 bin]# su - oracle
[oracle@oracle2 ]# sqlplus / as sysdba
### 引用
-----------------------------
- [ORA-00845: MEMORY_TARGET not supported on this system报错解决](http://www.linuxidc.com/Linux/2012-12/76976.htm)
### 修改hostname启动失败
-----------------------------
- hostname无实际意义,不建议修改
- 查看日志
```
vi /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
vi /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
[root@sm admin]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=sm.oracle.com
GATEWAY=192.168.61.2
[root@sm admin]# cat /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = sm.oracle.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.oracle.com)
)
)
```