创建一个新的 instance 报错
[oracle@fiona2 ~]$ cd $ORACLE_HOME/dbs
[oracle@fiona2 dbs]$ ls
hc_ora11g.dat hc_ORADB.dat init.ora initORADB.ora_1 lkORCL orapwora11g spfileora11g.ora
[oracle@fiona2 dbs]$ cp spfileora11g.ora spfiletest1.ora
[oracle@fiona2 dbs]$ export ORACLE_SID=test1
[oracle@fiona2 dbs]$ sqlplus "/ as sysdba"
SQL*Plus: Release 11.2.0.1.0 Production on Sat Nov 1 11:11:36 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount;
ORA-00845: MEMORY_TARGET not supported on this system
SQL> !
//查看ORA error
[oracle@fiona2 dbs]$ 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@fiona2 dbs]$ df -lh
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 20G 16G 3.4G 83% /
tmpfs 936M 444M 492M 48% /dev/shm
/dev/sda1 194M 34M 151M 19% /boot
/dev/sda3 5.9G 593M 5.1G 11% /home
//正常启动的instance
SQL> show parameter memory_target
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
memory_target big integer 748M
///etc/fstab就是在开机引导的时候自动挂载到linux的文件系统
[oracle@fiona2 dbs]$ cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Mon Aug 25 00:29:27 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
#
UUID=0b1c3b92-8f6c-49b8-b524-c6956449948a / ext4 defaults 1 1
UUID=4997e38d-f51f-4007-ba58-9ea63f1a97f7 /boot ext4 defaults 1 2
UUID=d0d5b515-bf43-435a-8650-3af8d5c38746 /home ext4 defaults 1 2
UUID=4ace5509-4053-43f7-9ed0-a5d8f3fc6bdb 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
//切换到root用户,扩大tmpfs的size
[oracle@fiona2 dbs]$ su root
Password:
[root@fiona2 dbs]# umount /dev/shm
[root@fiona2 dbs]# mount tmpfs /dev/shm -t tmpfs -o size=2048m
[root@fiona2 dbs]# df -lh
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 20G 16G 3.4G 83% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/sda1 194M 34M 151M 19% /boot
/dev/sda3 5.9G 593M 5.1G 11% /home
tmpfs 2.0G 0 2.0G 0% /dev/shm
//重启验证
[root@fiona2 dbs]# su - oracle
[oracle@fiona2 ~]$ export ORACLE_SID=test1
[oracle@fiona2 ~]$ sqlplus "/ as sysdba"
SQL*Plus: Release 11.2.0.1.0 Production on Sat Nov 1 11:45:34 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 780824576 bytes
Fixed Size 2217424 bytes
Variable Size 461376048 bytes
Database Buffers 314572800 bytes
Redo Buffers 2658304 bytes
SQL> show parameter memory_target
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
memory_target big integer 748M
Reference:
tmpfs是一种基于内存的文件系统,它可以使用RAM,但它也可以使用swap分区来存储。
为防止tmpfs使用了全部VM,有时候要限制其大小。要创建一个最大为32 MB的tmpfs文件系统,键入:
# mount tmpfs /dev/shm -t tmpfs -o size=32m
添加到 /etc/fstab,应该是这样:
tmpfs /dev/shm tmpfs size=32m 0 0
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26477398/viewspace-1317334/
,如需转载,请注明出处,否则将追究法律责任。