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

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.

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

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/0d1e3862869b7e3cea0e784cc708857b.html