041_DG_Check
1 檢查 Process
1 STANDBY PROCESS 一定要是 APPLYING_LOG
SQL>
SQL>
SELECT PROCESS,STATUS,CLIENT_PROCESS,SEQUENCE#, BLOCK#,BLOCKS FROM V$MANAGED_STANDBY;
PROCESS STATUS CLIENT_P SEQUENCE# BLOCK# BLOCKS
--------- ------------ -------- ---------- ---------- ----------
ARCH CONNECTED ARCH 0 0 0
ARCH CONNECTED ARCH 0 0 0
ARCH CONNECTED ARCH 0 0 0
ARCH CLOSING ARCH 54 28672 1262
MRP0 APPLYING_LOG N/A 55 567 102400
RFS IDLE ARCH 0 0 0
RFS IDLE LGWR 55 567 1
RFS IDLE UNKNOWN 0 0 0
8 rows selected.
Database altered.
SQL>
不是的話
===============================================================================================
沒有MRP0的話
執行
# 啟動APPLY
SQL>
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
SQL> SELECT PROCESS,STATUS,CLIENT_PROCESS,SEQUENCE#, BLOCK#,BLOCKS FROM V$MANAGED_STANDBY;
PROCESS STATUS CLIENT_P SEQUENCE# BLOCK# BLOCKS
--------- ------------ -------- ---------- ---------- ----------
ARCH CONNECTED ARCH 0 0 0
ARCH CONNECTED ARCH 0 0 0
ARCH CONNECTED ARCH 0 0 0
ARCH CONNECTED ARCH 0 0 0
MRP0 WAIT_FOR_LOG N/A 55 0 0
就是有排掉LOG 要補檔
2 PROD PROCESS 一定要是 WRITING
SQL>
SQL>
SELECT PROCESS,STATUS,CLIENT_PROCESS,SEQUENCE#, BLOCK#,BLOCKS FROM V$MANAGED_STANDBY;
PROCESS STATUS CLIENT_P SEQUENCE# BLOCK# BLOCKS
--------- ------------ -------- ---------- ---------- ----------
ARCH CLOSING ARCH 53 1 3036
ARCH CLOSING ARCH 54 28672 1262
ARCH CONNECTED ARCH 0 0 0
ARCH CLOSING ARCH 54 2 29932
LNS WRITING LNS 55 3846 1
SQL>
不是的話
===============================================================================================
沒有LNS 的話
執行
#
SQL>
alter system set log_archive_dest_state_2=enable ;
2 檢查 傳送是否正常,是否新增
4.3 open database
SQL>
SELECT ARCH.THREAD# "Thread", ARCH.SEQUENCE# "Last Sequence Received",
APPL.SEQUENCE# "Last Sequence Applied", (ARCH.SEQUENCE# - APPL.SEQUENCE#)
"Difference"
FROM (SELECT THREAD# ,SEQUENCE# FROM V$ARCHIVED_LOG WHERE
(THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME)
FROM V$ARCHIVED_LOG GROUP BY THREAD#)) ARCH,
(SELECT THREAD# ,SEQUENCE# FROM V$LOG_HISTORY WHERE (THREAD#,FIRST_TIME )
IN (SELECT THREAD#,MAX(FIRST_TIME)
FROM V$LOG_HISTORY GROUP BY THREAD#)) APPL
WHERE ARCH.THREAD# = APPL.THREAD# ORDER BY 1;
aletr log 會產生以下的訊息
Completed: ALTER DATABASE OPEN
SELECT DEST_NAME,STATUS,TYPE,RECOVERY_MODE,GAP_STATUS FROM V$ARCHIVE_DEST_STATUS WHERE DEST_ID=2;
沒有留言:
張貼留言