日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Oracle Dataguard之Real-Time Apply

發布時間:2025/5/22 编程问答 22 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Oracle Dataguard之Real-Time Apply 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Oracle Dataguard一共支持三種模式:最大可用模式(Maximum Availability),最大性能模式(Maximum Performance),最大保護模式(Maximum Protection)。默認創建的是最大性能模式(Maximum Performance)。關于三者的區別,我們來看官方的定義。

Maximum Availability

Transactions do not commit until all redo data needed to recover those transactions has been written to the online redo log and to the standby redo log on at least one synchronized standby database.If the primary database cannot write its redo stream to at least one synchronized standby ? ? ? ? database,it operates as if it were in maximum performance mode to preserve primary database availability until it is again able to write its redo stream to a synchronized standby database.

Maximum Performance

This is accomplished by allowing transactions to commit as soon as all redo data generated by those transactions has been written to the online log. Redo data is also written to one of more standby databases,but this is done asynchronously with respect to transaction commitment,so primary ? ? ? database performance is unaffected by delays in writing redo data to the standby databases.

Maximum Protection

This protection mode ensures that no data loss will occur if the primary database fails.To provide this level of protection,the redo data needed to ? ? ?recover a transaction must be written to both the online redo log and to the standby redo on at least one synchronized standby database before the transaction commits.To ensure that data loss cannot occur,the primary database will shut down,rather than continue processing transactions,if it ? ? cannot write its redo stream to at least one synchronized standby database.

三種模式對于日志傳輸的要求如下:

在前篇文章中-《Oracle Dataguard之物理standby的基本配置》,我們最后配置出來的是Physical Standby Database 最大性能模式下的異步傳輸,現在我們配置該模式下的Real-Time Apply。啟用Real-Time Apply需要配置standby redo log,而這也是其它兩種模式的基礎。

一、 創建standby redo log

? ? ? 1> 查詢主庫上online redo log的組數和大小 ? -->> node1 上操作

? ? ? ? ?SQL> select group#,bytes/1024/1024 "size" from v$log;

? ? ? ? ?GROUP# ?size
? ? ? ? ?------ ? ? ----------
? ? ? ? ?1 ? ? ? ? ? ? 50
? ? ? ? ?2 ? ? ? ? ? ? 50
? ? ? ? ?3 ? ? ? ? ? ? 50

? ? ? 2> 在備庫上添加standby redo log ? -->> group比主庫多一組,大小和主庫一樣,node2上操作

? ? ? ? ?[oracle@node2 ~]$ mkdir /u01/standby

? ? ? ? ?SQL> alter database add standby logfile '/u01/standby/standby01.log' size 50M;

? ? ? ? ?SQL> alter database add standby logfile '/u01/standby/standby02.log' size 50M;

? ? ? ? ?SQL> alter database add standby logfile '/u01/standby/standby03.log' size 50M;

? ? ? ? ?SQL> alter database add standby logfile '/u01/standby/standby04.log' size 50M;

? ? ? ? ?注意:請確保已關閉Redo Apply,不然會報以下錯誤

? ? ? ? ? ? ? ? ?SQL> alter database add standby logfile '/u01/standby/standby01.log' size 50M;

? ? ? ? ? ? ? ? ?alter database add standby logfile '/u01/standby/standby01.log' size 50M
? ? ? ? ? ? ? ? ?*
? ? ? ? ? ? ? ? ?ERROR at line 1:
? ? ? ? ? ? ? ? ?ORA-01156: recovery or flashback in progress may need access to files

? ? ? ? ?關閉Redo Apply,

? ? ? ? ? ? ? ? SQL> alter database recover managed standby database cancel;

二、 修改主庫的配置參數 ?-->> node1 上操作

? ? ? ? ? SQL> alter system set log_archive_dest_2='service=to_victor lgwr affirm sync valid_for=(online_logfiles,primary_role) db_unique_name=victor';

? ? ? ? ? SQL> alter system switch logfile;

三、 在備庫上啟用Real-Time Apply ?-->> node2 上操作

? ? ? ? ? SQL> alter database recover managed standby database using current logfile disconnect from session;

四、 測試

? ? ? ?除了用前篇文章中,查看歸檔日志的應用情況來驗證dataguard的配置以外,本文將采用實際案例進行測試。?

? ? ? 1> 在主庫上新建一個測試表

? ? ? ? ? ?SQL> create table test(id number);

? ? ? ? ? ?SQL> insert into test values(1);

? ? ? 2> 在備庫中檢測

? ? ? ? ??SQL> select * from test;

? ? ? ? ? no rows selected

? ? ? 3> 在主庫中提交事務

? ? ? ? ??SQL> commit;

? ? ? 4> 在備庫中檢測

? ? ? ? ??SQL> select * from test;

? ? ? ? ? ID
? ? ? ? ? ----------
? ? ? ? ? 1

總結:

? ? ? 這個總結包括物理standby的基本配置和本文中的Real-Time Apply

? ? ?1>?如果只設置主/次兩個本地歸檔目的地,可以使用初始化參數log_archive_dest指定主歸檔目的地,使用初始化參數log_archive_duplex_dest指定次歸檔目的地。

? ? ? ? ? 在數據庫中,初始換參數log_archive_dest和log_archive_duplex_dest與log_archive_dest_n只能使用一組來設置歸檔目的地,不能同時使用

? ? ?2> 備庫log_archive_dest_1如果沒有顯性指定,默認的歸檔目錄將是$ORACLE_HOME/dbs.倘若顯性指定,但valid_for不是

? ? ? ? ? (standby_logfiles,standby_role)或者(all_logfiles,all_roles),則該設置無效,報警日志中將報以下錯誤:

? ? ? ? ? ? ORA-16032: parameter STANDBY_ARCHIVE_DEST destination string cannot be translated

? ? ? ? ? ? 歸檔目錄將繼續為$ORACLE_HOME/dbs

? ? ? 3> 在本文中,log_archive_dest_1='location=/u01/archivelog valid_for=(standby_logfiles,standby_role) db_unique_name=victor',如果再顯性指定

? ? ? ? ? ??log_archive_dest_3='location=/u01/standbyarchive valid_for=(standby_logfiles,standby_role) db_unique_name=victor',將會有兩份standby的

? ? ? ? ? ? 歸檔日志產生,沒有必要,只需要一個log_archive_dest_1即可

? ? ? 4> 最大性能模式下,如果是async,即異步,則需要主庫切一次日志,備庫采用應用。而如果啟用Real-Time Apply,則只需要主庫事務commit, 備庫就能應用

? ? ? 5> 刪除日志 ?

? ? ? ? ? ?SQL> alter database drop logfile group 7;

? ? ? 6>?如果發出了alter database recover managed standby database cancel;這個命令,MRP(Media Recovery process)將停止工作,但

? ? ? ? ? ?RFS(Remote file server)仍繼續工作

? ? ? 7>?如果沒有standby redo logs,是不能啟動real time apply的

? ? ? ? ? ?SQL> alter database recover managed standby database using current logfile disconnect from session;
? ? ? ? ? ?alter database recover managed standby database using current logfile disconnect from session
? ? ? ? ? ?*
? ? ? ? ? ?ERROR at line 1:
? ? ? ? ? ?ORA-38500: USING CURRENT LOGFILE option not available without standby redo logs

? ? ? 8>?standby數據庫startup后,沒有發出alter database recover managed standby database disconnect from session這個命令,RFS仍然工作,只要監聽

? ? ? ? ? ?都ok

? ? ? 9>?disconnect from session代表這個命令后臺運行。

? ? ? 10> Real-Time Apply的原理圖

? ? ? ? ? ??

總結

以上是生活随笔為你收集整理的Oracle Dataguard之Real-Time Apply的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 中文字幕一区二区人妻电影 | 五月伊人网 | 欧日韩一区二区三区 | 啦啦啦视频在线观看 | 在线观看中文字幕av | 99久久免费看精品国产一区 | 久久一 | 五月天三级 | 国产真实生活伦对白 | 光棍影院一区二区 | 欧美在线网址 | 另类老妇性bbwbbw图片 | av一级| 天堂av资源在线 | 欧美亚洲在线视频 | 99色图| 日本精品视频在线 | 黑人玩弄人妻一区二区三区四 | 亚洲性图av | 老司机久久 | 日日夜夜精品免费视频 | 69xx网站 | 闺蜜张开腿让我爽了一夜 | 99久久精品免费 | 亚洲五月六月 | 少妇精品亚洲一区二区成人 | 非洲黄色大片 | 欧美视频综合 | www.九色.com | 一本色道久久综合亚洲精品按摩 | 国产乱子伦精品 | 国产福利影院 | 337p粉嫩大胆色噜噜噜 | 欧美日色 | 搞黄视频在线观看 | 99热精品国产 | 国产精品免费在线播放 | 国产精品久久综合视频 | 少妇被狂c下部羞羞漫画 | 谁有av网址 | 日日爱影视 | 小仙女av| 亚洲自拍网站 | 91丨porny丨在线中文 | 一区二区三区视频在线 | 日韩人妻精品在线 | 香蕉视频2020 | 黄色资源网 | 日日操视频 | 少妇无内裤下蹲露大唇视频 | 亚洲美女啪啪 | 人妖videosex高潮另类 | 久久123 | 四季av中文字幕 | 秋霞国产一区 | 午夜不卡在线 | 韩国伦理在线视频 | 亚洲a图 | 青青草华人在线 | 国产五十路 | 成人精品一区二区三区视频 | 免费黄网站在线看 | 中文字幕一区二区三区精华液 | 污视频网站免费看 | 国产a自拍 | av中文网 | 欧美亚洲国产一区二区三区 | 午夜青青草 | 插插插日日日 | 国产喷白浆一区二区三区 | 高清一区在线观看 | 亚洲一线av| 日本阿v视频 | 青青草小视频 | 天天综合网入口 | 亚洲精品aⅴ中文字幕乱码 国产精品调教视频 | 日韩wwww| 精品少妇一区二区三区密爱 | 日日射夜夜 | 91蝌蚪少妇| www.九九九| 久久精品一区二区免费播放 | 国产好片无限资源 | 国产伦精品一区二区三区视频黑人 | 国产伦精品免费视频 | 亚洲欧美激情一区二区三区 | 日韩一级黄色大片 | 少妇高潮一区二区三区99刮毛 | 欧美特黄一级视频 | 成人福利网址 | 婷婷第四色 | 成人mv| youjizz中国少妇 | 熟妇人妻中文字幕无码老熟妇 | 九九久久视频 | 亚洲精品小说 | 国产一区二区免费看 | 国产午夜福利精品 | 少妇裸体淫交视频免费看高清 |