V$PARAMETER與V$SPPARAMETER的區別
1.官方文檔定義
V$PARAMETER
V$PARAMETER displays information about the initialization parameters that are currently in effect for the session.
A new session inherits parameter values from the instance-wide values displayed by the V$SYSTEM_PARAMETER view.
V$SPPARAMETER
V$SPPARAMETER displays information about the contents of the server parameter file.
If a server parameter file was not used to start the instance, then each row of the view will contain FALSE in the ISSPECIFIED column.
2.oracle用spfile啟動
可以看到v$parameter顯示的不僅僅是參數文件中的所涉及到參數值,而且一些系統默認值也顯示出來了。而v$spparameter僅僅顯示參數文件中所涉及到的參數值,其余的全為空值。
3.動態改變一個參數看這兩個視圖有什麽影響
SQL> alter system set open_cursors=500;
兩個視圖都同時顯示更新之後的值
4.用pfile啟動數據庫
SQL> create pfile=‘/home/oracle/pfile524‘ from spfile;
SQL> startup force pfile=‘/home/oracle/pfile524‘;
可以看到v$parameter仍然有值,可v$spparameter卻為空值了
5.總結
v$parameter看到的現在數據庫所使用的參數值
v$spparameter所顯示的是參數文件中所規定的參數值,如果用pfile啟動的數據庫,該視圖全為空值。
歡迎大家補充和建議!
V$PARAMETER與V$SPPARAMETER的區別