RAC+单实例场景下 DG主备切换,报ORA-01577

 

SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY
*
ERROR at line 1:

ORA-01577: cannot add log file '/u01/app/oracle/oradata/orcl/group_1.257.1010584013' - file already part of database

主库下:

select  member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
+DATA/orcl/onlinelog/group_1.257.1010584013
+FRA/orcl/onlinelog/group_1.257.1010584013

log_file_name_convert='+DATA/orcl/onlinelog/','/u01/app/oracle/oradata/orcl/','+FRA/orcl/onlinelog/','/u01/app/oracle/oradata/orcl/'

ADG端是本地文件系统,导致同文件同目录只有一份。

select  member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/orcl/group_1.257.1010584013
/u01/app/oracle/oradata/orcl/group_1.257.1010584013

主库制定了闪回区,备库没有指定。

1、第一种方式:SQL> ALTER DATABASE DROP LOGFILE MEMBER '/u01/app/oracle/oradata/orcl/group_1.257.1010584013' ;

2、第二种方式 :SQL>ALTER DATABASE RENAME FILE '/u01/app/oracle/oradata/orcl/group_1.257.1010584013'  TO '/u01/fast_recovery_area/group_1.257.1010584013' ;

将主库的*.log_file_name_convert='+DATA/orcl/onlinelog/','/u01/app/oracle/oradata/orcl/','+FRA/orcl/onlinelog/','/u01/app/oracle/oradata/orcl/'改为

*.log_file_name_convert='+DATA/orcl/onlinelog/','/u01/app/oracle/oradata/orcl/','+FRA/orcl/onlinelog/','/u01/fast_recovery_area/'

然后:ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;

 

posted on 2019-06-12 21:07  HelonTian  阅读(634)  评论(0编辑  收藏  举报