✅ 시나리오
Primary에서 트랜잭션 발생 → Redo 전송 → Standby에서 APPLY → 조회로 반영 확인
0️⃣ 전제 조건 (지금 상태)
- Standby: READ ONLY + APPLY
- v$managed_standby에 MRP0, APPLYING_LOG 또는 WAIT_FOR_LOG 보이는 상태
1️⃣ Primary에서 테스트용 트랜잭션 생성
Primary 접속
sqlplus / as sysdba
테스트 테이블 생성
create table dg_test (id number, msg varchar2(100), created date);
데이터 INSERT
insert into dg_test values (1, 'PRIMARY INSERT TEST', sysdate);
commit;
👉 commit이 중요
(commit 해야 redo가 생성되고 전송됨)
2️⃣ Primary에서 redo 발생 확인 (선택)
select sequence#, status from v$log;
3️⃣ Standby에서 APPLY 상태 확인
Standby에서:
select process, status from v$managed_standby;
정상 예:
MRP0 APPLYING_LOG
또는
MRP0 WAIT_FOR_LOG
4️⃣ Standby에서 데이터 반영 확인 ⭐ (핵심)
Standby 접속
sqlplus / as sysdba
조회
select * from dg_test;
정상 결과:
ID MSG CREATED
-- ------------------- ----------------
1 PRIMARY INSERT TEST 2025-12-24 ...
👉 이게 보이면 Data Guard 완전 정상
5️⃣지금 진짜로 “전송이 되는지” 바로 확인하는 방법
1)
Primary에서 로그를 강제로 하나 생성/전환
Primary에서:
alter system archive log current;
(또는 트랜잭션 commit 후 실행해도 됨)
Standby에서 “받았는지/적용했는지” 확인
Standby에서:
select max(sequence#) as last_received from v$archived_log;
select max(sequence#) as last_applied from v$archived_log where applied='YES';
- last_received가 올라가면 → 전송 OK
- last_applied까지 따라오면 → APPLY OK
2)
“APPLY가 실제로 되고 있는지” 수치로 확인
Standby에서:
select sequence#, applied from v$archived_log order by sequence# desc;
최근 로그들이:
SEQUENCE# APPLIED
---------- ---------
17 YES
16 YES
15 YES
14 YES
13 YES
12 YES
11 YES
면 완벽.
'🗄️ DB_이야기 > # 🛢️ Oracle' 카테고리의 다른 글
| [Oracle] Data Guard Duplicate 재구성 (0) | 2025.12.30 |
|---|---|
| [Oracle] ORA-16698: member has a LOG_ARCHIVE_DEST_n parameter with SERVICE attribute set Failed. (0) | 2025.12.30 |
| [Oracle] Oracle Data Guard 설치(3) (0) | 2025.12.24 |
| [Oracle] Oracle Data Guard 설치(2) (0) | 2025.12.22 |
| [Oracle] Silent 설치 시 [WARNING] [INS-08101] Unexpected error while executing the action at state: 'supportedOSCheck' (0) | 2025.12.22 |