修改Memory_max_target为0出错

sql> connect / as sysdba
Connected.
sql> alter system set memory_target=0;

System altered.
sql> alter system set memory_max_target=0;
alter system set memory_max_target=0
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified

sql> alter system set memory_max_target=0 scope=spfile; --

System altered.

sql> alter system set sga_target=6G scope=spfile;

System altered.

sql> alter system set pga_aggregate_target=2112M;

System altered.

sql> alter system set shared_pool_size=0;

System altered.

sql> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sql> startup
ORA-00843: Parameter not taking MEMORY_MAX_TARGET into account
ORA-00849: SGA_TARGET 6442450944 cannot be set to more than MEMORY_MAX_TARGET 0.
sql> startup nomount
ORA-00843: Parameter not taking MEMORY_MAX_TARGET into account
ORA-00849: SGA_TARGET 6442450944 cannot be set to more than MEMORY_MAX_TARGET 0.

解决方法

Symptoms
When trying to set SGA_TARGET using an ALTER SYstem command,the following errors are raised:

ORA-00843: Parameter not taking MEMORY_MAX_TARGET into account
ORA-00849: SGA_TARGET 10737418240 cannot be set to more than MEMORY_MAX_TARGET 0.

Changes
MEMORY_MAX_TARGET was set to 0.

Cause
The problem is caused by the MEMORY_MAX_TARGET parameter explicitly being set to 0. In case AMM should not be used,MEMORY_MAX_TARGET should not be set at all.

Solution
The solutions to the problem are:

create a PFILE from the SPFILE being used and remove the MEMORY_MAX_TARGET=0 and MEMORY_TARGET=0 lines. After that,use the modified PFILE to create a new SPFILE and start the instance with this new setup.
should the instance be running,then use the following commands to remove the explicit setting of MEMORY_TARGET=0 and MEMORY_MAX_TARGET=0:

alter system reset memory_target;
alter system reset memory_max_target;

参考博文:https://blog.csdn.net/babymouse1212/article/details/71078799

相关文章

Java Oracle 结果集是Java语言中处理数据库查询结果的一种方...
Java AES和Oracle AES是现代加密技术中最常使用的两种AES加密...
Java是一种广泛应用的编程语言,具备可靠性、安全性、跨平台...
随着移动互联网的发展,抽奖活动成为了营销活动中不可或缺的...
Java和Oracle都是在计算机领域应用非常广泛的技术,他们经常...
Java 是一门非常流行的编程语言,它可以运行于各种操作系统上...