共计 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