閱讀985 返回首頁    go 技術社區[雲棲]


Create a Primary and Standby Database in the Cloud

編輯手記:海外專家聯合出品,開啟你的數據庫雲端之旅!第一步,在Oracle 雲上搭建專家的環境。本期話題圍繞“創建standby數據庫展開”。

前文回顧:

Configure and Practice Backup and Recovery in Cloud


1作者簡介

Joel Perez:Oracle ACE總監, Maximum Availability OCM,OTN 專家,全球第一批ACE稱號獲得者,致力於數據庫高可用、災難恢複、升級遷移和數據複製等方向設計和實現解決方案。

Kamran Aghayev :Oracle ACE總監,OCM、OCCE、RAC實施專家。在AzerCell Telecom LLC擔任DBA團隊主管。出版書籍《Expert secrets for using RMAN and Data Pump》、《Oracle Certified Master 11G Exam Guide


640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=

640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy


Inthis guide, I will show you how to create a primary and standby database in thecloud.

這篇文章主要內容是如何在雲上創建主-備數據庫。


1

創建primary-standby數據庫

Login to your cloud account, switch tothe Oracle Database Cloud Service page and create a new service. Select “OracleDatabase Cloud Service” as a subscription type and click Next.

登錄雲賬號,跳轉到Oracle Database Cloud Service頁麵,創建一個新服務。選擇OracleDatabase Cloud Service作為訂閱類型,然後點擊下一步。

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=


Select a database release and click Next.

選擇數據庫版本,並點擊下一步。

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=


Select “Enterprise Edition – ExtremePerformance” as a Software Edition and click Next

軟件版本選擇“Enterprise Edition – Extreme Performance”,點擊下一步

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=


Provide the service name, SSH public keyand select “Standby Database with Data Guard” option, select “HighAvailability” and click Next

填寫服務名,SSH公鑰,然後選擇“Standby Database with Data Guard”“ High Availability”選項,然後點擊下一步。

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=

Reviewthe configuration settings and click Create to create a primary and a standby database

預覽配置並確認創建。

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=

Aftera few minutes the primary and standby database will be created successfully

幾分鍾就可以創建成功

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=

Clickon the service name (srvdg) to open the home page of both databases

點擊服務名(我這裏設置的是srvdg),然後打開新建的主備數據庫的首頁。

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=

Nowopen two different Putty executables and connect to the both machines

打開不同的Putty可執行文件,分別連接到兩台機器。

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=


Connect to the both databases and checkthe DB_UNIQUE_NAME parameter. PRODDB_01 is set to the primary database,PRODDB_02 for the standby database. Also checkLOG_ARCHIVE_DEST_2 parameter onthe primary database. As you see, archived log files are shipped to the standbydatabase using PRODDB_02 service.

分別連接到兩個數據庫,檢查DB_UNIQUE_NAME參數,其中PRODDB_01是primary庫,PRODDB_02是standby庫。查看primary庫上的LOG_ARCHIVE_DEST_2參數,你可以看到,歸檔日誌通過PRODDB_02的服務傳輸到standby數據庫。

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=


2

驗證primary-standby的功能

Now let’s test the functionality of thestandby database. First of all, open an alert.log file of the standby database,switch the log file on the primary database and check if the log file isapplied

接下來,我們來驗證standby數據庫的功能,首先打開standby數據庫的alert日誌,在primary庫上做一次日誌切換,觀察日誌是否本正常應用。

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=

Nowperform a switchover

現在執行一次switchover

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=


Switch the log file and see if it isapplied to the new standby database

在新的primary庫上執行一次日誌切換,觀察在standby庫上是否正常應用。

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=


It worked. Now switch back

如圖所示,應用成功。然後將primarystandby的角色切換回來。

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=


As you see, it’s very easy to create adatabase with its own standby database in the cloud!

 以上就是在雲上創建standby庫的過程,非常簡便快捷。


We hope this article can be helpful foryou and see us on next article.

希望以上內容對你有幫助。


文章轉自數據和雲公眾號,原文鏈接

最後更新:2017-07-18 20:36:17

  上一篇:go  [原創]分析解決lvs fullnat模式下後端服務器獲取真實IP地址異常問題
  下一篇:go  Configure and Practice Backup and Recovery in Cloud