設定MEMORY_TARGET會導致RESULT_CACHE_MAX_SIZE在重啟後歸零

yangtingkun發表於2007-10-15

Oracle11g中,如果設定了MEMORY_TARGET,則RESULT_CACHE_MAX_SIZE的設定在資料庫重啟後自動被置為0


問題再現:

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

System altered.

SQL> alter system set result_cache_max_size = 10m scope = spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 209235968 bytes
Fixed Size 1298920 bytes
Variable Size 192941592 bytes
Database Buffers 12582912 bytes
Redo Buffers 2412544 bytes
Database mounted.
Database opened.
SQL> show parameter memory_target

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
memory_target big integer 220M
SQL> show parameter result_cache_max_size

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
result_cache_max_size big integer 0
SQL> alter system set result_cache_max_size = 10m scope = both;

System altered.

SQL> show parameter result_cache_max_size

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
result_cache_max_size big integer 0
SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 -
Production PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for Linux: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production

如果不設定MEMORY_TARGET而使用SGA_TARGETPGA_AGGREGATE_TARGET,則不會導致RESULT_CACHE_MAX_SIZE被置為0值:

SQL> alter system reset memory_target scope = spfile sid = '*';

System altered.

SQL> alter system reset memory_max_target scope = spfile sid = '*';

System altered.

SQL> alter system set sga_target = 170m scope = spfile;

System altered.

SQL> alter system set pga_aggregate_target = 50m scope = spfile;

System altered.

SQL> alter system set result_cache_max_size = 10m scope = spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 209235968 bytes
Fixed Size 1298920 bytes
Variable Size 150998552 bytes
Database Buffers 54525952 bytes
Redo Buffers 2412544 bytes
Database mounted.
Database opened.
SQL> show parameter result_cache_max_size

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
result_cache_max_size big integer 10M
SQL> alter system set result_cache_max_size = 20m;

System altered.

SQL> show parameter result_cache_max_size

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
result_cache_max_size big integer 20M

不使用MEMORY_TARGET方式設定記憶體引數,則RESULT_CACHE_MAX_SIZE引數設定正常。

這個bugmetalink上還沒有詳細的描述。

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

相關文章