柔中带刚,刚中带柔,淫荡中富含柔和,刚猛中荡漾风骚,无坚不摧,无孔不入!
全部博文(1669)
分类: Oracle
2012-02-16 09:55:13
启动Oracle 11gR2后报错:ORA-00845
rac1:/home/oracle> sqlplus / as sysdba;
SQL*Plus: Release 11.2.0.3.0 Production onTue Feb 14 09:11:41 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-00845: MEMORY_TARGET not supported onthis system
这个错误之前已经处理过,因为tmpfs的大小MEMORY_TARGET的设置,就会报这种错误。
rac1:/home/oracle> oerr ora 845
00845, 00000, "MEMORY_TARGET notsupported on this system"
// *Cause: The MEMORY_TARGET parameter wasnot supported on this operating system or /dev/shm was not sized correctly onLinux.
// *Action: Refer to documentation for alist of supported operating systems. Or, size /dev/shm to be at least theSGA_MAX_SIZE on each Oracle instance running on the system.
验证一下:
SQL> conn / as sysdba;
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1402982400 bytes
Fixed Size 2228304 bytes
Variable Size 822087600 bytes
Database Buffers 570425344 bytes
Redo Buffers 8241152 bytes
Database mounted.
SQL> show parameter memory_target
NAME TYPE VALUE
----------------------------------------------- ------------------------------
memory_target big integer 1344M
--这里的memory_target 有1344M。
[root@rac1 ~]# df -lh
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 14G 11G 2.4G 83% /
tmpfs 978M 88K 978M 1% /dev/shm
/dev/sda1 194M 46M 139M 25% /boot
--这里可以看到tmpfs 只有978M。 这个参数我在安装DB的时候已经修改过:
[root@rac1 ~]# cat /etc/fstab
UUID=b1d2de8e-de31-4deb-b4e8-755c0ed01616/ ext4 defaults 1 1
UUID=4df5aa5f-8ef0-473a-931a-51d11e21aa53/boot ext4 defaults 1 2
UUID=82085104-5021-4aaf-8e85-f213998107b6swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults,size=3G 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
--只是这里的配置在启动的时候没有生效。具体配置参考:
[INS-35172]Target database memory (XXMB) exceeds the systems available shared memory ({0}MB)解决方法
http://blog.csdn.net/tianlesoftware/article/details/6896614
--把tmpfs 重新mount 一下:
[root@rac1 ~]# umount /dev/shm
umount: /dev/shm: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
Linux umount报device is busy 的处理方法
http://blog.csdn.net/tianlesoftware/article/details/6194295
--设备忙,用fuser处理一下:
[root@rac1 ~]# fuser -km /dev/shm
/dev/shm: 1805m
[root@rac1 ~]# umount /dev/shm
[root@rac1 ~]# mount /dev/shm
[root@rac1 ~]# df -lh
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 14G 11G 2.4G 83% /
/dev/sda1 194M 46M 139M 25% /boot
tmpfs 3.0G 0 3.0G 0% /dev/shm
--现在已经正常了。
再次重启了一下,发现发现设置的参数还是没有生效,因此疑惑在Oracle Linux 6.1 下,是否tmpfs始终保持的一半。 这个问题另篇Blog 进行测试。