oracle参数的修改。oracle参数有些可以动态修改,有些修改后需要重启库,但是这多参数我们怎么能记住哪些是可以动态修改的呢?其实不用记,到时候我们自己去查就可以了。

SQL> show parameter sga

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 400M
sga_target big integer 400M

SQL> select name,value,ISSYS_MODIFIABLE from v$parameter where name like 'sga%';

NAME VALUE ISSYS_MOD
-------------------- ------------------------------ ---------
sga_max_size 419430400 FALSE
sga_target 419430400 IMMEDIATE

如果ISSYS_MODIFIABLE 返回的是false,说明该参数无法用alter system语句动态修改,需要重启数据库

我们看下官网对此的说明:

The ISSYS_MODIFIABLE column in V$PARAMETER tells us whether the parameters are static or dynamic. Static parameters require the instance to be restarted while dynamic parameters can take effect immediately upon being changed.
SQL> select distinct issys_modifiable from v$parameter;

ISSYS_MODIFIABLE
---------------------------
DEFERRED
FALSE
IMMEDIATE

If the ISSYS_MODIFIABLE value is set to FALSE for a parameter, it means that the parameter cannot change its value in the lifetime of the instance; the database needs to be restarted for changes to take effect. A parameter set to IMMEDATE value means that it is dynamic and can be set to change the present active instance as well as future database restarts. A parameter set to DEFERRED is also dynamic, but changes only affect subsequent sessions, currently active sessions will not be affected and retain the old parameter value.