Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2248053
  • 博文数量: 310
  • 博客积分: 6853
  • 博客等级: 准将
  • 技术积分: 2833
  • 用 户 组: 普通用户
  • 注册时间: 2005-08-04 16:41
文章分类

全部博文(310)

文章存档

2013年(17)

2012年(42)

2011年(76)

2010年(71)

2009年(99)

2007年(2)

2006年(1)

2005年(2)

分类: LINUX

2012-11-30 15:34:27

安装了oracle11g的ubuntu升级到12.04启动是报错误ORA-00845: MEMORY_TARGET not supported on this system。 
原因12.04中将/dev/shm目录改成了/run/shm,虽然已经有符号链接但是仍然报错。 
解决: 
1、编辑oracle-shm 
sundoctor@sundoctor-ThinkPad-W510:~$ sudo gedit /etc/init.d/oracle-shm 

#! /bin/sh 
# /etc/init.d/oracle-shm 


case $1 in 
start) 
echo "Starting script /etc/init.d/oracle-shm" 
# Run only once at system startup 
if [ -e /dev/shm/.oracle-shm ]; then 
echo "/dev/shm is already mounted, nothing to do" 
else 
rm -f /dev/shm 
mkdir /dev/shm 
#mount -B /run/shm /dev/shm 
mount --move /run/shm /dev/shm 
mount -B /dev/shm /run/shm 
touch /dev/shm/.oracle-shm 
fi 
;; 
stop) 
echo "Stopping script /etc/init.d/oracle-shm" 
echo "Nothing to do" 
;; 
*) 
echo "Usage:/etc/init.d/oracle-shm {start|stop}" 
exit 1 
;;  
esac 

### BEGIN INIT INFO 
# Provides:         oracle-shm 
# Required-Start:   $remote_fs $syslog 
# Required-Stop:    $remote_fs $syslog 
# Default-Start:    2 3 4 5 
# Default-Stop:     0 1 6 
# Short-Description:Bind /run/shm to /dev/shm at system startup. 
# Description:      Fix to allow Oracle 11g use AMM. 
### END INIT INFO 
2、安装oracle-shm 

sundoctor@sundoctor-ThinkPad-W510:~$sudo chmod 755 /etc/init.d/oracle-shm 
sundoctor@sundoctor-ThinkPad-W510:~$sudo update-rc.d oracle-shm defaults 01 99 

3、重启系统 
sundoctor@sundoctor-ThinkPad-W510:~$sudo shutdown -r now 

4、验证修改成功 
sundoctor@sundoctor-ThinkPad-W510:~$sudo cat /etc/mtab |grep shm 
none /dev/shm tmpfs rw,nosuid,nodev 0 0 
/dev/shm /run/shm none rw,bind 0 0 

5、启动数据库 

sundoctor@sundoctor-ThinkPad-W510:~$su – oracle 
sundoctor@sundoctor-ThinkPad-W510:~$dbstart 

成功!!!
阅读(1767) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~