Oracle study之--“ORA-00845: MEMORY_TARGET not supported on this system"錯誤,oraclememorytarget

來源:互聯網
上載者:User

Oracle study之--“ORA-00845: MEMORY_TARGET not supported on this system"錯誤,oraclememorytarget

Oracle study之--“ORA-00845: MEMORY_TARGET not supported on this system"錯誤

系統內容:

   作業系統:RedHat EL6(64)

   Oracle:    Oracle 11g R2

 

故障案例:

在Oracle 11gR2下調整記憶體參數:memory_target

SQL> show parameter memNAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------hi_shared_memory_address             integer     0memory_max_target                    big integer 400Mmemory_target                        big integer 400Mshared_memory_address                integer     0SQL> alter system set memory_max_target=1200m scope=spfile;System altered.SQL> alter system set memory_target=1200m scope=spfile;System altered.SQL> show parameter sgaNAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------lock_sga                             boolean     FALSEpre_page_sga                         boolean     FALSEsga_max_size                         big integer 400Msga_target                           big integer 0SQL> show parameter sharedNAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------hi_shared_memory_address             integer     0max_shared_servers                   integershared_memory_address                integer     0shared_pool_reserved_size            big integer 6710886shared_pool_size                     big integer 0shared_server_sessions               integershared_servers                       integer     1SQL> alter system set shared_pool_size=500m scope=spfile;System altered.SQL> show parameter javaNAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------java_jit_enabled                     boolean     TRUEjava_max_sessionspace_size           integer     0java_pool_size                       big integer 0java_soft_sessionspace_limit         integer     0SQL> alter system set java_pool_size=300m scope=spfile;System altered.
<strong>調整完成後,重新啟動Instance:</strong>

SQL> startup force;
ORA-00845: MEMORY_TARGET not supported on this system
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

查看linux系統檔案系統:
[oracle@rh6 dbs]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              18G  5.2G   12G  32% /
tmpfs                 878M   72K  878M   1% /dev/shm
/dev/sda1             2.0G   62M  1.8G   4% /boot
/dev/sda3              12G  5.7G  5.4G  52% /u01
/dev/sda5             9.9G  4.9G  4.6G  52% /usr
/dev/sda7             4.2G  300M  3.7G   8% /var

---從以上可以看到,對於虛擬tmpfs的記憶體的檔案系統,可用空間為878M,無法滿足memory_target =1200M的記憶體需求

 

調整tmpfs:

<strong>[oracle@rh6 dbs]$ su -Password: [root@rh6 ~]# umount tmpfsumount: /dev/shm: device is busy.        (In some cases useful info about processes that use         the device is found by lsof(8) or fuser(1))</strong>
<strong>關閉和tmpfs相關的process:</strong>
 
<strong>[root@rh6 ~]# fuser -kc /dev/shm/dev/shm:             2204m</strong>
<strong>[root@rh6 ~]# umount tmpfs[root@rh6 ~]# mount  -t tmpfs shmfs -o size=1300m /dev/shm[root@rh6 ~]# df -hFilesystem            Size  Used Avail Use% Mounted on/dev/sda2              18G  5.2G   12G  32% //dev/sda1             2.0G   62M  1.8G   4% /boot/dev/sda3              12G  5.7G  5.4G  52% /u01/dev/sda5             9.9G  4.9G  4.6G  52% /usr/dev/sda7             4.2G  300M  3.7G   8% /varshmfs                 1.3G     0  1.3G   0% /dev/shm</strong>
<strong>修改fstab檔案,當系統啟動時mount tmpfs</strong>
<strong>[root@rh6 ~]# vi /etc/fstab## /etc/fstab# Created by anaconda on Sun Sep 29 16:52:59 2013## 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=85ffcaeb-1855-4f6a-b1af-d4e13d7b8850 /                       ext4    defaults        1 1UUID=0e7c052e-fc2a-402a-82cc-116e7629ef8f /boot                   ext4    defaults        1 2UUID=cf98cf21-ba1f-4a3a-aac3-43406dd5fca1 /u01                    ext4    defaults        1 2UUID=e3cf943c-48c4-4c4b-ba65-f11ba1f6a2e0 /usr                    ext4    defaults        1 2UUID=c5dd449a-ce22-4d47-a6d3-2d09c0186489 /var                    ext4    defaults        1 2UUID=e701d956-939e-441b-bad4-03b2057d4159 swap                    swap    defaults        0 0tmpfs                   /dev/shm                tmpfs    defaults,size=1300m        0 0devpts                  /dev/pts                devpts  gid=5,mode=620  0 0sysfs                   /sys                    sysfs   defaults        0 0proc                    /proc                   proc    defaults        0 0~[root@rh6 ~]# mount tmpfs[root@rh6 ~]# df -hFilesystem            Size  Used Avail Use% Mounted on/dev/sda2              18G  5.2G   12G  32% //dev/sda1             2.0G   62M  1.8G   4% /boot/dev/sda3              12G  5.7G  5.4G  52% /u01/dev/sda5             9.9G  4.9G  4.6G  52% /usr/dev/sda7             4.2G  300M  3.7G   8% /vartmpfs                 1.3G     0  1.3G   0% /dev/shm</strong>
<strong>驗證:</strong>
<strong>[root@rh6 ~]# umount /dev/shm[root@rh6 ~]# df -hFilesystem            Size  Used Avail Use% Mounted on/dev/sda2              18G  5.2G   12G  32% //dev/sda1             2.0G   62M  1.8G   4% /boot/dev/sda3              12G  5.7G  5.4G  52% /u01/dev/sda5             9.9G  4.9G  4.6G  52% /usr/dev/sda7             4.2G  300M  3.7G   8% /var[root@rh6 ~]# mount tmpfs[root@rh6 ~]# df -hFilesystem            Size  Used Avail Use% Mounted on/dev/sda2              18G  5.2G   12G  32% //dev/sda1             2.0G   62M  1.8G   4% /boot/dev/sda3              12G  5.7G  5.4G  52% /u01/dev/sda5             9.9G  4.9G  4.6G  52% /usr/dev/sda7             4.2G  300M  3.7G   8% /vartmpfs                 1.3G     0  1.3G   0% /dev/shm[root@rh6 ~]# cat /etc/fstab## /etc/fstab# Created by anaconda on Sun Sep 29 16:52:59 2013## 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=85ffcaeb-1855-4f6a-b1af-d4e13d7b8850 /                       ext4    defaults        1 1UUID=0e7c052e-fc2a-402a-82cc-116e7629ef8f /boot                   ext4    defaults        1 2UUID=cf98cf21-ba1f-4a3a-aac3-43406dd5fca1 /u01                    ext4    defaults        1 2UUID=e3cf943c-48c4-4c4b-ba65-f11ba1f6a2e0 /usr                    ext4    defaults        1 2UUID=c5dd449a-ce22-4d47-a6d3-2d09c0186489 /var                    ext4    defaults        1 2UUID=e701d956-939e-441b-bad4-03b2057d4159 swap                    swap    defaults        0 0tmpfs                   /dev/shm                tmpfs    defaults,size=1300m        0 0devpts                  /dev/pts                devpts  gid=5,mode=620  0 0sysfs                   /sys                    sysfs   defaults        0 0proc                    /proc                   proc    defaults        0 0</strong>
<strong>[root@rh6 ~]# df -hFilesystem            Size  Used Avail Use% Mounted on/dev/sda2              18G  5.2G   12G  32% //dev/sda1             2.0G   62M  1.8G   4% /boot/dev/sda3              12G  5.7G  5.4G  52% /u01/dev/sda5             9.9G  4.9G  4.6G  52% /usr/dev/sda7             4.2G  300M  3.7G   8% /vartmpfs                 1.3G     0  1.3G   0% /dev/shm</strong>

重新啟動Instance:

[oracle@rh6 ~]$ sqlplus '/as sysdba'

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jun 25 11:34:39 2015

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 1252663296 bytes
Fixed Size                  2227944 bytes
Variable Size            1224737048 bytes
Database Buffers           16777216 bytes
Redo Buffers                8921088 bytes
Database mounted.
Database opened.


 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.