memory_max_target/memory_target設定過大報ORA-00845錯誤

pxbibm發表於2016-07-17

今天在授課的過程中,在修改引數時,遇到memory_max_target/memory_target設定過大,可能導致instance無法啟動,報ORA-00845錯誤。

[oracle@pxboracle ~]$ oerr ora 00845
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.

  解決的方案是增加tmpfs檔案大小:
第一步:修改/etc/fstab中tmpfs對應的行;
    將原來的tmpfs   /dev/shm  tmpfs defaults 0 0
    改成tmpfs /dev/shm tmpfs default,size=2024M 0 0,這樣tmpfs增大為2G,

[root@pxboracle ~]# vi /etc/fstab

/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults,size=2048m        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
~                                                                                   
第二步:重新mount /dev/shm使之生效。
 [root@pxboracle ~]# mount -o remount /dev/shm
第三步:驗證tmpfs檔案大小
[root@pxboracle ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       35G   30G  3.5G  90% /
/dev/sda1              99M   13M   82M  14% /boot
tmpfs                 2.0G  516M  1.5G  26% /dev/shm

第四步: 重啟資料庫

SQL> alter system set memory_max_target=1g 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


 

SQL> startup
ORACLE instance started.

Total System Global Area 1068937216 bytes
Fixed Size      2260088 bytes
Variable Size    742392712 bytes
Database Buffers   318767104 bytes
Redo Buffers      5517312 bytes
Database mounted.
Database opened.
SQL> show parameter memo

NAME         TYPE  VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address      integer  0
memory_max_target       big integer 1G
memory_target        big integer 800M
shared_memory_address       integer  0
SQL> alter system set memory_target=900m;

System altered.

SQL> show parameter memo

NAME         TYPE  VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address      integer  0
memory_max_target       big integer 1G
memory_target        big integer 900M
shared_memory_address       integer  0
SQL> show parameter sga

NAME         TYPE  VALUE
------------------------------------ ----------- ------------------------------
lock_sga        boolean  FALSE
pre_page_sga        boolean  FALSE
sga_max_size        big integer 1G
sga_target        big integer 516M
SQL> alter system set sga_target=600m;

System altered.

SQL> show parameter sga

NAME         TYPE  VALUE
------------------------------------ ----------- ------------------------------
lock_sga        boolean  FALSE
pre_page_sga        boolean  FALSE
sga_max_size        big integer 1G
sga_target        big integer 600M
SQL> show paramter pag
SP2-0158: unknown SHOW option "paramter"
SP2-0158: unknown SHOW option "pag"
SQL> show parameter pga

NAME         TYPE  VALUE
------------------------------------ ----------- ------------------------------
pga_aggregate_target       big integer 0
SQL>


memory_max_target/memory_target設定過大報ORA-00845錯誤

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12798004/viewspace-2122116/,如需轉載,請註明出處,否則將追究法律責任。

相關文章