您好,登錄后才能下訂單哦!
查看數據庫可進行的角色轉換
1. $sqlplus / as sysdba
2. SQL> select switchover_status from gv$database;
查詢主備庫同步情況
3. select unique thread# as thread,max(sequence#) over(partition by thread#) as last from gv$archived_log;
4. select thread# ,low_sequence#,high_sequence# from gv$archive_gap;
將主庫切換為備庫
5. alter database commit to switchover to physical standby with session shutdown ;
6. select switchover_status from gv$database;
將備庫切換為主庫
7. select open_mode from gv$database;
8. select switchover_status from gv$database;
9. select unique thread# as thread,max(sequence#) over(partition by thread#) as last from gv$archived_log;
10 $ srvctl stop instance –i ebiz2 –d ebizsh
11.SQL> alter database commit to switchover to primary with
session shutdown ;
12. alter database open;
13. $ srvctl start instance –i ebiz2 –d ebizsh
原主庫轉備庫后開始應用日志
14. SQL> alter database recover managed standby database using current logfile disconnect from session;
15. $ srvctl start instance -d ebiz -i ebiz2
16. SQL> select open_mode from gv$database;
(7) Oracle登錄數據庫服務器,原同城備庫需要在黑龍江和上海主備切換后重新啟動日志應用
17. SQL> alter database recover managed standby database
using current logfile disconnect from session;
18. SQL> select status from v$managed_standby where
process like 'MRP%';
只啟動數據庫節點1實例
19. $ srvctl start instance –i ebiz1 –d ebiz
20. $ srvctl stop instance –i ebiz2 –d ebiz
繼續進行redo apply
21. SQL> alter database recover managed standby database
using current logfile disconnect;
直至日志同步完畢,SCN號不變,同時檢查 gv$archived_log視圖,序列號達到源端最大值
22. SQL> select current_scn from gv$database;
23. SQL>select unique thread# as thread,max(sequence#)
over(partition by thread#) as last from gv$archived_log;
24. $asmcmd
25. Cp +DATA_DG/ebiz/archivelog/YYYYMMDD/XXXX
/rman/backup/ --拷貝至文件系統
ftp或scp至上海
注冊歸檔日志文件
26. SQL > ALTER DATABASE REGISTER PHYSICAL LOGFILE
'XXXX';
27. Database altered.
然后進行redo apply
28. SQL> alter database recover managed standby database using current logfile disconnect;
29. SQL> alter database commit to switchover to primary with
session shutdown ;
30. SQL> alter database open; SQL> select open_mode from
gv$database;
31. SQL> select switchover_status from gv$database;
32. $ srvctl start instance –i ebiz2 –d ebizsh
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。