在新建的数据库11.2.0.4.0后,启动数据库报错ORA-00845 MEMORY_TARGET not supported on this system。
查看alter日志内容,以及ORA 00845 .
查看pfile文件memory_target 参数值,和alter日志内容一致。
解决方式: 通过临时更改shm值 数据库启动成功。如果想永久修改需要修改 /etc/inittab
更改linux的 /etc/inittab 的文件的tmpfs值。
点击(此处)折叠或打开
- [oracle@mhxy162 pfile]$ sqlplus / as sysdba
-
- SQL*Plus: Release 11.2.0.4.0 Production on Fri Aug 19 19:55:30 2016
-
- Copyright (c) 1982, 2013, Oracle. All rights reserved.
-
- Connected to an idle instance.
- SQL> startup pfile='/oracle/database/admin/yxzd/pfile/init.ora.7192016194820';
- ORA-00845: MEMORY_TARGET not supported on this system
-
点击(此处)折叠或打开
- Starting ORACLE instance (normal)
- WARNING: You are trying to use the MEMORY_TARGET feature. This feature requires the /dev/shm file system to be mounted for at least 780140544 bytes. /dev/shm is either not mounted or is mounted with available space less than this size. Please fix this so that MEMORY_TARGET can work as expected. Current available is 754434048 and used is 221720576 bytes. Ensure that the mount point is /dev/shm for this directory.
- memory_target needs larger /dev/shm
点击(此处)折叠或打开
- [oracle@mhxy162 pfile]$ oerr ora 845
- 00845, 00000, "MEMORY_TARGET not supported on this system"
- // *Cause: The MEMORY_TARGET parameter was not supported on this operating system or /dev/shm was not sized correctly on Linux.
- // *Action: Refer to documentation for a list of supported operating systems. Or, size /dev/shm to be at least the SGA_MAX_SIZE on each Oracle instance running on the system.
- [oracle@mhxy162 pfile]$ ll
点击(此处)折叠或打开
- [oracle@mhxy162 pfile]$ grep memory_target init.ora.7192016194820
- memory_target=780140544
- [oracle@mhxy162 pfile]$
点击(此处)折叠或打开
- [root@mhxy162 ~]# umount /dev/shm/
- [root@mhxy162 ~]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/sda3 26G 15G 9.8G 60% /
- /dev/sda1 194M 34M 151M 19% /boot
- [root@mhxy162 ~]# mount -a
- [root@mhxy162 ~]# mount
- /dev/sda3 on / type ext4 (rw)
- proc on /proc type proc (rw)
- sysfs on /sys type sysfs (rw)
- devpts on /dev/pts type devpts (rw,gid=5,mode=620)
- /dev/sda1 on /boot type ext4 (rw)
- none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
- tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
- [root@mhxy162 ~]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/sda3 26G 15G 9.8G 60% /
- /dev/sda1 194M 34M 151M 19% /boot
- tmpfs 931M 0 931M 0% /dev/shm
- [root@mhxy162 ~]# umount /dev/shm
- [root@mhxy162 ~]# ll
- total 280
- -rw-------. 1 root root 1193 Aug 19 18:53 anaconda-ks.cfg
- drwxr-xr-x. 2 root root 4096 Aug 19 19:15 Desktop
- drwxr-xr-x. 2 root root 4096 Aug 19 19:13 Documents
- drwxr-xr-x. 2 root root 4096 Aug 19 19:13 Downloads
- -rw-r--r--. 1 root root 27794 Aug 19 18:53 install.log
- -rw-r--r--. 1 root root 7572 Aug 19 18:52 install.log.syslog
- drwxr-xr-x. 2 root root 4096 Aug 19 19:13 Music
- -rw-r--r--. 1 root root 207399 Aug 15 13:30 pdksh-5.2.14-30.x86_64.rpm
- drwxr-xr-x. 2 root root 4096 Aug 19 19:13 Pictures
- drwxr-xr-x. 2 root root 4096 Aug 19 19:13 Public
- drwxr-xr-x. 2 root root 4096 Aug 19 19:13 Templates
- drwxr-xr-x. 2 root root 4096 Aug 19 19:13 Videos
- [root@mhxy162 ~]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/sda3 26G 15G 9.8G 60% /
- /dev/sda1 194M 34M 151M 19% /boot
- [root@mhxy162 ~]# mount -t tmpfs shmfs -o size=4000m /dev/shm
- [root@mhxy162 ~]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/sda3 26G 15G 9.8G 60% /
- /dev/sda1 194M 34M 151M 19% /boot
- shmfs 4.0G 0 4.0G 0% /dev/shm
- [root@mhxy162 ~]# mount|grep shmfs
- shmfs on /dev/shm type tmpfs (rw,size=4000m,rootcontext="system_u:object_r:tmpfs_t:s0")
- [root@mhxy162 ~]#
- [root@mhxy162 ~]# su - oracle
- [oracle@mhxy162 ~]$ ll
- total 2487240
- drwxr-xr-x. 7 oracle oinstall 4096 Aug 27 2013 database
- -rw-r--r--. 1 oracle oinstall 25193 Aug 19 19:33 db.rsp
- -rw-r--r--. 1 oracle oinstall 1395582860 Dec 24 2015 p13390677_112040_Linux-x86-64_1of7.zip
- -rw-r--r--. 1 oracle oinstall 1151304589 Dec 24 2015 p13390677_112040_Linux-x86-64_2of7.zip
- [oracle@mhxy162 ~]$ sqlplus / as sysdba
- SQL*Plus: Release 11.2.0.4.0 Production on Fri Aug 19 20:07:42 2016
- Copyright (c) 1982, 2013, Oracle. All rights reserved.
- Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 776646656 bytes
Fixed Size 2257272 bytes
Variable Size 507514504 bytes
Database Buffers 260046848 bytes
Redo Buffers 6828032 bytes
Database mounted.
Database opened.
SQL>
SQL>
点击(此处)折叠或打开
- [root@mhxy162 ~]# vi /etc/fstab
- #
# /etc/fstab
# Created by anaconda on Fri Aug 19 18:47:31 2016
#
# 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
#
UUID=4155e52c-7e18-4677-903a-5a62dbf104b1 / ext4 defaults 1 1
UUID=b0db3f8c-ccaa-4448-8d66-8d6afefcac8d /boot ext4 defaults 1 2
UUID=ec257f06-dd68-434c-b6e5-0bd75eae9f03 swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults,size=4000m 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27039319/viewspace-2123762/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/27039319/viewspace-2123762/