ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ora-00845 MEMORY_TARGET not supported on this system

ora-00845 MEMORY_TARGET not supported on this system

原创 Linux操作系统 作者:@oracle@_cu 时间:2009-03-11 12:27:46 0 删除 编辑

ora-00845 MEMORY_TARGET not supported on this system 的问题

oracle@ubuntu:~$ sqlplus /nolog
 
SQL*Plus: Release 11.1.0.6.0 - Production on Wed Mar 11 12:22:18 2009
 
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
 
SQL> conn system/qhtthq as sysdba
Connected to an idle instance.
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
SQL> exit
Disconnected


oracle@ubuntu:~$ env
SHELL=/bin/bash
TERM=vt100
XDG_SESSION_COOKIE=655d44d52f13942f2fbbfb9c49a954e1-1236745247.681260-720673903
SSH_CLIENT=192.168.3.36 1832 22
SSH_TTY=/dev/pts/0
USER=oracle
ORACLE_SID=wilson
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/u01/app/oracle/product/11.1.0/db_1/bin
MAIL=/var/mail/oracle
PWD=/home/oracle
LANG=zh_CN.UTF-8
HOME=/home/oracle
SHLVL=2
LANGUAGE=zh_CN:zh:en_US:en
LOGNAME=oracle
SSH_CONNECTION=192.168.3.36 1832 192.168.3.239 22
ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
_=/usr/bin/env

oracle@ubuntu:~$ mount -o remount,size=4G /dev/shm
mount: only root can do that
oracle@ubuntu:~$ sudo su -
[sudo] password for oracle:
root@ubuntu:~# mount -o remount,size=4G /dev/shm
oracle@ubuntu:~$ sqlplus /nolog
 
SQL*Plus: Release 11.1.0.6.0 - Production on Wed Mar 11 12:27:06 2009
 
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
 
SQL> conn system/qhtthq as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
 
Total System Global Area  397557760 bytes
Fixed Size                  1300184 bytes
Variable Size             264243496 bytes
Database Buffers          125829120 bytes
Redo Buffers                6184960 bytes
Database mounted.
Database opened.


SQL> desc v$log;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 GROUP#                                             NUMBER
 THREAD#                                            NUMBER
 SEQUENCE#                                          NUMBER
 BYTES                                              NUMBER
 MEMBERS                                            NUMBER
 ARCHIVED                                           VARCHAR2(3)
 STATUS                                             VARCHAR2(16)
 FIRST_CHANGE#                                      NUMBER
 FIRST_TIME                                         DATE

下面是oracle官方文档的解释:
Starting with Oracle Database 11g, the Automatic Memory Management feature requires more shared memory (/dev/shm)and file descriptors. The size of the shared memory should be at least the greater of MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on the computer. If MEMORY_MAX_TARGET or MEMORY_TARGET is set to a non zero value, and an incorrect size is assigned to the shared memory, it will result in an ORA-00845 error at startup. The number of file descriptors for each Oracle instance should be at least 512*PROCESSES. Also, the limit of descriptors for each process should be at least 512. If file descriptors are not sized correctly, you will notice ORA-27123 from various Oracle processes and potentially Linux Error EMFILE (Too many open files) errors in non-Oracle processes.
 
解决办法:用root用户运行下列命令
# mount -o remount,size=4G /dev/shm
 
linux下/dev/shm是什么?
  默认系统就会加载/dev/shm ,它就是所谓的tmpfs,有人说跟ramdisk(虚拟磁盘),但不一样。象虚拟磁盘一样,tmpfs 可以使用您的 RAM,但它也可以使用您的交换分区来存储。而且传统的虚拟磁盘是个块设备,并需要一个 mkfs 之类的命令才能真正地使用它,tmpfs 是一个文件系统,而不是块设备;您只是安装它,它就可以使用了。
  tmpfs有以下优势:
  1,动态文件系统的大小。
  2,tmpfs 的另一个主要的好处是它闪电般的速度。因为典型的 tmpfs 文件系统会完全驻留在 RAM 中,读写几乎可以是瞬间的。
  3,tmpfs 数据在重新启动之后不会保留,因为虚拟内存本质上就是易失的。所以有必要做一些脚本做诸如加载,绑定的操作。
  好了讲了一些大道理,还是讲讲应用吧:
  首先在/dev/stm建个tmp文件夹,然后与实际/tmp绑定
  mkdir /dev/shm/tmp
  chmod 1777 /dev/shm/tmp
  mount --bind /dev/shm/tmp /tmp(--bind )
  在使用mount --bind olderdir newerdir命令来挂载一个目录到另一个目录后,newerdir的权限和所有者等所有信息会发生变化。挂载后的目录继承了被挂载目录的所有属性,除了名称
引用http://nightwish1949.spaces.live.com/Blog/cns!21265062513469A9!633.entry
 

http://www.linuxdiyf.com/bbs/thread-70589-1-1.html
 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/20570073/viewspace-566773/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-03-03

  • 博文量
    10
  • 访问量
    17078