--failover需要注意问题
--archive gap, 归档日志, redo文件都拷贝到备库
select thread#,low_sequence#,high_sequence# from v$archive_gap;
--从asm中拷贝文件到操作系统
cp +DATA/ORCL/DATAFILE/user01.dbf /u01/app/oracle/orcl_01
--从操作系统拷贝文件到asm
cp /u01/app/oracle/orcl_01 +DATA/ORCL/DATAFILE/user01.dbf
--注册dbf到备库
alter database register logile '/u01/app/oracle/orcl_01.dbf';
--注册redo到备库
alter database recover managed standby database cancel;
recover standby database until cancel;
--在此处指定redo路径
/u01/app/oracle/redo01.log
alter database activate standby database;
alter database open;
--查看切换结果
select name,open_mode,database_role,db_unique_name from v$database;
--archive gap, 归档日志, redo文件都拷贝到备库
select thread#,low_sequence#,high_sequence# from v$archive_gap;
--从asm中拷贝文件到操作系统
cp +DATA/ORCL/DATAFILE/user01.dbf /u01/app/oracle/orcl_01
--从操作系统拷贝文件到asm
cp /u01/app/oracle/orcl_01 +DATA/ORCL/DATAFILE/user01.dbf
--注册dbf到备库
alter database register logile '/u01/app/oracle/orcl_01.dbf';
--注册redo到备库
alter database recover managed standby database cancel;
recover standby database until cancel;
--在此处指定redo路径
/u01/app/oracle/redo01.log
alter database activate standby database;
alter database open;
--查看切换结果
select name,open_mode,database_role,db_unique_name from v$database;