签到成功

知道了

CNDBA社区CNDBA社区

Oracle 在线增加 sga_target 内存大小 hang 说明

2020-05-12 18:32 2799 0 原创 Oracle 19c
作者: dave

查看Oracle AWR后,发现内存有优化的余地,直接修改后,session 挂住,等了很久后中断了会话:http://www.cndba.cn/cndba/dave/article/4159http://www.cndba.cn/cndba/dave/article/4159

cndba@SQL> alter system set sga_target=30G scope=both;
^Calter system set sga_target=30G scope=both
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-01013: user requested cancel of current operation

sga_target 参数是支持在线调整的,但这里明显是调不动,上MOS搜了一下,解释是内存不足导致的:

http://www.cndba.cn/cndba/dave/article/4159
http://www.cndba.cn/cndba/dave/article/4159http://www.cndba.cn/cndba/dave/article/4159

ALTER SYSTEM SET SGA_TARGET=’’G Scope=memory Hangs (Doc ID 1946257.1)

http://www.cndba.cn/cndba/dave/article/4159
http://www.cndba.cn/cndba/dave/article/4159
http://www.cndba.cn/cndba/dave/article/4159

The problem lies in the scope=memory option. If there is not enough available memory to increase the sga_target, it causes the statement and the server to hang.

在主机内存不足的情况下,增加sga_target 会导致系统hang住,Oracle 给的建议是先修改spfile,然后重启实例。

http://www.cndba.cn/cndba/dave/article/4159
http://www.cndba.cn/cndba/dave/article/4159

cndba@SQL> alter system set sga_target=30G scope=spfile;
System altered.

cndba@SQL> alter system set sga_target=30G scope=memory;
^C alter system set sga_target=30G scope=memory
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-01013: user requested cancel of current operation

生产环境,没法直接重启,所以先修改了spfile,等下次窗口,在重启吧。

版权声明:本文为博主原创文章,未经博主允许不得转载。

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
dave

dave

关注

人的一生应该是这样度过的:当他回首往事的时候,他不会因为虚度年华而悔恨,也不会因为碌碌无为而羞耻;这样,在临死的时候,他就能够说:“我的整个生命和全部精力,都已经献给世界上最壮丽的事业....."

  • 2283
    原创
  • 3
    翻译
  • 579
    转载
  • 196
    评论
  • 访问:8179378次
  • 积分:4428
  • 等级:核心会员
  • 排名:第1名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ