暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

ORA-00821: Specified value of sga_target 3072M is too small, needs to be at least 12896M

原创 不吃草的牛_Nick 2022-10-20
1228


oerr ora 00821
00821, 00000, "Specified value of sga_target %sM is too small, needs to be at least %sM"
// *Cause: The specified value of sga_target is too small for the SGA to
// accommodate all of the necessary SGA components such as the
// log buffer, buffer pools, shared pool, etc.
// *Action: Set sga_target to the recommended value or reduce the values
// of any SGA component size parameters you have specified.


由于资源有限,克隆过来的数据库服务器只给了9G的内存,结果在测试时,老是会出现 OOMkiller导致宕机,即 out of memory killer,是linux下面当内存耗尽时的的一种处理机制。

当内存较少时,OOM会遍历整个进程链表,然后根据进程的内存使用情况以及它的oom score 值最终找到得分较高的进程,然后发送kill信号将其杀掉。

于是调整了一下sga_target和sga_max_size这两个参数,结果重启的时候悲剧了:

sqlplus / as sysdba

SQL> startup
ORA-00821: Specified value of sga_target 3072M is too small, needs to be at least 12896M
SQL> startup nomount
ORA-00093: _shared_pool_reserved_min_alloc must be between 4000 and 0

出现这个这个错误,突然想起来这个服务器设置过shared_pool_size参数,于是生成pfile,检查initGSP.ora,如下所示,
SQL> create pfile='/u01/app/oracle/product/10.2.0/db_1/dbs/initGSP.ora' from spfile;


手工将.shared_pool_size设置为0, 然后启动数据库实例,问题解决。如下所示:
SQL> startup pfile='/u01/app/oracle/product/10.2.0/db_1/dbs/initGSP.ora'


「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论