DG之物理Standby的failover

2021-06-21 04:01:13 字數 2504 閱讀 9763

1.檢查歸檔檔案是否連續

orclpre:

orclpre_std >startup

oracle instance started.

total system global area  167772160 bytes

fixed size                  1218316 bytes

variable size              75499764 bytes

database buffers           88080384 bytes

redo buffers                2973696 bytes

database mounted.

database opened.

orclpre_std >select thread#,low_sequence#,high_sequence# from v$archive_gap;

no rows selected

若有記錄,把列出的記錄號對應的歸檔轉換到待轉換的standby,不然資料會不一致。並加入資料字典(alter database register physical logfile 'filespecl')

2.檢查歸檔檔案是否完整

orclpre_std >select distinct thread#,max(sequence#) over(partition by thread#) a from v$archived_log;

thread#          a

---------- ----------

1         39

orclpdg:

orclpdg_pri >startup

oracle instance started.

total system global area  167772160 bytes

fixed size                  1218316 bytes

variable size              62916852 bytes

database buffers          100663296 bytes

redo buffers                2973696 bytes

database mounted.

database opened.

orclpdg_pri >select distinct thread#,max(sequence#) over(partition by thread#) a from v$archived_log;

thread#          a

---------- ----------

1         39

若最大序號不同,需要複製到待轉換的standby。

3.啟動failover

orclpre_std >alter database recover managed standby database finish force;//force停止當前活動的rfs程序(rfs是redo傳輸服務)。

database altered.

4.切換物理standby為primary

orclpre_std >alter database commit to switchover to primary;

database altered.

5.啟動新的primary

orclpre_std >select status from v$instance;

status

------------

started

orclpre_std >alter database open;

alter database open

*error at line 1:

ora-01507: database not mounted

orclpre_std >shutdown immediate

ora-01507: database not mounted

oracle instance shut down.

orclpre_std >startup

oracle instance started.

total system global area  167772160 bytes

fixed size                  1218316 bytes

variable size              75499764 bytes

database buffers           88080384 bytes

redo buffers                2973696 bytes

database mounted.

database opened.

orclpre_std >select * from scott.test;

id----------12

3456

6 rows selected.

mysql重建從庫 物理DG從庫損壞後的重建

由於是重建,原來dg環境中被重建的物理從庫中的資料檔案,日誌檔案,dump檔案等都可以刪除,切記原來的引數檔案和相應目錄一定要保 由於是重建,原來dg環境中被重建的物理從庫中的資料檔案,日誌檔案,dump檔案等都可以刪除,切記原來的引數檔案和相應目錄一定要儲存。主庫做standby控制檔案和資料庫的...

dg 物理備份,恢復出現不一致的問題

問題描述 dg 物理備份,在物理備庫是執行如下 rman 備份命令時,恢復時出現恢復不一致的情況 主要是 沒通過帳號許可權登入資料,在備庫備份 歸檔是無法切換主庫歸檔 rman target rman backup as compressed backupset database tag full ...

flash物理運動之擺動的鐘

功能 模仿掛鐘鐘擺擺動的自然現象,可以調整擺動週期以及擺動的幅度 說明 mc1以及mc2分別為兩個mc的例項名稱,這裡為了更好的實現擺動時產生的模糊的殘影效果,使用了兩個mc一起擺動,但是最中效果還不是很好,希望有朋友可以改進一下。鐘擺 var rad number 0 var stx number...