天天看点

ORA-00824: cannot set SGA_TARGET or MEMORY_TARGET due to existing internal settings, see alert log f

数据库版本 11.1.0, 最初配置时使用的手动设定内存参数,在调整其为全自动内存参数设置过程中,发生了:

ORA-00824: cannot set SGA_TARGET or MEMORY_TARGET due to existing internal settings, see alert log for more information

(原文链接 http://ddbiz.com/?p=103)

的错误信息,过程如下:

SQL> alter system set memory_max_target=2g scope=spfile; 

System altered.

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

System altered.

SQL> alter system set pga_aggregate_target=0 scope=spfile;

System altered.

SQL> alter system set sga_target=0 scope=spfile;

System altered.

SQL> shutdown immediate

SQL> startup

ORA-00824: cannot set SGA_TARGET or MEMORY_TARGET due to existing internal settings, see alert log for more information

出现这个错误是因为 spfile.ora 中定义了 db_block_buffers 参数,从配置中删除此参数即可:

SQL> create pfile='pfile.ora' from spfile;

File created

SQL> host vi pfile.ora

#

# 删除 db_block_buffers 配置

#

SQL> startup pfile='pfile.ora';

Total System Global Area 2137886720 bytes

Fixed Size                  2146112 bytes

Variable Size            1409286336 bytes

Database Buffers          721420288 bytes

Redo Buffers                5033984 bytes

Database mounted.

Database opened.

SQL> create spfile from pfile='pfile.ora'