请问oracle 11g怎么设置 log_buffer 参数,我试过下面两种方法不行:1. alter system set log_buffer=3m scope=spfile;2.create pfile from spfile; --> pfile里没有log_buffer参数,是否需要添加 log_buffer=3m然后 startup pfile='xxx'?请指导,多谢
SQL> select * from v$version;BANNER
-------------------------------------------------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for Linux: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - ProductionSQL> show parameter log_bufferNAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
log_buffer integer 39932928
SQL> alter system set log_buffer=3m;
alter system set log_buffer=3m
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified
SQL>
SQL> select * from v$version;BANNER
-------------------------------------------------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for Linux: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - ProductionSQL> show parameter log_bufferNAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
log_buffer integer 39932928
SQL> alter system set log_buffer=3m;
alter system set log_buffer=3m
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified
SQL>
刚在论坛中找到了答案,不添加单位,csope=spfile 就可以。
SQL> alter system set log_buffer=3m;
alter system set log_buffer=3m
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified
SQL> alter system set log_buffer=2899456;
alter system set log_buffer=2899456
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modifiedSQL> alter system set log_buffer=2899456 scope=spfile;System altered.SQL> show parameter log_buffer;NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
log_buffer integer 39932928
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.Total System Global Area 5277921280 bytes
Fixed Size 2144144 bytes
Variable Size 4294969456 bytes
Database Buffers 939524096 bytes
Redo Buffers 41283584 bytes
Database mounted.
Database opened.
SQL>
SQL> show parameter log_bufferNAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
log_buffer integer 2899968
SQL>
必须指定scope=spfile才可以的,
如果不指定scope则默认为scope=both