增加数据库SGA的方法

数据库版本10.2.0.1.

1.如果数据库库使用的是pfile
修改pfile文件,记住sga_max_size的值必须大于sga_target的值.
修改完成后重启数据库.

*.sga_max_size=251M
*.sga_target=242M

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL>
SQL> startup
ORACLE instance started.

Total System Global Area 264241152 bytes
Fixed Size 1218892 bytes
Variable Size 96470708 bytes
Database Buffers 163577856 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
SQL>
SQL>
SQL> show parameter sga

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 252M
sga_target big integer 244M

2.如果数据库使用的是spfile,由于sga_max_size和sga_target的值需要重启数据库才能生效.
所以需要登陆数据库
alter system set sga_max_size=287M scope=spfile;
alter system set sga_target=285M scope=spfile;

然后重启数据库即可生效

SQL> show parameter sga

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 252M
sga_target big integer 244M
SQL>
SQL>
SQL> alter system set sga_max_size=280M;
alter system set sga_max_size=280M
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified


SQL> alter system set sga_max_size=280M scope=spfile;

System altered.

SQL> alter system set sga_target=250M scope=spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL>
SQL> startup
ORACLE instance started.

Total System Global Area 293601280 bytes
Fixed Size 1219064 bytes
Variable Size 121636360 bytes
Database Buffers 167772160 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
SQL> show parameter sga

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 280M
sga_target big integer 252M
SQL>

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23850820/viewspace-1041037/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/23850820/viewspace-1041037/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值