天天看點

【雲端起舞】在Oracle公有雲上建立克隆資料庫

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

系列文章回顧:

作者簡介:
【雲端起舞】在Oracle公有雲上建立克隆資料庫
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

建立成功以後,打開資料庫,并切換到管理者頁面。

【雲端起舞】在Oracle公有雲上建立克隆資料庫

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。

在建立快照之前,首先登入到資料庫建立一張表,插入一些資料并送出事務,這用于我們克隆完成之後進行資料驗證。

【雲端起舞】在Oracle公有雲上建立克隆資料庫

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”按鈕,填寫快照名。切記,此時還不能按建立的按鈕。

【雲端起舞】在Oracle公有雲上建立克隆資料庫

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住,不能正常執行。

【雲端起舞】在Oracle公有雲上建立克隆資料庫
【雲端起舞】在Oracle公有雲上建立克隆資料庫

 when the snapshot is created, click onthe menu icon on the right and choose create database clone to create a clonedatabase from the snapshot

快照建立好以後,從頁面右邊 的菜單欄選擇通過快照建立克隆資料庫。

【雲端起舞】在Oracle公有雲上建立克隆資料庫

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

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

【雲端起舞】在Oracle公有雲上建立克隆資料庫

after few minutes the clone database willbe created.

這個過程很快就會完成。

【雲端起舞】在Oracle公有雲上建立克隆資料庫

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

現在登入到克隆資料庫,檢查之前建立的那張表。

【雲端起舞】在Oracle公有雲上建立克隆資料庫

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,那麼僅僅在實驗賬号上我們就可以建立一個生産資料庫,一個快照資料庫和一個克隆資料庫。

【雲端起舞】在Oracle公有雲上建立克隆資料庫

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

<b></b>