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


【雲端起舞】在Oracle公有雲上創建克隆數據庫

編輯手記:雲端起舞也要腳踏實地,Oracle全麵向雲,將會演繹怎樣的精彩,海外專家伴你踏上雲端之旅。


係列文章回顧

1、Configure and Practice Backup and Recovery in Cloud

     在Oracle公有雲上備份與恢複的配置和實踐

2、Create a Primary and Standby Database in the Cloud

     在Oracle公有雲上創建standby數據庫       


作者簡介:

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

Joel Perez

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


正文:

In this step by step article, we willcreate a clone database for the development or testing purposes.


這篇文章我們將會創建一個克隆數據庫作為開發貨真測試的環境。


Using Oracle Database Cloud service youdon’t need to configure and run DUPLICATE command of RMAN and create a clone of production database for developers team. All you need is to create a snapshotof your production database and clone it in a few minutes.


使用Oracle Database Cloud Service創建克隆數據庫,不需要配置或者執行通過RMAN執行DUPLICATE,隻需要對生產庫做一次快照,然後進行克隆,這個過程很快就完成了。


So first of all, let’s create a newdatabase. Open cloud.oracle.com, login with your credentials and create a newdatabase service.


首先,我們先創建一個新的數據庫。打開網址:cloud.oracle.com,登錄之後先創建一個 數據庫服務。


After successfully creating a new databaseopen it and select Administration section


創建成功以後,打開數據庫,並切換到管理員頁麵。

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

Before creating a snapshot of thedatabase, login to the database and create a new table, insert one row and committhe transaction. We will check this table after cloning the snapshot。


在創建快照之前,首先登錄到數據庫創建一張表,插入一些數據並提交事務,這用於我們克隆完成之後進行數據驗證。

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

Next, switch to the Snapshots tab, click“Create Storage Snapshot” button and provide the name of the snapshot. Don’tclick Create button


然後,在頁麵上切換到快照的選項,點擊“Create Storage Snapshot”按鈕,填寫快照名。切記,此時還不能按創建的按鈕。

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

 

When the snapshot of the database istaken, the database is placed into the backup mode. To test it, open SQLconnection, click on Create button to create a snapshot and switch to the SQLsession and run a command. The session will hang


當快照創建好以後,數據庫此時處於備份模式。我們來驗證一下,打開SQL命令行連接,點擊創建按鈕,然後切換到SQL會話並創建一張表,此時SQL會hang住,不能正常執行。

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

 When the snapshot is created, click onthe menu icon on the right and choose Create Database Clone to create a clonedatabase from the snapshot


快照創建好以後,從頁麵右邊 的菜單欄選擇通過快照創建克隆數據庫。

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

Next, provide the service name and thedatabase name for the clone database and create it.


然後,根據提示填寫服務名和克隆數據庫名進行創建。

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

After few minutes the clone database willbe created.


這個過程很快就會完成。

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

Now login to the clone database andcheck the table that was created before.


現在登錄到克隆數據庫,檢查之前創建的那張表。

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

The first table was created before thesnapshot and thus it’s there. But the second table was create after creating asnapshot and is not available.


我們發現,在快照之前創建的那張表存在,但創建克隆數據庫之後的那張表查不到。


As you see, it’s very easy to create aclone database using snapshots in Oracle Cloud. By having a trial account youare provided 500Gb of free space. Each database service consumes 150Gb space,so having 1 production db (150Gb), 1 snapshot (150Gb) and 1 clone database(150Gb) you can easily test the clone database creation with your trial account。


在Oracle Cloud 服務上創建克隆數據庫是非常方便的,在每一個實驗的賬號上,會有500G的免費存儲空間,假如每一個數據庫服務分配150G,那麼僅僅在實驗賬號上我們就可以創建一個生產數據庫,一個快照數據庫和一個克隆數據庫。

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


腳踏實地,開啟雲端之旅。更多精彩請加入雲和恩墨大講堂,與專家麵對麵交流。


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

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

  上一篇:go  Configure and Practice Backup and Recovery in Cloud
  下一篇:go  護士是患者治愈的一道橋梁!