Data guard archive GAP 故障處理案例
1、主庫伺服器日誌報錯如下:
Thu Jun 17 10:47:30 2010
Error 12541 received logging on to the standby
Check whether the listener is up and running.
Thu Jun 17 10:48:30 2010
Error 12541 received logging on to the standby
Check whether the listener is up and running.
Thu Jun 17 10:49:31 2010
Error 12541 received logging on to the standby
Check whether the listener is up and running.
查詢Oracle alertlog 日誌,發現故障發生時間的日誌資訊:
Mon Jun 14 11:03:39 2010
Thread 1 advanced to log sequence 154816
Current log# 8 seq# 154816 mem# 0: /oradata/boss/redo08.log
Mon Jun 14 11:20:52 2010
Thread 1 advanced to log sequence 154817
Current log# 9 seq# 154817 mem# 0: /oradata/boss/redo09.log
Mon Jun 14 11:44:53 2010
ARC0: Attempting destination LOG_ARCHIVE_DEST_2 network reconnect (3135)
[@more@]ARC0: Destination LOG_ARCHIVE_DEST_2 network reconnect abandoned
PING[ARC0]: Error 3135 when pinging standby standby.
Mon Jun 14 11:44:53 2010
ARC0: Attempting destination LOG_ARCHIVE_DEST_2 network reconnect (3135)
ARC0: Destination LOG_ARCHIVE_DEST_2 network reconnect abandoned
PING[ARC0]: Error 3135 when pinging standby standby.
Mon Jun 14 11:45:53 2010
ARC0: Attempting destination LOG_ARCHIVE_DEST_2 network reconnect (1041)
ARC0: Destination LOG_ARCHIVE_DEST_2 network reconnect abandoned
PING[ARC0]: Error 1041 when pinging standby standby.
Mon Jun 14 11:46:53 2010
ARC0: Attempting destination LOG_ARCHIVE_DEST_2 network reconnect (1041)
ARC0: Destination LOG_ARCHIVE_DEST_2 network reconnect abandoned
PING[ARC0]: Error 1041 when pinging standby standby.
Mon Jun 14 11:46:59 2010
Thread 1 advanced to log sequence 154818
Current log# 6 seq# 154818 mem# 0: /oradata/boss/redo06.log
Mon Jun 14 11:50:49 2010
Error 12170 received logging on to the standby
Mon Jun 14 11:50:49 2010
Errors in file /oracle/admin/boss/bdump/boss_arc0_13050.trc:
ORA-12170: TNS:Connect timeout occurred
FAL[server, ARC0]: Error 12170 creating remote archivelog file 'standby'
FAL[server, ARC0]: FAL archive failed, see trace file.
Mon Jun 14 11:50:49 2010
Errors in file /oracle/admin/boss/bdump/boss_arc0_13050.trc:
ORA-16055: FAL request rejected
ARCH: FAL archive failed. Archiver continuing
Mon Jun 14 11:50:49 2010
ORACLE Instance boss - Archival Error. Archiver continuing.
Mon Jun 14 11:55:33 2010
Error 12170 received logging on to the standby
Mon Jun 14 11:55:33 2010
Errors in file /oracle/admin/boss/bdump/boss_arc0_13050.trc:
ORA-12170: TNS:Connect timeout occurred
PING[ARC0]: Heartbeat failed to connect to standby 'standby'. Error is 12170.
Mon Jun 14 12:00:18 2010
Error 12170 received logging on to the standby
檢視主庫上的archived log 檔案所在目錄,發現檔案1_154816_657664567.dbf還在
對未傳送過去的所有archived log 檔案進行壓縮:
tar -cvf archive14_17.tar /backup/archlog
將檔案傳輸到備用伺服器:
將archive14_17.tar透過ftp下載到備庫,在備庫透過FTP方式登入到主庫:
ftp 192.168.1.5
get archive14_17.tar
解壓archive14_17.tar
tar –xvf archive14_17.tar
GAP處理 :
- 在備庫檢查是否有日誌缺失
SQL> select * from V$ARCHIVE_GAP;
- 在備庫上手工註冊上一步中從主庫複製來的日誌(要求備庫在mount狀態)
SQL>ALTER DATABASE REGISTER LOGFILE'/backup/archlog14_17/1_154816_657664567.dbf';
SQL>ALTER DATABASE REGISTER LOGFILE'/backup/archlog14_17/1_154817_657664567.dbf';
SQL>ALTER DATABASE REGISTER LOGFILE'/backup/archlog14_17/1_154818_657664567.dbf';
SQL>ALTER DATABASE REGISTER LOGFILE'/backup/archlog14_17/1_154819_657664567.dbf';
SQL>ALTER DATABASE REGISTER LOGFILE'/backup/archlog14_17/1_154820_657664567.dbf';
…
按照以上語句一個一個註冊完即可;
另外,除了以上的一個一個註冊方式外,Oracle提供了另外一種自動註冊方式,該方式中將從主庫拷過來的以上歸檔日誌移到LOG_ARCHIVE_DEST_2 後執行如下語句(要求備庫在mount狀態):
SQL> ALTER DATABASE RECOVER AUTOMATIC STANDBY DATABASE;
當該語句執行完畢之後重新登入SQL*plus後執行了如下語句:
$sqlplus “/as sysdba”
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
如下是像是原文解釋:
$sqlplus “/as sysdba”
SQL>startup mount
To apply the archived redo log files in the archive gap
Start up and mount the standby database (if it is not already mounted). For example, enter:
SQL> STARTUP MOUNT PFILE=/oracle/admin/pfile/initSTBY.ora
Recover the database using the AUTOMATIC option:
SQL> ALTER DATABASE RECOVER AUTOMATIC STANDBY DATABASE;
The AUTOMATIC option automatically generates the name of the next archived redo log file needed to continue the recovery operation.
After recovering the available log files, the Oracle database prompts for the name of a log file that does not exist. For example, you might see:
ORA-00308: cannot open archived log '/oracle/standby/standby_logs/arcr_1_540.arc'
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3
Specify log: {
Cancel recovery after the Oracle database applies the available log files by typing CTRL/C:
SQL>
Media recovery cancelled.
本人操作時,沒有出現以上提示,而直接推出了SQL Plus,當 時在alert log 中提示如下:
Thu Jun 17 16:43:09 2010
*************************************************************
Warning: Recovery session ended without issuing ALTER DATABASE RECOVER CANCEL
*************************************************************
The following error messages are acceptable after recovery cancellation and do not indicate a problem:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: 'some_filename'
ORA-01112: media recovery not started
After you finish manually applying the missing log file, you can restart log apply services on the standby database, as follows:
重新登入後執行了如下語句:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/18841027/viewspace-1055141/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 9 Oracle Data Guard 故障診斷Oracle
- Oracle 19C Data Guard基礎運維-05Failovers (GAP)Oracle運維AI
- DATAGUARD中手工處理日誌GAP
- 【故障處理】佇列等待之enq: US - contention案例佇列ENQ
- 故障處理】佇列等待之enq: US - contention案例佇列ENQ
- 【故障處理】ORA-600:[13013],[5001]故障處理
- OracleDG資料庫gap處理一列Oracle資料庫
- 需要了解的Data Guard理論知識(一)
- 需要了解的Data Guard理論知識(二)
- 需要了解的Data Guard理論知識(三)
- linux故障處理Linux
- Flashback Data Archive原理詳解Hive
- 故障分析 | Greenplum Segment 故障處理
- Oracle Data Guard Broker元件Oracle元件
- Oracle Data Guard簡介Oracle
- 單機搭建Data Guard
- GPON網路故障如何處理?GPON網路故障處理流程
- 【FLASHBACK】Oracle flashback data archive 介紹OracleHive
- bd_ticket_guard_client_dataclient
- Oracle Data Guard和Broker概述Oracle
- 【DG】Data Guard搭建(physical standby)
- 1 關於 Oracle Data GuardOracle
- 2 Oracle Data Guard 安裝Oracle
- 1 Oracle Data Guard Broker 概念Oracle
- 使用Data Guard Broker進行Data Guard物理備用庫配置(Oracle 19c)Oracle
- Oracle更新Opatch故障處理Oracle
- teams登入故障處理
- 微服務的故障處理微服務
- MySQL show processlist故障處理MySql
- Bd-Ticket-Guard-Client-Data逆向client
- 8 Oracle Data Guard Broker 屬性Oracle
- 線上故障處理手冊
- 影像處理案例03
- oracle 11g data guard維護Oracle
- 4.1.6 Oracle Restart 與 Oracle Data Guard 整合OracleREST
- 【DATAGUARD】Oracle19c Data Guard BrokerOracle
- 2 開始實用 Oracle Data GuardOracle
- 19 Oracle Data Guard 相關檢視Oracle
- GaussDB(分散式)例項故障處理分散式