1、今天将虚拟机内存2g改为1.5g的时候启动报ORA-00845 SQL> conn /as sysdba Connected to an idle instance. SQL> startup ORA-00845: MEMORY_TARGET not supported on this system
SQL> show parameter memory NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ hi_shared_memory_address integer 0 memory_max_target big integer 800M memory_target big integer 800M shared_memory_address integer 0
在Oracle 11g中如果采用AMM内存管理,那么当MEMORY_TARGET的值大于/dev/shm的时候,就会报ORA-00845: MEMORY_TARGET not supported on this system错误,
解决办法增加/dev/shm大小,
/dev/shm的默认值是系统总内存的一半
[root@dg1 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 75G 20G 52G 28% / tmpfs 750M 280K 749M 1% /dev/shm [root@dg1 ~]# mount -o size=4G -o nr_inodes=1000000 -o noatime,nodiratime -o remount /dev/shm [root@dg1 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 75G 20G 52G 28% / tmpfs 4.0G 280K 4.0G 1% /dev/shm
编辑文件 vi /etc/fstab(第二次没有编辑这个文件数据库也启动了,请指教)
UUID=f2e7340d-6d13-4fbc-8fda-5ff2038091eb / ext4 defaults 1 1 UUID=237977e7-5680-4c09-8789-ff5b2c2d274c swap swap defaults 0 0 tmpfs /dev/shm tmpfs defaults,size=4G 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 ~
然后启动数据库
[oracle@dg1 ~]$ export ORACLE_SID=orcl [oracle@dg1 ~]$ sqlplus /nolog SQL> conn /as sysdba Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 835104768 bytes Fixed Size 2257840 bytes Variable Size 541068368 bytes Database Buffers 289406976 bytes Redo Buffers 2371584 bytes Database mounted. Database opened. SQL> show parameter memory NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ hi_shared_memory_address integer 0 memory_max_target big integer 800M memory_target big integer 800M shared_memory_address integer 0
官方解析
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.
解决问题建议
If you are installing Oracle 11g on a Linux system, note that Memory Size (SGA and PGA), which sets the initialization parameter MEMORY_TARGET or MEMORY_MAX_TARGET, cannot be greater than the shared memory filesystem (/dev/shm) on your operating system. To resolve the current error, increase the /dev/shm file size. If configuring AMM is not possible due to lack of space on /dev/shm mount point, you can configure ASMM instead of AMM, i.e. set SGA_TARGET, SGA_MAX_SIZE and PGA_AGGREGATE_TARGET instead of MEMORY_TARGET.
版权声明:本文为博主原创文章,未经博主允许不得转载。
- 上一篇:重建控制文件
- 下一篇:oracle 迁移数据文件