log_buffer调整认识

1.log_buffer是可以在线调整的

2.也可以去启动文件里修改(spfile或pfile),然后重启下生效 

3.10g版本后只要你是sga自动管理,设置了也没用

--sga_target是动态参数,可以调整后马上生效的
--但是前提是当前分配的sga_max_size下必须能够承载分配的内存量
--这个参数的值只有0和非零两种选择,非零时时和sga_max_size大小保持一致的
--所以如果要吧sga_target改成大于sga_max_size的值就必须按照静态参数的改法,重新启动实例
--重启后默认的sga_max_size会自动调整到和sga_target一样大小的

今天在测试机上试着修改log_buffer参数,发现log_buffer参数值单位不能是K M G,而只能是整数,同时scope不能指定为both,验证过程如下:
1.查看当前的参数值
SQL> show parameters log_buffer;
NAME                                 TYPE
------------------------------------ ----------------------
VALUE
------------------------------
log_buffer                           integer
7024640
2.scope不能指定为both
SQL> ALTER SYSTEM SET log_buffer = 65536 scope=both;
ALTER SYSTEM SET log_buffer = 65536 scope=both
                 *
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified
 
3.单位不能是K,M,G
SQL> ALTER SYSTEM SET log_buffer = 32m scope=spfile;
ALTER SYSTEM SET log_buffer = 32m scope=spfile
                 *
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified
SQL> ALTER SYSTEM SET log_buffer = 32k scope=spfile;
ALTER SYSTEM SET log_buffer = 32k scope=spfile
                 *
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified

SQL> ALTER SYSTEM SET log_buffer = 32g scope=spfile;
ALTER SYSTEM SET log_buffer = 32g scope=spfile
                 *
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified
 
4.不用指定单位,直接就是bytes
SQL> ALTER SYSTEM SET log_buffer = 65536 scope=spfile;
System altered.

5.恢复初始值.
SQL> ALTER SYSTEM SET log_buffer = 7024640 scope=spfile;
System altered.
 
-- The End --

你可能感兴趣的:(数据库笨鸟日记)