DG修復:異常關庫導致的資料庫啟動失敗ORA-01110及GAP修復

我愛睡蓮發表於2021-12-24
問題描述:正在應用的備庫是一套11.2.0.4的rac環境,但是被直接crsctl stop cluster叢集強制關庫,重新啟動之後導致資料庫啟動失敗,報錯
Errors in file /u01/app/oracle/diag/rdbms/racdg/racdg1/trace/racdg1_ora_4339.trc:
ORA-10458: standby database requires recovery
ORA-01196: file 1 is inconsistent due to a failed media recovery session
ORA-01110: data file 1: '+DATA/racdg/datafile/system.330.1090392901'
ORA-10458 signalled during: ALTER DATABASE OPEN...

1.資料庫關閉之後啟動失敗

 

 

 

2.提示備庫需要恢復,在mount狀態進行recover,檢視此時備庫的狀態,有延時。mrp在應用1310401號歸檔

SQL> shutdown immediate;
SQL> startup mount;
SQL> recover managed standby database using current logfile disconnect from session;
--檢視程式狀態
select process, status, thread#,sequence#, block#, blocks from v$managed_standby;

--檢視延時資訊
set linesize 300 
col name for a20 
col value for a20 
col time_computed for a30 
select name,value,unit,time_computed from v$dataguard_stats where name in ('transport lag','apply lag');

 

 

 

 

3.但是發現延時一直還在增加,mrp還在應用1310401歸檔,沒有用,檢視主備庫的日誌檔案輸出,也沒有報錯資訊。檢視此時主備庫狀態資訊

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

 

備庫

 

 

 

主庫

 

 

 

4.主庫提示有GAP,所以就檢視主備庫之間的歸檔差哪些,需要手動傳輸就手動傳輸。首先使用命令查詢缺失的歸檔

--檢視異常歸檔
select * from v$archive_gap;

 

 

 

但是這條命令執行失敗,換條命令在備庫中查詢,查詢結果多大一百多條記錄,歸檔確實較多

select name,sequence#,creator,archived,applied from v$archived_log where  order by FIRST_TIME ;
select name,sequence#,creator,archived,applied from v$archived_log where  APPLIED='NO' order by FIRST_TIME ;

 

5.檢視1310401號歸檔的是否存在

 

 

 歸檔路徑中只有到1310400號歸檔,而此時mrp確實是在等待1310401號歸檔,所以需要手動傳輸到備庫中

 

 

6.手動重傳缺失的歸檔到備庫中。

主庫是RAC,但是歸檔檔案放在檔案系統中;備庫也是RAC,歸檔放在asm磁碟中。傳輸檔案過程比較麻煩,此時同步的是thread2的歸檔,也就是需要去節點二的歸檔路徑下去傳輸操作

 

主庫傳輸所需要的歸檔

[root@node2 archivelog]# scp archive_2_13104* root@192.168.251.7:/home/grid/arch
[root@node2 archivelog]# scp archive_2_13105* root@192.168.251.7:/home/grid/arch

 

 

 

7.備庫將歸檔檔案傳輸到asm磁碟中,最好進入到需要傳輸檔案的路徑下去傳輸檔案。

[grid@zjw-rac1 ~]$ cd arch/
[grid@zjw-rac1 arch]$ 

ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310401_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310402_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310403_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310404_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310405_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310406_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310407_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310408_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310409_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310410_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310411_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310412_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310413_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310414_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310415_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310416_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310417_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310418_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310419_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310420_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310421_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310422_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310423_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310424_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310425_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310426_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310427_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310428_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310429_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310430_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310431_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310432_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310433_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310434_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310435_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310436_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310437_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310438_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310439_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310440_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310441_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310442_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310443_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310444_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310445_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310446_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310447_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310448_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310449_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310450_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310451_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310452_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310453_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310454_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310455_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310456_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310457_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310458_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310459_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310460_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310461_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310462_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310463_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310464_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310465_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310466_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310467_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310468_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310469_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310470_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310471_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310472_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310473_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310474_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310475_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310476_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310477_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310478_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310479_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310480_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310481_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310482_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310483_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310484_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310485_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310486_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310487_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310488_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310489_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310490_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310491_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310492_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310493_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310494_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310495_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310496_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310497_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310498_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310499_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310500_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310501_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310502_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310503_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310504_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310505_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310506_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310507_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310508_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310509_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310510_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310511_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310512_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310513_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310514_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310515_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310516_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310517_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310518_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310519_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310520_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310521_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310522_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310523_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310524_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310525_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310526_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310527_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310528_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310529_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310530_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310531_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310532_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310533_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310534_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310535_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310536_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310537_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310538_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310539_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310540_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310541_975591944.log +fra/racdg/archivelog/2021_12_24/
ASMCMD [+fra/racdg/archivelog/2021_12_24] > cp /home/grid/arch/archive_2_1310542_975591944.log +fra/racdg/archivelog/2021_12_24/

 

8.在資料庫中註冊傳輸過來的歸檔檔案

alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310402_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310403_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310404_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310405_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310406_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310407_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310408_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310409_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310410_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310411_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310412_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310413_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310414_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310415_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310416_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310417_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310418_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310419_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310420_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310421_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310422_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310423_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310424_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310425_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310426_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310427_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310428_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310429_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310430_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310431_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310432_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310433_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310434_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310435_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310436_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310437_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310438_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310439_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310440_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310441_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310442_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310443_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310444_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310445_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310446_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310447_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310448_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310449_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310450_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310451_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310452_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310453_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310454_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310455_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310456_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310457_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310458_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310459_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310460_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310461_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310462_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310463_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310464_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310465_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310466_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310467_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310468_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310469_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310470_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310471_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310472_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310473_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310474_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310475_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310476_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310477_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310478_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310479_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310480_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310481_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310482_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310483_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310484_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310485_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310486_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310487_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310488_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310489_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310490_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310491_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310492_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310493_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310494_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310495_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310496_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310497_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310498_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310499_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310500_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310501_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310502_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310503_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310504_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310505_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310506_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310507_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310508_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310509_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310510_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310511_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310512_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310513_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310514_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310515_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310516_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310517_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310518_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310519_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310520_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310521_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310522_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310523_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310524_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310525_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310526_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310527_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310528_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310529_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310530_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310531_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310532_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310533_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310534_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310535_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310536_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310537_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310538_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310539_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310540_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310541_975591944.log';
alter database register logfile '+fra/racdg/archivelog/2021_12_24/archive_2_1310542_975591944.log';

 

 

 

 

過程中的日誌變化

 

 

 

 

 9.開啟資料庫

SQL> alter database recover managed standby database cancel;

Database altered.

SQL> alter database open;

Database altered.

SQL>  
SQL> alter database recover  managed standby database using current logfile disconnect from session;

Database altered.

 

 

 

10.開啟資料庫發現歸檔不會自動傳輸,檢視主庫此時alert日誌,還是跟密碼檔案有關

------------------------------------------------------------
Fri Dec 24 20:05:18 2021
Immediate Kill Session#: 3809, Serial#: 25361
Immediate Kill Session: sess: 0x4042b45680  OS pid: 55698
Immediate Kill Session#: 4298, Serial#: 13353
Immediate Kill Session: sess: 0x4042c182e0  OS pid: 1181
Fri Dec 24 20:05:47 2021
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE, 
and that the SYS password is same in the password files.
      returning error ORA-16191
------------------------------------------------------------
Fri Dec 24 20:06:48 2021
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE, 
and that the SYS password is same in the password files.
      returning error ORA-16191
------------------------------------------------------------

 

 

 

 11.再傳輸節點一的密碼檔案到節點二和備庫的節點一和節點二,重新實時應用

SQL> alter database recover managed standby database cancel;

Database altered.

SQL>  
SQL> 
SQL> alter database recover  managed standby database using current logfile disconnect from session;

Database altered.

--檢視備庫的同步狀態
SQL> select process, status, thread#,sequence#, block#, blocks from v$managed_standby;

PROCESS   STATUS      THREAD#  SEQUENCE#     BLOCK#     BLOCKS
--------- ------------ ---------- ---------- ---------- ----------
ARCH      CLOSING        1    1386815      32768       1440
ARCH      CLOSING        1    1386816      32768       1384
ARCH      CONNECTED        0       0          0      0
ARCH      CLOSING        1    1386818      32768       1503
ARCH      CLOSING        2    1310544      28672       1978
RFS      IDLE            0       0          0      0
RFS      IDLE            0       0          0      0
RFS      IDLE            0       0          0      0
RFS      IDLE            0       0          0      0
RFS      IDLE            1    1386819      32659      1
MRP0      APPLYING_LOG        1    1386819      32657     102400

PROCESS   STATUS      THREAD#  SEQUENCE#     BLOCK#     BLOCKS
--------- ------------ ---------- ---------- ---------- ----------
RFS      IDLE            0       0          0      0
RFS      IDLE            0       0          0      0
RFS      IDLE            0       0          0      0
RFS      IDLE            2    1310545      16917      7
RFS      IDLE            0       0          0      0

16 rows selected.

SQL> select open_mode,protection_mode,database_role,switchover_status from v$database;

OPEN_MODE         PROTECTION_MODE      DATABASE_ROLE    SWITCHOVER_STATUS
-------------------- -------------------- ---------------- --------------------
READ ONLY WITH APPLY MAXIMUM PERFORMANCE  PHYSICAL STANDBY NOT ALLOWED

 

--檢視主庫的狀態
SQL> select open_mode,protection_mode,database_role,switchover_status from v$database;

OPEN_MODE         PROTECTION_MODE      DATABASE_ROLE    SWITCHOVER_STATUS
-------------------- -------------------- ---------------- --------------------
READ WRITE         MAXIMUM PERFORMANCE  PRIMARY       SESSIONS ACTIVE

 

12.到此GAP修復完成,可以在主庫多切換幾次歸檔測試同步效果

 

 

相關文章