Oracle11gSGA调整方法

 oracle11g修改sga要先修改memory_target等参数,否则服务重启时会出现错误ORA-00844: Parameter not taking MEMORY_TARGET into account, see alert log for mo

re information。    

 

Oracle内存参数结构:

  

   

      修改SGA必须保持的原则: 
1.sga_target不能大于sga_max_size,可以设置为相等。 
2.SGA加上PGA等其他进程占用的内存总数必须小于操作系统的物理内存。 

      具体命令操作如下:

C:\Users\Administrator>sqlplus/nolog

SQL*Plus: Release 11.1.0.6.0 - Production on 星期三 2月 22 10:51:08 2012

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

SQL> conn sys/sys as sysdba;
已连接。
SQL> show sga;

Total System Global Area  631926784 bytes
Fixed Size                  1334996 bytes
Variable Size             205521196 bytes
Database Buffers          419430400 bytes
Redo Buffers                5640192 bytes
SQL> alter system set memory_max_target=700m scope=spfile;

系统已更改。

SQL> alter system set memory_target=700m scope=spfile;

系统已更改。

SQL> show sga;

Total System Global Area  631926784 bytes
Fixed Size                  1334996 bytes
Variable Size             205521196 bytes
Database Buffers          419430400 bytes
Redo Buffers                5640192 bytes
SQL> shutdown immediate;
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup;
ORACLE 例程已经启动。

Total System Global Area  631926784 bytes
Fixed Size                  1334996 bytes
Variable Size             205521196 bytes
Database Buffers          419430400 bytes
Redo Buffers                5640192 bytes
数据库装载完毕。
数据库已经打开。

SQL> alter system set sga_target=650m scope=spfile;

系统已更改。

SQL> alter system set sga_max_size=650m scope=spfile;

系统已更改。

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

Total System Global Area  686329856 bytes
Fixed Size                  1335360 bytes
Variable Size             205524928 bytes
Database Buffers          473956352 bytes
Redo Buffers                5513216 bytes
数据库装载完毕。
数据库已经打开。
SQL> show sga;

Total System Global Area  686329856 bytes
Fixed Size                  1335360 bytes
Variable Size             205524928 bytes
Database Buffers          473956352 bytes
Redo Buffers                5513216 bytes


附:ora-00844错误解决办法:

 

SQL> create pfile='c:\inittest.ora' from spfile;

文件已创建。

(手动修改文件中对应的memory_target参数)

SQL> startup pfile='c:\inittest.ora';
ORACLE 例程已经启动。

Total System Global Area  631926784 bytes
Fixed Size                  1334996 bytes
Variable Size             205521196 bytes
Database Buffers          419430400 bytes
Redo Buffers                5640192 bytes
数据库装载完毕。
数据库已经打开。
SQL> create spfile from pfile='c:\inittest.ora';

文件已创建。

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

Total System Global Area  631926784 bytes
Fixed Size                  1334996 bytes
Variable Size             205521196 bytes
Database Buffers          419430400 bytes
Redo Buffers                5640192 bytes
数据库装载完毕。
数据库已经打开。


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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值