修改rac环境下的 archive log dest

今天需要修改下rac环境下的 archive log dest ,

 

v240-29:/opt/oracle # sqlplus '/as sysdba'

 

SQL*Plus: Release 11.1.0.6.0 - Production on Tue Dec 21 15:39:18 2010

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production

With the Partitioning, Real Application Clusters, OLAP, Data Mining

and Real Application Testing options

 

SQL> archive log list ;

Database log mode              Archive Mode

Automatic archival             Enabled

Archive destination            /oracle/archivelog

Oldest online log sequence     44

Next log sequence to archive   45

Current log sequence           45

SQL> alter system set log_archive_dest='/vol0' ;

alter system set log_archive_dest='/vol0'

*

ERROR at line 1:

ORA-02097: parameter cannot be modified because specified value is invalid

ORA-16018: cannot use LOG_ARCHIVE_DEST with LOG_ARCHIVE_DEST_n or

DB_RECOVERY_FILE_DEST

 

报错,google之,看到一篇很不错的文档。

http://blog.csdn.net/tianlesoftware/archive/2010/08/02/5782655.aspx

先看下环境变量吧,

SQL> show parameter log_archive;

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

log_archive_config                   string

log_archive_dest                     string

log_archive_dest_1                   string      LOCATION=/oracle/archivelog

log_archive_dest_10                  string

log_archive_dest_2                   string

log_archive_dest_3                   string

log_archive_dest_4                   string

log_archive_dest_5                   string

log_archive_dest_6                   string

log_archive_dest_7                   string

log_archive_dest_8                   string

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

log_archive_dest_9                   string

log_archive_dest_state_1             string      enable

log_archive_dest_state_10            string      enable

log_archive_dest_state_2             string      enable

log_archive_dest_state_3             string      enable

log_archive_dest_state_4             string      enable

log_archive_dest_state_5             string      enable

log_archive_dest_state_6             string      enable

log_archive_dest_state_7             string      enable

log_archive_dest_state_8             string      enable

log_archive_dest_state_9             string      enable

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

log_archive_duplex_dest              string

log_archive_format                   string      %t_%s_%r.arc

log_archive_local_first              boolean     TRUE

log_archive_max_processes            integer     4

log_archive_min_succeed_dest         integer     1

log_archive_start                    boolean     FALSE

log_archive_trace                    integer     0

 

先删掉log_archive_dest_1 ;

SQL> alter system set log_archive_dest_1='';

System altered.

验证下

SQL> archive log list;

Database log mode              Archive Mode

Automatic archival             Enabled

Archive destination            ?/dbs/arch

Oldest online log sequence     44

Next log sequence to archive   45

Current log sequence           45

看来删掉后系统会马上启用默认的本地 archive_log_dest,

现在可以修改了,

 

SQL> alter system set log_archive_dest='/vol0' ;

System altered.

 

验证下

SQL> archive log list;

Database log mode              Archive Mode

Automatic archival             Enabled

Archive destination            /vol0

Oldest online log sequence     44

Next log sequence to archive   45

Current log sequence         45

 

发现rac环境里修改dest, alter system set log_archive_dest 不加” instance=* “ 也是对所有的instance 生效的。

 

v240-28:/opt/oracle # sqlplus '/as sysdba'

SQL*Plus: Release 11.1.0.6.0 - Production on Tue Dec 21 15:56:25 2010

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production

With the Partitioning, Real Application Clusters, OLAP, Data Mining

and Real Application Testing options

 

SQL> archive log list ;

Database log mode              Archive Mode

Automatic archival             Enabled

Archive destination            /vol0

Oldest online log sequence     48

Next log sequence to archive   49

Current log sequence           49

作者: wangyl1977   发布时间: 2010-12-21