一拖二ADG数据库拆除其中一个复制关系

一、备库一操作

1、检查

select name,open_mode,switchover_status,database_role from v$database;

select group#,thread#,status from v$standby_log;

select thread#,sequence#,first_time,next_time,applied from v$archived_log where thread#=1 order by 4;

select thread#,sequence#,first_time,next_time,applied from v$archived_log where thread#=2 order by 4;

2、操作

create pfile='/home/oracle/pfile.ora' from spfile;

alter system set log_archive_config='';

alter system set log_archive_dest2='';

alter system set fal_client='';

alter system set fal_server='';

db_file_name_convert和log_file_name_convert 两个参数使用

alter system set db_file_name_convert ='' scope=spfile;

alter system set log_file_name_convert ='' scope=spfile;

这种方式去掉,必须使用修改pfile的方式去掉。

删除日志:

alter database drop logfile group 17 ;

alter database drop logfile group 18 ;

alter database drop logfile group 19 ;

alter database drop logfile group 20 ;

alter database drop logfile group 21 ;

alter database drop logfile group 22 ;

alter database drop logfile group 23 ;

alter database drop logfile group 24 ;

alter database drop logfile group 25 ;

alter database drop logfile group 26 ;

alter database drop logfile group 27 ;

alter database drop logfile group 28 ;

alter database drop logfile group 29 ;

alter database drop logfile group 30 ;

alter database drop logfile group 31 ;

alter database drop logfile group 32 ;

alter database drop logfile group 33 ;

alter database drop logfile group 34 ;

二、主库操作

1、检查

select name,open_mode,switchover_status,database_role from v$database;

select group#,thread#,status from v$standby_log;

select thread#,sequence#,first_time,next_time,applied from v$archived_log where thread#=1 order by 4;

select thread#,sequence#,first_time,next_time,applied from v$archived_log where thread#=2 order by 4;

2、操作

create pfile='/home/oracle/pfile.ora' from spfile;

alter system set log_archive_config='dg_config(telldb,telladg)' sid='*';

alter system set log_archive_dest2='' sid='*'; ---该日志路径是用于第一套备库的远程日志,需拆除

alter system set fal_client='telldb';

alter system set fal_server='telladg';

alter system set db_file_name_convert ='+dgroup/telladg','+dgroup/telldb' scope=spfile sid='*';

alter system set log_file_name_convert ='+dgroup/telladg' ,'+dgroup/telldb' scope=spfile sid='*';

三、第二套备库

1、检查

select name,open_mode,switchover_status,database_role from v$database;

select group#,thread#,status from v$standby_log;

select thread#,sequence#,first_time,next_time,applied from v$archived_log where thread#=1 order by 4;

select thread#,sequence#,first_time,next_time,applied from v$archived_log where thread#=2 order by 4;

2、操作

create pfile='/home/oracle/pfile.ora' from spfile;

alter system set log_archive_config='dg_config(telldb,telladg)' sid='*';

alter system set log_archive_dest3='' sid='*'; ---该日志路径是用于第一套套备库的远程日志,需拆除

alter system set fal_client='telladg';

alter system set fal_server='telldb';

alter system set db_file_name_convert ='+dgroup/telldb','+dgroup/telladg' scope=spfile sid='*';

alter system set log_file_name_convert ='+dgroup/telldb','+dgroup/telladg' scope=spfile sid='*';

————————————————————————————————————————————————————————————

本人主要从事架构优化、系统建设、系统运维等方面的工作,专注于Oracle、Mysql、Redis、PG、OGG等技术和系统建设、运维、优化,欢迎留言或者微信(deadknight9)交流,转载请注明出处。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
THE END
分享
二维码
< <上一篇
下一篇>>