SCOPE數據庫
The SCOPE clause lets you specify when the change takes effect. Scope depends on whether you started up the database using a client-side parameter file (pfile) or server parameter file (spfile).ide
scope可指定對system的修改什麼時候生效,scope=memory|spfile|both ,值取決於數據庫使用pfile仍是spfile啓動this
MEMORY server
MEMORY indicates that the change is made in memory, takes effect immediately, and persists until the database is shut down. If you started up the database using a parameter file (pfile), then this is the only scope you can specify.內存
scope=memory,表示修改當即生效,持續到數據庫關閉爲止,若數據庫使用pfile啓動,這是惟一可選值,也是默認值。ci
SPFILE it
SPFILE indicates that the change is made in the server parameter file. The new setting takes effect when the database is next shut down and started up again. You must specify SPFILE when changing the value of a static parameter that is described as not modifiable in Oracle Database Reference.io
scope=spfile ,會修改spfile參數,新設置只有在從新使用spfile啓動數據庫的時候生效。cli
另外,如果修改靜態參數(不能直接生效的參數),必須指定scope=spfile,不然若指定memory或者both會報以下錯誤:sed
ORA-02095: specified initialization parameter cannot be modified
由於靜態參數不能直接經過修改內存而生效,只能經過修改spfile而後重啓數據庫生效。
BOTH
BOTH indicates that the change is made in memory and in the server parameter file. The new setting takes effect immediately and persists after the database is shut down and started up again.
scope=both,表示修改會發生在內存上當即生效,並修改spfile保證數據庫重啓後也生效。
If a server parameter file was used to start up the database, then BOTH is the default. If a parameter file was used to start up the database, then MEMORY is the default, as well as the only scope you can specify.
若數據庫使用spfile啓動,則scope=both是默認值
若數據庫使用pfile啓動,則scope=memory是默認值,也是惟一值。
靜態參數,不能經過修改內存(默認scope值或scope=memory或scope=both)來生效,要經過修改spfile(),重啓數據庫來生效。