ORA-00845: MEMORY_TARGET not supported on this system
2015-07-30 14:20
507 查看
今天数据库登录时候报错 ORA-00845: MEMORY_TARGET not supported on this system
查阅资料:
ORA-00845: 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.
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 orMEMORY_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
意思大概就是说:当MEMORY_TARGET或者SGA_MAX_SIZE 参数设置的数值
/dev/shm时就会报这个错误。或者 /dev/shm没有挂载的时候也会报这个错误 修复完成之后.做了一个小实验 以记录并验证。
第一个为/dev/shm 未挂载的情况下会报这个错误。
此时数据库是打开的
SQL> select status from v$instance;
STATUS
------------
OPEN
查看 /dev/shm 状态
[root@lh ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 28G 23G 3.6G 87% /
/dev/sda1 99M 12M 83M 13% /boot
tmpfs 1006M 0 1006M 0% /dev/shm
是挂载的
现在卸载 /DEV/SHM
[root@lh ~]# umount /dev/shm
umount: /dev/shm: device is busy
umount: /dev/shm: device is busy
遇到这种情况用fuser 解决
[root@lh ~]# fuser -km /dev/shm
/dev/shm: 9297m 9299m 9301m 9305m 9307m 9309m 9311m 9313m 9315m 9317m 9319m 9321m 9323m 9325m 9327m 9329m 9331m 9372m 9384m 9389m 9397m 9404m 9416m 9428m 9431m 9433m
[root@lh ~]# umount /dev/shm
[root@lh ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 28G 23G 3.6G 87% /
/dev/sda1 99M 12M 83M 13% /boot
现在/dev/shm已经卸载 切回sqlplus
SQL> select sysdate from dual;
ERROR:
ORA-03114: not connected to ORACLE
已经不再连接ORACLE,返回重新连接
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
报错
重新挂载 /dev/shm 再连接
[root@lh ~]# mount /dev/shm
[root@lh ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 28G 23G 3.6G 87% /
/dev/sda1 99M 12M 83M 13% /boot
tmpfs 1006M 0 1006M 0% /dev/shm
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
SQL> startup
ORACLE instance started.
Total System Global Area 839282688 bytes
Fixed Size 2233000 bytes
Variable Size 553651544 bytes
Database Buffers 281018368 bytes
Redo Buffers 2379776 bytes
Database mounted.
Database opened.
SQL>
数据库成功打开。
另一种情况,
MEMORY_TARGET或者SGA_MAX_SIZE设置大于/dev/shm
SQL>
show parameter memory
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address integer 0
memory_max_target big integer 804M
memory_target big integer 804M
shared_memory_address integer 0
SQL> alter system set memory_target=1200M scope=spfile;
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
报错!!
这时候增大 /dev/shm 即可
[root@lh ~]# mount -o remount,size=2048M /dev/shm
[root@lh ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 28G 23G 3.6G 87% /
/dev/sda1 99M 12M 83M 13% /boot
tmpfs 2.0G 0 2.0G 0% /dev/shm
再打开ORACLE
SQL> startup
ORACLE instance started.
Total System Global Area 1252663296 bytes
Fixed Size 2227944 bytes
Variable Size 805306648 bytes
Database Buffers 436207616 bytes
Redo Buffers 8921088 bytes
Database mounted.
Database opened.
SQL>
查阅资料:
ORA-00845: 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.
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 orMEMORY_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
意思大概就是说:当MEMORY_TARGET或者SGA_MAX_SIZE 参数设置的数值
/dev/shm时就会报这个错误。或者 /dev/shm没有挂载的时候也会报这个错误 修复完成之后.做了一个小实验 以记录并验证。
第一个为/dev/shm 未挂载的情况下会报这个错误。
此时数据库是打开的
SQL> select status from v$instance;
STATUS
------------
OPEN
查看 /dev/shm 状态
[root@lh ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 28G 23G 3.6G 87% /
/dev/sda1 99M 12M 83M 13% /boot
tmpfs 1006M 0 1006M 0% /dev/shm
是挂载的
现在卸载 /DEV/SHM
[root@lh ~]# umount /dev/shm
umount: /dev/shm: device is busy
umount: /dev/shm: device is busy
遇到这种情况用fuser 解决
[root@lh ~]# fuser -km /dev/shm
/dev/shm: 9297m 9299m 9301m 9305m 9307m 9309m 9311m 9313m 9315m 9317m 9319m 9321m 9323m 9325m 9327m 9329m 9331m 9372m 9384m 9389m 9397m 9404m 9416m 9428m 9431m 9433m
[root@lh ~]# umount /dev/shm
[root@lh ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 28G 23G 3.6G 87% /
/dev/sda1 99M 12M 83M 13% /boot
现在/dev/shm已经卸载 切回sqlplus
SQL> select sysdate from dual;
ERROR:
ORA-03114: not connected to ORACLE
已经不再连接ORACLE,返回重新连接
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
报错
重新挂载 /dev/shm 再连接
[root@lh ~]# mount /dev/shm
[root@lh ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 28G 23G 3.6G 87% /
/dev/sda1 99M 12M 83M 13% /boot
tmpfs 1006M 0 1006M 0% /dev/shm
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
SQL> startup
ORACLE instance started.
Total System Global Area 839282688 bytes
Fixed Size 2233000 bytes
Variable Size 553651544 bytes
Database Buffers 281018368 bytes
Redo Buffers 2379776 bytes
Database mounted.
Database opened.
SQL>
数据库成功打开。
另一种情况,
MEMORY_TARGET或者SGA_MAX_SIZE设置大于/dev/shm
SQL>
show parameter memory
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address integer 0
memory_max_target big integer 804M
memory_target big integer 804M
shared_memory_address integer 0
SQL> alter system set memory_target=1200M scope=spfile;
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
报错!!
这时候增大 /dev/shm 即可
[root@lh ~]# mount -o remount,size=2048M /dev/shm
[root@lh ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 28G 23G 3.6G 87% /
/dev/sda1 99M 12M 83M 13% /boot
tmpfs 2.0G 0 2.0G 0% /dev/shm
再打开ORACLE
SQL> startup
ORACLE instance started.
Total System Global Area 1252663296 bytes
Fixed Size 2227944 bytes
Variable Size 805306648 bytes
Database Buffers 436207616 bytes
Redo Buffers 8921088 bytes
Database mounted.
Database opened.
SQL>
相关文章推荐
- 基于 Red Hat 的发行版 Oracle Linux 正式发布Oracle Linux 7.1
- Oracle Containers for J2EE远程安全漏洞(CVE-2014-0413)
- Oracle 10g R2不能使用EM的问题
- 表空间操作
- PreparedStatement中in子句的处理
- VMware下RedHat4.8_64位安装Oracle 10g RAC--简略脚本
- oracle sql日期比较
- 基于 Red Hat 的发行版 Oracle Linux 正式发布Oracle Linux 7.1
- OS block size和Oracle block size,查找OS Blocksize的方法
- oracle中创建数据库和表空间的几点总结
- 数据库自动备份脚本
- oracle的nvl函数的使用介绍
- 解决oracle用户连接失败的解决方法
- oracle的一些tips技巧
- Oracle 下的开发日积月累
- Oracle存储过程之数据库中获取数据实例
- Windows下ORACLE 10g完全卸载的方法分析
- Oracle 函数大全[字符串函数,数学函数,日期函数]第1/4页
- ORACLE LATERAL-SQL-INJECTION 个人见解