| 導購 | 订阅 | 在线投稿
分享
 
 
 

快速掌握解決ORA-00844錯誤的實用方法

來源:互聯網  2008-06-01 02:12:14  評論

問題:我在將Oracle的內存管理方式改爲自動內存管理時,出現ORA-00844錯誤,請問應當怎樣解決?

解答:這個錯誤不應該算作Oracle的bug,由于你設置了Oracle的MEMORY_TARGET參數的值小于了SGA_TARGET和PGA_TARGET的總和,因此才會報錯。

[oracle@yangtk ~]$ sqlplus "/ as sysdba"

SQL*Plus: Release 11.1.0.6.0 - Production on Wed Jan 16 07:30:33 2008

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> set pages 100 lines 120

SQL> show parameter target

NAME TYPE VALUE

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

archive_lag_target integer 0

db_flashback_retention_target integer 1440

fast_start_io_target integer 0

fast_start_mttr_target integer 0

memory_max_target big integer 0

memory_target big integer 0

pga_aggregate_target big integer 100M

sga_target big integer 252M

SQL> alter system set memory_target = 220m scope = spfile;

System altered.

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORA-00844: Parameter not taking MEMORY_TARGET into account,

see alert log for more information

其實這個錯誤很多情況下是由于人爲設置的參數太小造成的。但是Oracle在此處存在兩個問題,首先,沒有通過錯誤信息告訴用戶,是哪些參數的值設置導致的問題。第二點尤爲嚴重,Oracle的錯誤信息顯示,進一步的錯誤信息去alert文件中尋找,但是:

SQL> host [oracle@yangtk ~]$ tail -

30 /data/oracle/diag/rdbms/ora11g_p/ora11g/trace/alert_ora11g.log

Wed Jan 16 07:42:00 2008

ARCH shutting down

ARC1: Archival stopped

Wed Jan 16 07:42:00 2008

ARCH shutting down

ARC0: Archival stopped

Wed Jan 16 07:42:00 2008

ARC3: Becoming the 'no FAL' ARCH

ARC3: Becoming the 'no SRL' ARCH

ARC3: Archiving disabled

ARCH shutting down

ARC3: Archival stopped

ARC2: Archival stopped

Thread 1 closed at log sequence 268

Successful close of redo thread 1

Completed: ALTER DATABASE CLOSE NORMAL

ALTER DATABASE DISMOUNT

Completed: ALTER DATABASE DISMOUNT

ARCH: Archival disabled due to shutdown: 1089

Shutting down archive processes

Archiving is disabled

Archive process shutdown avoided: 0 active

Wed Jan 16 07:42:02 2008

Stopping background process VKTM:

ARCH: Archival disabled due to shutdown: 1089

Shutting down archive processes

Archiving is disabled

Archive process shutdown avoided: 0 active

Wed Jan 16 07:42:05 2008

Instance shutdown complete

大家可以發現,在alert文件中沒有任何的錯誤信息,看來Oracle在嘗試啓動直接進行了參數的檢查,這個檢查過程就直接報錯了,不過即使報錯也應該記錄到alert文件中,何況錯誤信息中明明顯示要在alert文件中尋找進一步的錯誤。

解決方法:創建pfile,然後修改MEMORY_TARGET的值即可解決此問題。

示例:

SQL> create pfile='/home/oracle/initora11g.ora' from spfile;

File created.

SQL> host echo "memory_target=367001600" >> /home/oracle/initora11g.ora

SQL> startup pfile=/home/oracle/initora11g.ora

ORACLE instance started.

Total System Global Area 267825152 bytes

Fixed Size 1299316 bytes

Variable Size 176163980 bytes

Database Buffers 88080384 bytes

Redo Buffers 2281472 bytes

Database mounted.

Database opened.

SQL> create spfile from pfile='/home/oracle/initora11g.ora';

File created.

問題:我在將Oracle的內存管理方式改爲自動內存管理時,出現ORA-00844錯誤,請問應當怎樣解決? 解答:這個錯誤不應該算作Oracle的bug,由于你設置了Oracle的MEMORY_TARGET參數的值小于了SGA_TARGET和PGA_TARGET的總和,因此才會報錯。 [oracle@yangtk ~]$ sqlplus "/ as sysdba" SQL*Plus: Release 11.1.0.6.0 - Production on Wed Jan 16 07:30:33 2008 Copyright (c) 1982, 2007, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> set pages 100 lines 120 SQL> show parameter target NAME TYPE VALUE ------------------------------------ ----------- archive_lag_target integer 0 db_flashback_retention_target integer 1440 fast_start_io_target integer 0 fast_start_mttr_target integer 0 memory_max_target big integer 0 memory_target big integer 0 pga_aggregate_target big integer 100M sga_target big integer 252M SQL> alter system set memory_target = 220m scope = spfile; System altered. SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup ORA-00844: Parameter not taking MEMORY_TARGET into account, see alert log for more information 其實這個錯誤很多情況下是由于人爲設置的參數太小造成的。但是Oracle在此處存在兩個問題,首先,沒有通過錯誤信息告訴用戶,是哪些參數的值設置導致的問題。第二點尤爲嚴重,Oracle的錯誤信息顯示,進一步的錯誤信息去alert文件中尋找,但是: SQL> host [oracle@yangtk ~]$ tail - 30 /data/oracle/diag/rdbms/ora11g_p/ora11g/trace/alert_ora11g.log Wed Jan 16 07:42:00 2008 ARCH shutting down ARC1: Archival stopped Wed Jan 16 07:42:00 2008 ARCH shutting down ARC0: Archival stopped Wed Jan 16 07:42:00 2008 ARC3: Becoming the 'no FAL' ARCH ARC3: Becoming the 'no SRL' ARCH ARC3: Archiving disabled ARCH shutting down ARC3: Archival stopped ARC2: Archival stopped Thread 1 closed at log sequence 268 Successful close of redo thread 1 Completed: ALTER DATABASE CLOSE NORMAL ALTER DATABASE DISMOUNT Completed: ALTER DATABASE DISMOUNT ARCH: Archival disabled due to shutdown: 1089 Shutting down archive processes Archiving is disabled Archive process shutdown avoided: 0 active Wed Jan 16 07:42:02 2008 Stopping background process VKTM: ARCH: Archival disabled due to shutdown: 1089 Shutting down archive processes Archiving is disabled Archive process shutdown avoided: 0 active Wed Jan 16 07:42:05 2008 Instance shutdown complete 大家可以發現,在alert文件中沒有任何的錯誤信息,看來Oracle在嘗試啓動直接進行了參數的檢查,這個檢查過程就直接報錯了,不過即使報錯也應該記錄到alert文件中,何況錯誤信息中明明顯示要在alert文件中尋找進一步的錯誤。 解決方法:創建pfile,然後修改MEMORY_TARGET的值即可解決此問題。 示例: SQL> create pfile='/home/oracle/initora11g.ora' from spfile; File created. SQL> host echo "memory_target=367001600" >> /home/oracle/initora11g.ora SQL> startup pfile=/home/oracle/initora11g.ora ORACLE instance started. Total System Global Area 267825152 bytes Fixed Size 1299316 bytes Variable Size 176163980 bytes Database Buffers 88080384 bytes Redo Buffers 2281472 bytes Database mounted. Database opened. SQL> create spfile from pfile='/home/oracle/initora11g.ora'; File created.
󰈣󰈤
王朝萬家燈火計劃
期待原創作者加盟
 
 
 
>>返回首頁<<
 
 
 
 
 熱帖排行
 
 
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有