oracle内部参数可以修改吗,Oracle参数修改浅析

Oracle参数修改浅析SCOPE = SPFILEThe change is applied in the server parameter file only. The effect is as follows:For dy

Oracle参数修改浅析

SCOPE = SPFILEThe change is applied in the server parameter file only. The effect is as follows:

For dynamic parameters, the change is effective at the next startup and is persistent.

For static parameters, the behavior. is the same as for dynamic parameters. This is the only SCOPE specification allowed for static parameters.

SCOPE = MEMORYThe change is applied in memory only. The effect is as follows:

For dynamic parameters, the effect is immediate, but it is not persistent because the server parameter file is not updated.

For static parameters, this specification is not allowed.

SCOPE = BOTHThe change is applied in both the server parameter file and memory. The effect is as follows:

For dynamic parameters, the effect is immediate and persistent.

For static parameters, this specification is not allowed.

反过来推理下:

启动和修改方式

动态参数

静态参数

SPFILE

启动

Scope=spfile

更新spfile

更新spfile

重启后永久生效

重启后永久生效

Scope=memory

更新内存

不允许

立即生效,重启后无效

Scope=both(默认)

更新内存和spfile

不允许

立即并永久生效

PFILE

启动

Scope=spfile

不允许

不允许

Scope=memory(默认)

更新内存

不允许

立即生效,,重启后无效

Scope=both

不允许

不允许

从以上可以看出,由于pfile只能手工修改,所以以pfile启动后,仅动态参数可以立即修改生效,但实例重启后无效;以spfile启动,静态参数可以修改重启后生效,动态参数可以以三种方式修改生效。

如何查看一个参数是动态还是静态的,可以通过v$parameter视图中的issys_modifiable获得:

此字段含义:

?IMMEDIATE - Parameter can be changed with ALTER SYSTEM regardless of the type of parameter file used to start the instance. The change takes effect immediately.

?DEFERRED - Parameter can be changed with ALTER SYSTEM regardless of the type of parameter file used to start the instance. The change takes effect in subsequent sessions.

?FALSE - Parameter cannot be changed with ALTER SYSTEM unless a server parameter file was used to start the instance. The change takes effect in subsequent instances

从解释来看,immediate和deferred都属于动态参数,但deferred比较特殊,对当前已经连接会话不生效。False属于静态参数,只能重启后生效。

SQL> select issys_modifiable,count(*) from v$parameter group by issys_modifiable;

ISSYS_MOD   COUNT(*)

--------- ----------

IMMEDIATE        145

FALSE            107

DEFERRED           7

logo.gif

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值