移轉至 Oracle Autonomous Database on Dedicated Exadata Infrastructure

本節說明如何將 Oracle Exadata 工作負載移轉至 Oracle Autonomous Database on Dedicated Exadata Infrastructure ,並將 VMware 應用軟體移轉至 Oracle Cloud VMware Solution

架構

此架構顯示從內部部署 Oracle Exadata 資料庫和 VMware 應用程式移轉至 Oracle Autonomous Database on Dedicated Exadata InfrastructureOracle Cloud VMware Solution

使用 Oracle Zero Downtime Migration ,可將資料從企業內部部署移轉至雲端時,自動執行資料庫移轉,同時最短的停機時間。

使用 HCX 和 vMotion 等 VMware 工具,將您在 VMware 上執行的內部部署應用系統移轉至 Oracle Cloud VMware SolutionOracle Cloud VMware Solution 可讓您全自動導入 OCI 租用戶內執行的 VMware 軟體定義資料中心 (SDDC)。

下圖說明此參照架構。



migrate-vmware-cloud-solution-autonomous-dedicated-architecture.zip

此架構支援下列元件:

  • 地區

    Oracle Cloud Infrastructure 區域是一個本地化的地理區域,包含一或多個資料中心 (稱為可用性網域)。區域與其他區域無關,因此廣大的距離可加以區隔 (跨國家或甚至洲)。

  • 虛擬雲端網路 (VCN) 和子網路

    VCN 是您在 Oracle Cloud Infrastructure 區域中設定的可自訂軟體定義網路。就像傳統的資料中心網路,VCN 可讓您完全控制網路環境。VCN 可以有多個非重疊 CIDR 區塊,而您可以在建立 VCN 之後進行變更。您可以將 VCN 區隔成子網路,然後對區域或可用性網域進行調整。每個子網路都是由不與 VCN 中其他子網路重疊的連續位址範圍所組成。您可以在建立子網路後變更其大小。子網路可以是公用網路或專用子網路。

  • Oracle Autonomous Database on Dedicated Exadata Infrastructure

    Oracle Autonomous Database on Dedicated Exadata Infrastructure 可讓您存取在 OCI 區域專用 Exadata 基礎架構上執行的最新自治式資料庫技術。有了 Autonomous Database ,您擁有完全彈性的資料庫,Oracle 會以自治方式操作資料庫生命週期的所有層面,從資料庫位置到備份與更新。專用的 Exadata 基礎架構可以託管許多自主 VM 叢集,這些叢集可以託管許多自主資料庫。

  • Oracle Cloud VMware Solution 軟體定義資料中心 (SDDC)

    Oracle 與 VMware 合作開發經 VMware 認證的軟體定義資料中心 (SDDC) 建置,用於 Oracle Cloud Infrastructure 內。這個名為 Oracle Cloud VMware Solution 的實作使用 Oracle Cloud Infrastructure 來代管高可用性 VMware SDDC。此外,也可讓您將所有內部部署的 VMware SDDC 工作負載順暢地移轉至 Oracle Cloud VMware SolutionOracle Cloud VMware Solution 包含下列 VMware 元件:

    • VMware vSphere ESXi
    • VMware 繁體中文
    • VMware vCenter
    • VMware NSX-T
    • VMware HCX (選擇性)
  • 裸機

    Oracle Cloud VMware Solution 軟體定義資料中心 (SDDC) 包含代管 Oracle Cloud VMware Solution 的裸機伺服器。裸機伺服器支援需要大量核心、大量記憶體及高頻寬 (例如 Oracle Cloud VMware Solution) 的應用系統。您可以在裸機伺服器上部署 Oracle Cloud VMware Solution ,並與其他公有雲和企業內部部署資料中心相比,配置具有顯著效能改進的虛擬機器。

  • 服務閘道

    服務閘道可讓您從 VCN 存取其他服務,例如 Oracle Cloud Infrastructure Object Storage 。VCN 到 Oracle 服務的流量會透過 Oracle 網路光纖通道,而一律不會周遊網際網路。

  • 動態路由閘道 (DRG)

    DRG 是一個虛擬路由器,可為 VCN 與區域外部網路之間的 VCN (例如另一個 Oracle Cloud Infrastructure 區域中的 VCN、企業內部部署網路或其他雲端提供者中的網路) 之間的專用網路流量提供路徑。

  • FastConnect

    Oracle Cloud Infrastructure FastConnect 提供一個簡單的方式,在您的資料中心與 Oracle Cloud Infrastructure 之間建立專屬的專用連線。FastConnect 提供與網際網路型連線比較的高頻寬選項,以及更可靠的網路體驗。

  • 檔案儲存

    將資料庫從企業內部部署的 Oracle Exadata 移轉至 Oracle Autonomous Database on Dedicated Exadata Infrastructure 時,可以使用 OCI File Storage 作為暫時儲存空間。

  • 物件儲存

    OCI Object Storage 用於移轉期間暫時儲存資料庫備份和匯出項目。

Before You Begin - 開始之前

開始之前,請檢查本設定中所使用之主要元件的版本,並複查產品文件以供日後參考。

複查需求

  • 確定來源資料庫正在執行 Oracle Database 版本 19.18 Enterprise Edition 或更新版本。
  • The target database must be Oracle Autonomous Database on Dedicated Exadata Infrastructure version 19.19.0.1.0 Enterprise Edition Extreme Performance or above.
  • Oracle Zero Downtime Migration 必須是 21.4 或更新版本。
  • 中介儲存體必須包括 OCI Object Storage 和 Oracle ZFS Storage Appliance (NAS)。

審核文件

這個解決方案播放手冊描述如何移轉資料庫工作負載。請參閱下面的解決方案,瞭解如何移轉您的 VMware 工作負載。對於資料庫移轉的相關資訊環境、詳細資訊及參照,有幫助其他資源。

瞭解如何將工作負載的 VMware 元件移轉至 Oracle Cloud VMware Solution

檢閱 Oracle Zero Downtime Migration 資源:

複查邏輯移轉資源:

複習 Oracle Database 資源:

關於必要產品與角色

此解決方案需要下列產品:

  • Oracle Cloud Infrastructure Identity and Access Management
  • OCI Compute,OCI 運算
  • OCI 物件儲存
  • Oracle Zero Downtime Migration
  • Oracle Exadata
  • Oracle Autonomous Database on Dedicated Exadata Infrastructure

這些是每個產品所需的角色。

產品名稱:角色 需要 ...
Oracle Cloud Infrastructure Identity and Access Management :OCI_user 建立邏輯移轉的 API 金鑰
OCI Compute :admin 建立 OCI Compute 執行處理以執行 Oracle Zero Downtime Migration 軟體
OCI Object Storage :Storage Admin 建立 OCI Object Storage 儲存桶以上傳匯出的資料
Oracle Zero Downtime Migration :opc 建立 zdmuser 以安裝並執行 Oracle Zero Downtime Migration 軟體
Oracle Zero Downtime Migration :zdmuser
  • 安裝 Oracle Zero Downtime Migration 軟體
  • 執行 Oracle Zero Downtime Migration
Oracle Exadata:root/sudoer user
  • 從網路連附儲存裝置掛載網路檔案系統共用以匯出資料庫
  • Oracle Zero Downtime Migration 虛擬機器啟用無密碼 ssh
  • 執行 sudo 指令以安裝 Oracle Zero Downtime Migration 軟體代理程式
  • 執行 sudo 指令以匯出資料庫
Oracle Exadata 資料庫:sys/system 執行資料汲取以匯出資料庫以進行邏輯移轉
Dedicated Exadata InfrastructureOracle Autonomous Database on Dedicated Exadata Infrastructure 上的 Oracle Autonomous DatabaseDatabase Admin 建立目標 Oracle Autonomous Database on Dedicated Exadata Infrastructure 資料庫
Dedicated Exadata InfrastructureOracle Autonomous Database on Dedicated Exadata Infrastructure 上的 Oracle Autonomous DatabaseADMIN 執行資料汲取以匯入邏輯移轉的資料庫

請參閱 Oracle 產品、解決方案和服務,以取得您需要的內容。

移轉的注意事項

在開始移轉之前,請先檢閱這些假設與考量。

  • 邏輯移轉是將資料庫從 Oracle Exadata 移轉至 Oracle Autonomous Database on Dedicated Exadata Infrastructure 的唯一支援方法。
  • 此播放手冊中的下列步驟說明如何使用離線邏輯移轉進行移轉,請參閱「複查文件」一節,瞭解如何使用線上邏輯移轉進行移轉。在邏輯線上移轉期間,Oracle Zero Downtime Migration 會將 Oracle GoldenGate 設定為來源資料庫與目標資料庫之間的移轉,以確保資料庫在移轉期間一律上線。
  • 在邏輯移轉期間,會移轉可插式資料庫 (PDB) 和 (或) 綱要。非容器資料庫會移轉至 Oracle Autonomous Database on Dedicated Exadata Infrastructure 資料庫,該資料庫包含在自治式容器資料庫中。
  • 在邏輯移轉期間,Oracle Zero Downtime Migration 將不會將資料直接匯出至 OCI Object Storage 。在來源 Exadata 資料庫上,Oracle Zero Downtime Migration 會將資料匯出至共用檔案系統 (網路檔案系統或 Oracle Advanced Cluster File System)。接著,匯出的資料會上傳至 OCI Object Storage 。目標 Oracle Autonomous Database on Dedicated Exadata Infrastructure 資料庫會從 OCI Object Storage 匯入資料。
  • 內部部署 Oracle Exadata 可以執行單一執行處理與 RAC 資料庫。Oracle Autonomous Database on Dedicated Exadata Infrastructure runs RAC databases.在資料庫移轉期間,Oracle Zero Downtime Migration 會視需要將單一執行處理轉換成 RAC 資料庫。
  • 在企業內部部署的 Oracle Exadata 中,可以選擇使用 Oracle 通透資料加密來加密資料庫。將資料庫從 Exadata 移轉至 Dedicated Exadata InfrastructureOracle Autonomous Database on Dedicated Exadata Infrastructure 上的 Oracle Autonomous Database 時,目標 Dedicated Exadata InfrastructureOracle Autonomous Database on Dedicated Exadata Infrastructure 上的 Oracle Autonomous Database 資料庫一律會加密。
  • 來源 Exadata 和目標 Oracle Autonomous Database on Dedicated Exadata Infrastructure 資料庫必須執行相同的時區檔案。
  • 此手冊中的步驟假設安裝 Exadata 的資料中心與設定 Oracle Autonomous Database on Dedicated Exadata InfrastructureOracle Zero Downtime Migration 虛擬機器的 OCI 虛擬雲端網路之間具有直接的網路連線 (透過架構圖所示的 FastConnect 或 IPSec VPN)。
  • 依照預設,Oracle Zero Downtime Migration 會嘗試使用 high_tls 服務,與 Oracle Autonomous Database on Dedicated Exadata Infrastructure 資料庫進行通訊。確定 Oracle Zero Downtime Migration 虛擬機器和 Oracle Autonomous Database on Dedicated Exadata Infrastructure 資料庫之間允許使用連接埠 2484 上 TCPS 連線。

使用邏輯移轉進行移轉

本節說明如何執行離線邏輯移轉。如需線上移轉,請參閱「複查文件」一節。

  1. 在 OCI 主控台中,於要設定目標資料庫的相同 VCN 中建立一個運算執行處理。
    此運算執行處理可以是任何型態,至少需要兩個 OCPU 和 16GB RAM,即可執行 Oracle Linux 7。9 作業系統。此虛擬機器將用來執行 Oracle Zero Downtime Migration 軟體。
  2. 使用「檢閱文件」一節中的 Oracle Zero Downtime Migration 安裝文件,在 OCI 運算執行處理下載並安裝 Oracle Zero Downtime Migration 21.4 軟體。
    zdmuser 身分執行 Oracle Zero Downtime Migration 軟體。
  3. zdmuser 身分登入 Oracle Zero Downtime Migration ,然後產生 ssh 金鑰組。從 zdmuser 帳戶啟用無密碼 ssh 至來源 Exadata 資料庫上的所有節點 (rootprivilege-sudoer user)。
  4. 確定 Oracle Zero Downtime Migration VM 可以使用主機名稱和 IP 位址與來源資料庫主機通訊。請檢查下列各項:
    • 視需要修改 Oracle Zero Downtime Migration VM 中的 VCN DNS 解析器或 /etc/hosts 檔案。
    • 確認有安全規則允許 Oracle Zero Downtime Migration VM 連線至預設監聽器連接埠 1521 和 ssh 連接埠 22 上的來源資料庫。
    • 確定 Oracle Zero Downtime Migration VM 可連線安全 TLS 連接埠 2484 上的目標資料庫。
  5. 在 Oracle ZFS Storage Appliance 或網路連接儲存裝置上,建立網路檔案系統共用,以作為移轉進度時傾印資料庫資料的位置。
  6. 將網路檔案系統共用掛載到 Exadata 資料庫的所有節點。
    確定所有使用者都具備讀取、寫入、執行 (rwx) 權限。記下掛載點。
  7. 使用 OCI 主控台或 REST API 建立新的目標資料庫。依照下列方式設定資料庫:
    • 新目標資料庫的名稱可以與來源資料庫的名稱不同。
    • 新資料庫可以是比來源資料庫更新的版本。
    • 提供 ADMIN 使用者的密碼。記下密碼。
    在建立資料庫之後,請將資料庫 OCID 記下來。
  8. 在 OCI 主控台中,如果還沒有 OCI Object Storage 儲存桶,請加以建立。
    請注意 Swift URL、物件儲存命名空間和儲存桶名稱。
  9. 為擁有目標資料庫的 OCI 使用者建立一個 API 金鑰,同時具備將資料上傳至步驟 8 中建立之 OCI 物件儲存儲存桶的權限。
    請注意使用者 OCID、租用戶 OCID、指紋及 OCI 區域。在 PEM 檔案上儲存對應的私密與公開金鑰。Oracle Zero Downtime Migration 將使用此 API 金鑰連線至 OCI,以在資料庫移轉期間取得目標資料庫資訊,以及將資料傾印上傳至 OCI Object Storage
  10. 將上一個步驟的 PEM 檔案複製到 Oracle Zero Downtime Migration VM。
  11. sys 使用者身分登入來源 Exadata 資料庫,以確保參數 Streams_Pool_Size 至少設為 2G,例如:
    SQL>show parameter streams_pool_size;
    SQL>alter system set streams_pool_size=2G scope=both SID=’*’;                  
  12. 使用 Oracle Zero Downtime Migration 的邏輯移轉回應檔樣板 Oracle Zero Downtime Migration ,建立移轉的回應檔。索引鍵參數是:
    • TARGETDATABASE_OCIDOracle Autonomous Database on Dedicated Exadata Infrastructure 目標資料庫的 OCID。
    • MIGRATION_METHOD: OFFLINE_LOGICAL
    • DATA_TRANSFER_MEDIUM: OSS
    • TARGETDATABASE_ADMINUSERNAME: ADMIN
    • SOURCEDATABASE_ADMINUSERNAME: system
    • SOURCEDATABASE_CONNECTIONDETAILS_HOST :來源 Exadata 資料庫上第一個節點的 IP/ 主機名稱。
    • SOURCEDATABASE_CONNECTIONDETAILS_PORT: 1521
    • SOURCEDATABASE_CONNECTIONDETAILS_SERVICENAME :來源 PDB 或非容器資料庫 (非 CDB) 的服務名稱。使用 lsnrctl 來尋找。
    • OCIAUTHENTICATIONDETAILS_USERPRINCIPAL_TENANTID :步驟 9 的租用戶 OCID。
    • OCIAUTHENTICATIONDETAILS_USERPRINCIPAL_USERID :步驟 9 的使用者 OCID。
    • OCIAUTHENTICATIONDETAILS_USERPRINCIPAL_FINGERPRINT :來自步驟 9 的指紋。
    • OCIAUTHENTICATIONDETAILS_PRIVATEKEYFILE :從步驟 10 至 Oracle Zero Downtime Migration 伺服器上私密金鑰 .pem 檔案的檔案路徑。
    • OCIAUTHENTICATIONDETAILS_REGIONID :步驟 9 中 OCI 使用者的 OCI 區域 ID。
    • SOURCECONTAINERDATABASE_ADMINUSERNAME: system
    • SOURCECONTAINERDATABASE_CONNECTIONDETAILS_HOST :來源 Exadata 資料庫上第一個節點的 IP/ 主機名稱。
    • SOURCECONTAINERDATABASE_CONNECTIONDETAILS_PORT: 1521
    • SOURCECONTAINERDATABASE_CONNECTIONDETAILS_SERVICENAME :Exadata 資料庫中來源容器資料庫的服務名稱。請使用 lsnrctl 來尋找)。
    • DATAPUMPSETTINGS_JOBMODE: SCHEMA
    • DATAPUMPSETTINGS_FIXINVALIDOBJECTS: TRUE
    • DATAPUMPSETTINGS_EXPORTDIRECTORYOBJECT_NAME: mig
    • DATAPUMPSETTINGS_EXPORTDIRECTORYOBJECT_PATH :從步驟 6 掛載網路檔案儲存體。
    • DATAPUMPSETTINGS_CREATEAUTHTOKEN: FALSE
    • DATAPUMPSETTINGS_DATAPUMPPARAMETERS_EXPORTPARALLELISMDEGREE :可用的 CPU 數目。必須大於 2。
    • DATAPUMPSETTINGS_DATABUCKET_NAMESPACE :步驟 8 的 OCI 物件儲存命名空間。
    • DATAPUMPSETTINGS_DATABUCKET_BUCKETNAME :從步驟 8 OCI Object Storage 儲存桶名稱。
    • EXCLUDEOBJECTS-1: owner:PDBADMIN
  13. 執行 Oracle Zero Downtime Migration 乾式執行移轉工作 (-eval),驗證所有進行移轉的先決條件。這會執行雲端移轉前建議程式工具 (CPAT),驗證來源資料庫是否適合透過 Oracle Zero Downtime Migration 邏輯移轉至 Oracle Autonomous Database on Dedicated Exadata Infrastructure 。繼續之前,請先解決 CPAT 所報告的問題。例如:
    zdmcli migrate database -sourcedb source_db_unique_name \
    -sourcenode IP/hostname_of_first_Exadata_node \
    -srcauth zdmauth \
    -srcarg1 user: root_or_sudoer_user \
    -srcarg2 identity_file: path_to_ssh_private_key/ssh_private_key_file_name
    \
    -srcarg3 sudo_location:/usr/bin/sudo \
    -rsp path_to_response_file/response_file_name_from_step_12 \
    -eval
    此指令會要求輸入兩個密碼。第一個密碼是來源 Exadata 資料庫的系統密碼。第二個密碼是目標 Oracle Autonomous Database on Dedicated Exadata Infrastructure 資料庫的 ADMIN 密碼。
    記下 Oracle Zero Downtime Migration 工作 ID。
    順利執行模擬移轉之後,請繼續進行下一個步驟。
  14. 執行乾式移轉成功之後,請執行 Oracle Zero Downtime Migration 工作。例如:
    zdmcli migrate database -sourcedb source_db__unique_name \
    -sourcenode IP/hostname_of_first_Exadata_node \
    -srcauth zdmauth \
    -srcarg1 user:root_or_sudoer_user \
    -srcarg2 identity_file:path_to_ssh_private_key/ssh_private_key_file_name \
    -srcarg3 sudo_location:/usr/bin/sudo \
    -rsp path_to_response_file/response_file_name_from_step_12
    此指令會要求輸入兩個密碼。第一個密碼是來源 Exadata 資料庫的系統密碼。第二個密碼是目標資料庫的 ADMIN 密碼。記下 Oracle Zero Downtime Migration 工作 ID。