阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

Oracle scope中 spfile、memory、both 的区别说明

134次阅读
没有评论

共计 1304 个字符,预计需要花费 4 分钟才能阅读完成。

Oracle 里面有个叫做 spfile 的东西,就是动态参数文件,里面设置了 Oracle 的各种参数。

所谓的动态,就是说你可以在不关闭数据库的情况下,更改数据库参数,记录在 spfile 里面。

更改参数的时候,有 4 种 scope 选项,scope 就是范围

1、scope=spfile 仅仅更改 spfile 里面的记载,不更改内存,也就是不立即生效,而是等下次数据库启动生效。有一些参数只允许用这种方法更改

2、scope=memory 仅仅更改内存,不改 spfile。也就是下次启动就失效了

3、scope=both 内存和 spfile 都更改

4、不指定 scope 搜索参数,等同于 scope=both.

ALTER SYSTEM 中 SCOPE=SPFILE/MEMORY/BOTH 的区别:

SCOPE = SPFILE

The change is applied in theserverparameter 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 = MEMORY

The 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 = BOTH

The 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.

(既写入到初始化参数文件,也在内存上修改,立即生效。同样也只适用于动态参数,静态参数则不允许。)

更多 Oracle 相关信息见 Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

本文永久更新链接地址 :http://www.linuxidc.com/Linux/2017-08/146340.htm

正文完
星哥说事-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-22发表,共计1304字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中