[原]记一次调整Oracle参数的小失误

新装一个Oracle 11g数据库,今天调整了一下参数,出了点小意外,特此记录,警示自己,其实操作很简单,只是简单地改一下archivelog的名字格式,顺便将数据库打开 flashback 和 archivelog 模式,以下是我的操作:

sys@logdw(10.163) SQL> alter system set log_archive_format='archivelog_%t_%s_r.arc' scope=spfile;
System altered.
sys@logdw(10.163) SQL> shutdown immediate ;
......
......
......
sys@logdw(10.163) SQL> startup ;
ORA-19905: log_archive_format must contain %s, %t and %r
### archivelog_%t_%s_r.arc ..
 SQL> startup nomount;
ORA-19905: log_archive_format must contain %s, %t and %r

 SQL> create pfile from spfile ;
[oracle@logserver dbs]$ echo $ORACLE_HOME
/u01/app/oracle/11gr2
[oracle@logserver dbs]$ cd $ORACLE_HOME/dbs
[oracle@logserver dbs]$ ls -lth
total 24K
-rw-r--r--  1 oracle oinstall 1.1K Dec 15 14:00 initlogdw.ora
-rw-r-----  1 oracle oinstall 3.5K Dec 15 13:57 spfilelogdw.ora
-rw-r-----  1 oracle oinstall 1.5K Nov 25 22:11 orapwlogdw
-rw-r-----  1 oracle oinstall   24 Nov 25 22:06 lkLOGDW
-rw-rw----  1 oracle oinstall 1.6K Nov 25 22:05 hc_logdw.dat
-rw-r--r--  1 oracle oinstall 2.8K May 15  2009 init.ora
[oracle@logserver dbs]$ vim initlogdw.ora 

### 将     *.log_archive_format='archivelog_%t_%s_r.arc'
### 修改成 *.log_archive_format='archivelog_%t_%s_%r.arc'

 SQL> create spfile from pfile='/u01/app/oracle/11gr2/dbs/initlogdw.ora'  ; 

File created.

Elapsed: 00:00:00.04

 SQL> startup ;
ORACLE instance started.

Total System Global Area 1887350784 bytes
Fixed Size                  2214456 bytes
Variable Size            1426064840 bytes
Database Buffers          436207616 bytes
Redo Buffers               22863872 bytes
Database mounted.
Database opened.

有技术还不够,还得细心!!

posted @ 2009-12-15 14:48  killkill  阅读(648)  评论(0编辑  收藏  举报