資料庫啟動時報ORA-00845錯誤解決方案

來源:互聯網
上載者:User

資料庫啟動時報ORA-00845錯誤解決方案

問題描述:巡檢時發現某一個節點資料庫down了,通過sqlplus 進行系統時顯示串連的是一個空執行個體,嘗試通過startup重啟資料庫報錯,提示MEMORY_TARGETnot supported on this system,查看警示日誌報MEMORY_TARGET失敗,要增加/dev/shm大小才可以解決問題

登入資料庫時報錯資訊如下:

[Oracle@db01 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Productionon Mon Oct 30 09:26:35 2017

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

Connected to an idle instance.

SQL> startup 

ORA-00845: MEMORY_TARGET not supported on this system

後台日誌報如下資訊:

Starting ORACLE instance (normal)

WARNING: You are trying to use theMEMORY_TARGET feature. This feature requires the /dev/shm file system to bemounted for at least 13522436096 bytes. /dev/shm is either not mounted or ismounted with available space less than this size. Please fix this so that MEMORY_TARGETcan work as expected. Current available is 12203786240 and used is 454021120bytes. Ensure that the mount point is /dev/shm for this directory.

memory_target needs larger /dev/shm

問題分析:

由於Oracle11g中使用的是AMM,當MEMORY_TARGET大於/dev/shm時就提示不支援此系統,從而報錯無法啟動資料庫,由於/dev/shm是通過tmpfs通過大小的,在Linux環境中可以通過修改此大小解決問題

解決方案:

1、  查看當前的tmpfs大小資訊

[oracle@i60001~]$ df -h

Filesystem                     Size  Used Avail Use% Mounted on

/dev/mapper/vg_db01-LogVol02  229G  65G  153G  30% /

tmpfs                            12G  434M  12G  4% /dev/shm--此處要修改

/dev/sde1                      485M  40M 420M  9% /boot

/dev/mapper/vg_db01-LogVol00  30G 5.0G  24G  18% /usr

[oracle@i60001~]$ mount -o size=20G -onr_inodes=1000000 -o noatime,nodiratime -o remount /dev/shm

mount: onlyroot can do that

修改tmpfs大小要通過root使用者下面操作,切換到root使用者

[oracle@i60001~]$ su root

Password:

2、修改tmpfs大小

[root@db01oracle]#  mount -o size=20G -o nr_inodes=1000000 -o noatime,nodiratime-o remount /dev/shm

[root@db01oracle]# df -h

Filesystem                      Size  Used Avail Use% Mounted on

/dev/mapper/vg_db01-LogVol02  229G  65G  153G  30% /

tmpfs                            20G  434M  20G  3% /dev/shm--修改後的大小

/dev/sde1                       485M  40M 420M  9% /boot

/dev/mapper/vg_db01-LogVol00  30G 5.0G  24G  18% /usr

3、修改tmpfs大小後,再登入資料庫中重啟執行個體

[oracle@db01~]$ sqlplus / as sysdba

SQL*Plus:Release 11.2.0.4.0 Production on Mon Oct 30 09:42:02 2017

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

Connected toan idle instance.

SQL>startup;   

ORACLEinstance started.

Total SystemGlobal Area 1.3462E+10 bytes

Fixed Size             2265984 bytes

Variable Size               7381978240 bytes

DatabaseBuffers       6039797760 bytes

Redo Buffers                38014976 bytes

Databasemounted.

Database opened.-顯示啟動成功

--查詢當前的資料庫執行個體是否正常

SQL>select open_mode from v$database;

OPEN_MODE

--------------------

READ WRITE

相關文章

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.