Oracle DataGuard
檢查開啟狀態
-- 請全貼
-- ===check===
select dbid,name from v$database;
select log_mode , OPEN_MODE , DATABASE_ROLE
from v$database;
--DataGuard
select SWITCHOVER_STATUS , PROTECTION_MODE , PROTECTION_LEVEL
from v$database;
-- ===check===
select dbid,name from v$database;
select log_mode , OPEN_MODE , DATABASE_ROLE
from v$database;
--DataGuard
select SWITCHOVER_STATUS , PROTECTION_MODE , PROTECTION_LEVEL
from v$database;
Process 要找 MRP0
SELECT
PROCESS,STATUS,CLIENT_PROCESS,SEQUENCE#, BLOCK#,BLOCKS FROM
V$MANAGED_STANDBY;
LOG APPLY START
ALTER DATABASE RECOVER MANAGED STANDBY
DATABASE USING CURRENT LOGFILE DISCONNECT;
LOG APPLY STOP
ALTER DATABASE RECOVER MANAGED STANDBY
DATABASE CANCEL;
Process
SQL> -- 找 LNS
Select PROCESS,STATUS,CLIENT_PROCESS,SEQUENCE#, BLOCK#,BLOCKS FROM
V$MANAGED_STANDBY;
SQL> -- 傳送狀態
SELECT DEST_NAME,STATUS,TYPE,RECOVERY_MODE,GAP_STATUS
FROM V$ARCHIVE_DEST_STATUS WHERE DEST_ID=2;
SQL> --
log_archive_dest_2
alter system set
log_archive_dest_2='SERVICE=STANDBY compression=disable' scope=both;
SQL> -- # Deffer ENABLE
alter system set log_archive_dest_state_2=defer ;
alter system set log_archive_dest_state_2=enable ;
SQL> --log switch
alter system switch logfile;
Oracle DataGuard Create
1 021_DG_1_ARCHIVELOG_MODE
2 022_DG_2_Backup
3 023_DG_3_restore
4.1 024_DG_41_START_Standby
4.2 024_DG_42_START_Prod
5 025_DG_5_Online
Oracle DataGuard Test
1 031_DG_1_OPENTEST
2 032_DG_2_OPENTEST
沒有留言:
張貼留言