ORA-00847: MEMORY_TARGET/MEMORY_MAX_TARGET and LOCK_SGA cannot be set together

群里有位兄弟,测试系统修改sga_lock=true参数后,重启库报错

ORA-00847: MEMORY_TARGET/MEMORY_MAX_TARGET and LOCK_SGA cannot be set together

1.场景还原,问题处理

测试库参数文件路径
C:win_oracle_11_databaseappproduct11.2.0dbhome_1database

测试库alert日志路径
C:win_oracle_11_databaseappdiag dbmswin11win11 race


SQL> alter system set memory_max_target=4G scope=spfile;

系统已更改。

SQL> alter system set memory_target=3g scope=spfile;

系统已更改。

SQL> alter system set lock_sga=true scope=spfile;

系统已更改。


SQL> shutdown immediate;
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。

SQL> startup
ORA-00847: MEMORY_TARGET/MEMORY_MAX_TARGET and LOCK_SGA cannot be set together

SQL> create pfile from spfile;

文件已创建。

INITwin11.ORA 编辑

*.lock_sga=TRUE  删除or 注释 or =FALSE 

SQL> create pfile from spfile;

文件已创建。

SQL> startup

2.0 win测试环境,小报错记录

执行修改编辑pfile参数文件,有;特殊字符,删除后OK
SQL>create spfile from pfile;
ORA-01078: LRM-00123:

3.0 Mos ID

ORA-847 Setting LOCK_SGA Parameter to True (文档 ID 793284.1)    
Oracle Database - Enterprise Edition - Version 11.1.0.6 and later

CAUSE
LOCK_SGA and MEMORY_TARGET/MEMORY_MAX_TARGET cannot be set at the same time as the SGA might grow and shrink due to MEMORY_TARGET and LOCK_SGA can not handle that.

简单说就是参数不兼容,二选一,我选择AMM内存管理,删除还原SGA_LOCK参数默认值即可

lock_sga参数干啥的,为了防止memory被置换出来,对sga内存进行锁定的一种保护机制

blog链接
http://www.itpub.net/thread-1807698-1-1.html
原文地址:https://www.cnblogs.com/lvcha001/p/10501991.html