改参数疑问?

[复制链接]
查看11 | 回复6 | 2010-3-1 11:07:22 | 显示全部楼层 |阅读模式
1:
SQL> alter system set sga_max_size=50m scope=spfile;
系统已更改。
这样改动正常!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2:
这样改动报错???????????????????????????????????
SQL> alter system set sga_max_size=40m scope=both;
alter system set sga_max_size=40m scope=both

*
ERROR 位于第 1 行:
ORA-02095: 无法修改指定的初始化参数
3:
为何???????????????????????????????????????????
4:怎样才能使不重启数据库的情况下改动类似sga_max_size的参数????????????????
回复

使用道具 举报

千问 | 2010-3-1 11:07:22 | 显示全部楼层
NO WAY 这个参数是静态的 不能这样改 只能RESTART DATABASE
回复

使用道具 举报

千问 | 2010-3-1 11:07:22 | 显示全部楼层
在Oracle中,從9i開始引入了spfile,也就是服務 器端初始化參數,有很多是可以支持在線修改的,也就是修改會馬上生效,詳細內容看下面的說明:
The ISSYS_MODIFIABLE column in V$PARAMETER tells us whether the parameters are static or dynamic. Static parameters require the instance to be restarted while dynamic parameters can take effect immediately upon being changed.
SQL> select distinct issys_modifiable from v$parameter;

ISSYS_MODIFIABLE
---------------------------
DEFERRED
FALSE
IMMEDIATE
If the ISSYS_MODIFIABLE value is set to FALSE for a parameter, it means that the parameter cannot change its value in the lifetime of the instance; the database needs to be restarted for changes to take effect. A parameter set to IMMEDATE value means that it is dynamic and can be set to change the present active instance as well as future database restarts. A parameter set to DEFERRED is also dynamic, but changes only affect subsequent sessions, currently active sessions will not be affected and retain the old parameter value.
回复

使用道具 举报

千问 | 2010-3-1 11:07:22 | 显示全部楼层
修改sga_max_size需要重启
回复

使用道具 举报

千问 | 2010-3-1 11:07:22 | 显示全部楼层
没有任何方法,不重启也能起作用吗?
回复

使用道具 举报

千问 | 2010-3-1 11:07:22 | 显示全部楼层
没有
原帖由 oracle_ren 于 2010-2-5 15:48 发表
没有任何方法,不重启也能起作用吗?

回复

使用道具 举报

千问 | 2010-3-1 11:07:22 | 显示全部楼层
SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE10.2.0.1.0Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

SQL> Select Name,isses_modifiable,issys_modifiable,isinstance_modifiable From v$parameter Where Name='sga_max_size';

NAME
ISSES_MODIFIABLE ISSYS_MODIFIABLE ISINSTANCE_MODIFIABLE
-------------------------------------------------------------------------------- ---------------- ---------------- ---------------------
sga_max_size
FALSE
FALSE
FALSE

ISSES_MODIFIABLE --是否允许session修改
ISSYS_MODIFIABLE ---是否允许system修改
ISINSTANCE_MODIFIABLE ---是否允许instance修改
可以看到这个参数是都不允许的。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行