如何解決ORA-00845錯誤
今天剛剛安裝了一個oracle 11gr2的資料庫,第一次啟動時報 ORA-00845錯誤。
oracle@r05a11016.yh.com:/home/oracle>sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.2.0 Production on Fri Apr 15 16:08:57 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
SQL> exit
Disconnected
檢視資料:
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.
問題是由於設定SGA的大小超過了作業系統/dev/shm的大小:
oracle@r05a11016.yh.com:/home/oracle>df -h /dev/shm
Filesystem Size Used Avail Use% Mounted on
tmpfs 71G 34G 37G 48% /dev/shm
可用大小是37G 而從spfile檔案裡的memory_target 是50 多G .
oracle@r05a11016.yh.com:/home/oracle>sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.2.0 Production on Fri Apr 15 16:13:44 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL> create pfile='/tmp/orcl.ora' from spfile;
File created.
SQL> exit
Disconnected
oracle@r05a11016.yh.com:/home/oracle>vim /tmp/orcl.ora
orcl.__db_cache_size=32346472448
orcl.__java_pool_size=134217728
orcl.__large_pool_size=134217728
orcl.__oracle_base='/apsarapangu/disk1/opt/oracle'#ORACLE_BASE set from environment
orcl.__pga_aggregate_target=24427626496
orcl.__sga_target=36373004288
orcl.__shared_io_pool_size=0
orcl.__shared_pool_size=3221225472
orcl.__streams_pool_size=134217728
*.audit_file_dest='/apsarapangu/disk1/opt/oracle/admin/orcl/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/apsarapangu/disk1/opt/oracle/oradata/orcl/control01.ctl','/apsarapangu/disk1/opt/oracle/fast_recovery_
area/orcl/control02.ctl'
*.db_block_size=8192
*.db_domain='yh.com'
*.db_name='orcl'
*.db_recovery_file_dest='/apsarapangu/disk1/opt/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=4227858432
*.diagnostic_dest='/apsarapangu/disk1/opt/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
#*.memory_target=60800630784 大於可用/dev/shm大小。將其修改為16g。
*.memory_target=17179869184
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
"/tmp/orcl.ora" 26L, 1049C written
重新啟動。
SQL*Plus: Release 11.2.0.2.0 Production on Fri Apr 15 16:30:16 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup pfile='/tmp/orcl.ora'
ORACLE instance started.
Total System Global Area 1.7103E+10 bytes
Fixed Size 2243608 bytes
Variable Size 8455717864 bytes
Database Buffers 8623489024 bytes
Redo Buffers 21712896 bytes
Database mounted.
Database opened.
==============================
當然可以修改/dev/shm大小 ,使其大於SGA大小。
解決步驟:
修改/etc/fstab 中/dev/shm 的大小,使其大於SGA 的大小。
#vi /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
LABEL=/data /data ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
#tmpfs /dev/shm tmpfs defaults 0 0
tmpfs /dev/shm tmpfs defaults,size=10240M 0 0
。。。。
LABEL=SWAP-sda swap swap defaults 0 0
~
"/etc/fstab" 13L, 965C written
解除安裝再載入
# umount /dev/shm
# mount /dev/shm
再次檢視。
# df -k /dev/shm
oracle@r05a11016.yh.com:/home/oracle>sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.2.0 Production on Fri Apr 15 16:08:57 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
SQL> exit
Disconnected
檢視資料:
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.
問題是由於設定SGA的大小超過了作業系統/dev/shm的大小:
oracle@r05a11016.yh.com:/home/oracle>df -h /dev/shm
Filesystem Size Used Avail Use% Mounted on
tmpfs 71G 34G 37G 48% /dev/shm
可用大小是37G 而從spfile檔案裡的memory_target 是50 多G .
oracle@r05a11016.yh.com:/home/oracle>sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.2.0 Production on Fri Apr 15 16:13:44 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL> create pfile='/tmp/orcl.ora' from spfile;
File created.
SQL> exit
Disconnected
oracle@r05a11016.yh.com:/home/oracle>vim /tmp/orcl.ora
orcl.__db_cache_size=32346472448
orcl.__java_pool_size=134217728
orcl.__large_pool_size=134217728
orcl.__oracle_base='/apsarapangu/disk1/opt/oracle'#ORACLE_BASE set from environment
orcl.__pga_aggregate_target=24427626496
orcl.__sga_target=36373004288
orcl.__shared_io_pool_size=0
orcl.__shared_pool_size=3221225472
orcl.__streams_pool_size=134217728
*.audit_file_dest='/apsarapangu/disk1/opt/oracle/admin/orcl/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/apsarapangu/disk1/opt/oracle/oradata/orcl/control01.ctl','/apsarapangu/disk1/opt/oracle/fast_recovery_
area/orcl/control02.ctl'
*.db_block_size=8192
*.db_domain='yh.com'
*.db_name='orcl'
*.db_recovery_file_dest='/apsarapangu/disk1/opt/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=4227858432
*.diagnostic_dest='/apsarapangu/disk1/opt/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
#*.memory_target=60800630784 大於可用/dev/shm大小。將其修改為16g。
*.memory_target=17179869184
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
"/tmp/orcl.ora" 26L, 1049C written
重新啟動。
SQL*Plus: Release 11.2.0.2.0 Production on Fri Apr 15 16:30:16 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup pfile='/tmp/orcl.ora'
ORACLE instance started.
Total System Global Area 1.7103E+10 bytes
Fixed Size 2243608 bytes
Variable Size 8455717864 bytes
Database Buffers 8623489024 bytes
Redo Buffers 21712896 bytes
Database mounted.
Database opened.
==============================
當然可以修改/dev/shm大小 ,使其大於SGA大小。
解決步驟:
修改/etc/fstab 中/dev/shm 的大小,使其大於SGA 的大小。
#vi /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
LABEL=/data /data ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
#tmpfs /dev/shm tmpfs defaults 0 0
tmpfs /dev/shm tmpfs defaults,size=10240M 0 0
。。。。
LABEL=SWAP-sda swap swap defaults 0 0
~
"/etc/fstab" 13L, 965C written
解除安裝再載入
# umount /dev/shm
# mount /dev/shm
再次檢視。
# df -k /dev/shm
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22664653/viewspace-692640/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORA-00845的錯誤與解決方案
- ORACLE11G解決ORA-00845錯誤Oracle
- ORA-00845 錯誤處理
- 域名解析錯誤如何解決?
- GitLab 500 錯誤如何解決?Gitlab
- 解決Linux上11g的ORA-00845錯誤Linux
- 爬蟲錯誤程式碼如何解決?爬蟲
- 如何解決ORA-04031 錯誤(轉)
- 如何解決寬頻連線錯誤769
- 如何解決寬頻連線錯誤651
- 如何解決ORA-04031 錯誤(zt)
- 如何解決該錯誤?(與Struts有關)
- 雲伺服器如何解決DNS解析錯誤故障伺服器DNS
- mysql服務啟動1053錯誤如何解決MySql
- 資料分析中會常犯哪些錯誤,如何解決?
- 如何解決url傳參導致錯誤問題
- 如何解決 VLC 影片嵌入字幕中遇到的錯誤
- jdon到最後出現的錯誤..如何解決
- win10寬頻連線錯誤提示錯誤程式碼為651如何解決Win10
- 如何判斷DNS解析故障?如何解決DNS解析錯誤?DNS
- win7寬頻連線錯誤738如何解決?Win7
- windows10系統下HTTP錯誤400如何解決WindowsHTTP
- 憋了1.5天了,這個錯誤提示如何解決?
- ORA-00845: MEMORY_TARGET not supported on this system報錯解決
- ORA-00845 MEMORY_TARGET not supported on this system報錯解決
- 如何解決 Nginx 與 FastCGI 通訊錯誤 "Primary script unknown"?NginxAST
- 如何解決apache 403錯誤問題?Linux學習教程ApacheLinux
- ORA-00845 解決
- SAP CRM中介軟體Generic stop set的錯誤如何解決
- windows10系統顯示印表機列印錯誤如何解決Windows
- 我們是如何解決偶發性的502錯誤的
- 如何解決Win10更新錯誤程式碼8024000B?Win10
- 如何解決pycharm報錯PyCharm
- Ocelot錯誤解決
- 如何解決win10更新amd顯示卡驅動錯誤的問題Win10
- 如何解決應用安裝失敗錯誤碼-13的問題
- Win10系統新增家庭成員發生錯誤如何解決Win10
- 資料庫使用者名稱和密碼錯誤:如何解決?資料庫密碼