今天重启了linux主机,并减少了linux主机的内存,在开机后启动Oracle数据库失败,报如下错误
ORA-00845: MEMORY_TARGET not supported on this system
SQL*Plus: Release 11.2.0.1.0 Production on Mon Sep 29 09:38:42 2014
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
SQL> create pfile='hao123.ora' from spfile;
File created.
---调整pfile中MEMORY_TARGET的大小
SQL> create spfile from pfile='hao123.ora';
File created.
---尝试启动
如果失败 那继续修改/dev/shm
[oracle@sd1 dbs]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 36G 20G 15G 59% /
tmpfs 868M 0 868M 0% /dev/shm
/dev/sda1 477M 55M 397M 13% /boot
/dev/sdb1 50G 46G 1.1G 98% /u01/data
[oracle@sd1 dbs]$ cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Tue Sep 2 19:31:02 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/VolGroup-lv_root / ext4 defaults 1 1
UUID=23c511ac-11c9-4ad8-b0f3-9da40d64bfe1 /boot ext4 defaults 1 2
/dev/mapper/VolGroup-lv_swap swap swap defaults 0 0
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
/dev/sdb1 /u01/data ext4 defaults 0 0
[oracle@sd1 dbs]$ su - root
Password:
[root@sd1 ~]# vi /etc/fstab
# /etc/fstab
# Created by anaconda on Tue Sep 2 19:31:02 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/VolGroup-lv_root / ext4 defaults 1 1
UUID=23c511ac-11c9-4ad8-b0f3-9da40d64bfe1 /boot ext4 defaults 1 2
/dev/mapper/VolGroup-lv_swap swap swap defaults 0 0
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
/dev/sdb1 /u01/data ext4 defaults 0 0
####change to
tmpfs /dev/shm tmpfs defaults,size=2G 0 0
:wq!
Remount
方法一:
[root@sd1 ~]# mount -o remount,size=2G /dev/shm
方法二:
---reboot (此处不需要重启)
[root@sd1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 36G 20G 15G 59% /
tmpfs 2.0G 190M 1.9G 10% /dev/shm
/dev/sda1 477M 55M 397M 13% /boot
/dev/sdb1 50G 46G 1.1G 98% /u01/data
[root@sd1 ~]#
---再次启动
SQL> startup
ORACLE instance started.
Total System Global Area 1039708160 bytes
Fixed Size 2259800 bytes
Variable Size 654312616 bytes
Database Buffers 377487360 bytes
Redo Buffers 5648384 bytes
Database mounted.
Database opened.
SQL>
--这样数据库已经正常启动