1. Active Data Guard 해제하기
A) 로그 적용 중지
DGMGRL 에서 standby 로그 적용 중지
EDIT DATABASE [standby 글로벌 DB명] SET STATE=apply-off;
DGMGRL> EDIT DATABASE orcl_stby SET STATE=apply-off; Succeeded. DGMGRL> SHOW DATABASE orcl_stby; Database - orcl_stby Role: PHYSICAL STANDBY Intended State: APPLY-OFF Transport Lag: 0 seconds (computed 1 second ago) Apply Lag: 0 seconds (computed 1 second ago) Average Apply Rate: (unknown) Real Time Query: OFF Instance(s): orcl Database Status: SUCCESS
{}
SQL*Plus 에서 수행할 경우 아래 구문으로 수행합니다.
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
B) Standby 데이터베이스 mount 모드로 재기동
Standby 중지 후 mount 모드로 기동
-- ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL; SHUTDOWN IMMEDIATE; STARTUP NOMOUNT; ALTER DATABASE MOUNT STANDBY DATABASE; ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT; -- ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
SQL> SHUTDOWN IMMEDIATE; Database closed. Database dismounted. ORACLE instance shut down. SQL> STARTUP NOMOUNT; ORACLE instance started. Total System Global Area 1258290744 bytes Fixed Size 8896056 bytes Variable Size 318767104 bytes Database Buffers 922746880 bytes Redo Buffers 7880704 bytes SQL> ALTER DATABASE MOUNT STANDBY DATABASE; Database altered. SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT; Database altered. SQL> SELECT db_unique_name, open_mode, database_role, switchover_status FROM v$database; DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS -------------------- -------------------- -------------------- -------------------- orcl_stby MOUNTED PHYSICAL STANDBY NOT ALLOWED
C) 로그 적용 활성화
DGMGRL 에서 standby 로그 적용 활성화
EDIT DATABASE [standby 글로벌 DB명] SET STATE=apply-on;
DGMGRL> EDIT DATABASE orcl_stby SET STATE=apply-on; Succeeded. DGMGRL> SHOW DATABASE orcl_stby; Database - orcl_stby Role: PHYSICAL STANDBY Intended State: APPLY-ON Transport Lag: 0 seconds (computed 0 seconds ago) Apply Lag: 0 seconds (computed 0 seconds ago) Average Apply Rate: 19.00 KByte/s Real Time Query: OFF Instance(s): orcl Database Status: SUCCESS DGMGRL> SHOW CONFIGURATION; Configuration - dg_orcl Protection Mode: MaxPerformance Members: orcl - Primary database orcl_stby - Physical standby database Fast-Start Failover: Disabled Configuration Status: SUCCESS (status updated 11 seconds ago)
SQL*Plus 에서 수행할 경우 아래 구문으로 수행합니다.
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;