如何解決oracle 11g中的ORA-00845錯誤

來源:互聯網
上載者:User

oracle11g資料庫,修改了記憶體參數memory_max_target=943718400,關閉資料庫重新啟動的時候報錯

[oracle@instuctor shm]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon Nov 19 09:34:11 2012

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

Connected to an idle instance.

SQL> startup

ORA-00845: MEMORY_TARGET not supported on this system

SQL> exit

Disconnected

[oracle@instuctor shm]$ 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.

查看資料庫的警告日誌,同樣看到了類似的報錯資訊

查看本欄目更多精彩內容:http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

Mon Nov 19 09:34:14 2012

Starting ORACLE instance (normal)

WARNING: You are trying to use the MEMORY_TARGET feature. This feature requires the /dev/shm file system to be mounted for at least 943718400

bytes. /dev/shm is either not mounted or is mounted with available space less than this size. Please fix this so that MEMORY_TARGET can work

as expected. Current available is 845021184 and used is 208900096 bytes. Ensure that the mount point is /dev/shm for this directory.

memory_target needs larger /dev/shm

通過以上原因的分析,看來是/dev/shm剩餘的空間太小了

[oracle@instuctor shm]$ df -H

Filesystem             Size   Used  Avail Use% Mounted on

/dev/sda1               17G    15G   1.2G  93% /

tmpfs                  1.1G   209M   846M  20% /dev/shm

[oracle@instuctor shm]$

Oracle在metalink的文檔:Doc ID:Note:460506.1中進行了說明。

解決這個問題只有兩個方法,

1.修改初始化參數,使得初始化參數中SGA的設定小於/dev/shm的大小

2.調整/dev/shm的大小。

修改/dev/shm的大小可以通過修改/etc/fstab來實現:

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

LABEL=/                 /                       ext3    defaults        1 1

tmpfs                   /dev/shm                tmpfs   defaults,size=2G   0 0

devpts                  /dev/pts                devpts  gid=5,mode=620  0 0

sysfs                   /sys                    sysfs   defaults        0 0

proc                    /proc                   proc    defaults        0 0

LABEL=SWAP-sda2         swap                    swap    defaults        0 0

~

~

[root@instuctor ~]# mount -o remount /dev/shm

[root@instuctor ~]# df -H

Filesystem             Size   Used  Avail Use% Mounted on

/dev/sda1               17G    15G   1.2G  93% /

tmpfs                  2.2G   209M   2.0G  10% /dev/shm

擴大/dev/shm後,再次嘗試啟動資料庫,沒有問題。

[oracle@instuctor ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon Nov 19 10:02:33 2012

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

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area  939495424 bytes

Fixed Size                  2233960 bytes

Variable Size             616565144 bytes

Database Buffers          314572800 bytes

Redo Buffers                6123520 bytes

Database mounted.

Database opened.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.