您是否有舊版 Oracle 程式代碼,並偏好在 Azure 上使用受控服務? 若是如此,您可以使用 Azure 資料移轉服務 將 Oracle 資料庫移轉至 適用於 PostgreSQL 的 Azure 資料庫。 這是您的選項,因為它:
架構
工作流程
使用 Azure 資料移轉服務將 Oracle 資料庫移轉至 Azure 自動化。
將資料庫移轉至 適用於 PostgreSQL 的 Azure 資料庫。
元件
Azure 資料庫移轉服務是一項工具,可協助您簡化、指引和自動化將資料庫遷移至 Azure 的作業。
適用於 PostgreSQL 的 Azure 資料庫 可讓您專注於應用程式創新,而不是資料庫管理,並快速輕鬆地調整工作負載。
Azure 虛擬網絡 是 Azure 環境中的專用網。
部署此案例
必要條件
Microsoft Assessment and Planning (MAP) 工具組
使用 Microsoft Assessment and Planning (MAP) Toolkit 來評估現有的 Oracle 資料庫和架構。 如需詳細資訊,請參閱 Oracle to SQL Server:移轉指南。
評估移轉複雜度
下載 Ora2Pg。 執行下列命令以取得移轉複雜度評估:
ora2pg -t SHOW_REPORT --estimate_cost
以下是架構評估輸出的範例:
Migration levels:
A - Migration that might be run automatically
B - Migration with code rewrite and a human-days cost up to 5 days
C - Migration with code rewrite and a human-days cost above 5 days
Technical levels:
1 = trivial: no stored functions and no triggers
2 = easy: no stored functions but with triggers, no manual rewriting
3 = simple: stored unctions and/or triggers no manual rewriting
4 = manual: no stored functions but with triggers or views with code rewriting
5 = difficulty: stored functions and/or triggers with code rewriting
Oracle 物件轉換和資料遷移
使用 ora2pg 轉換 Oracle 資料表、預存程式、封裝和其他資料庫物件。 轉換之後,它們將會與 PostgreSQL 相容。 接下來,在 Azure 資料移轉服務 中啟動移轉管線。
轉換 Oracle 物件
在 Azure 虛擬機器 (VM) 上安裝 Ora2Pg。 請參閱在Linux和 Windows 上安裝 ora2pg 的逐步指南。
連線 至 Ora2pg 以轉換架構。 請參閱 Oracle 適用於 PostgreSQL 的 Azure 資料庫 Migration Cookbook。
在線移轉數據
您可以在在線移轉數據,以減少停機時間。 如需詳細資訊,請參閱建立 DMS 實例。
因應措施清單
您會在下方找到因應措施清單。 當您將 Oracle 資料庫移轉至 PostgreSQL 時,它很有用。 請參閱 Oracle 遷移至 PostgreSQL 因應措施清單,以取得詳細的腳本。
Oracle | PostgreSGL |
---|---|
資料庫連結 | 外部數據包裝函式 |
外部資料表 | 外部數據表 |
同義字 | 檢視/設定search_path |
全域臨時表 | 未記錄的數據表 / 臨時表 |
虛擬數據行 | 檢視 / 函式 / 觸發程式 |
由 連線 | 使用遞歸 |
反向索引 | 功能索引 |
索引組織資料表 (IOT) | 根據索引將數據表叢集 |
參與者
本文由 Microsoft 維護。 原始投稿人如下。
主體作者:
- 琥珀趙 |首席客戶工程師
若要查看非公用LinkedIn配置檔,請登入LinkedIn。
下一步
若要開始將 Oracle 資料庫移轉至 適用於 PostgreSQL 的 Azure 資料庫,請參閱教學課程:使用 DMS 將 Oracle 遷移至在線 適用於 PostgreSQL 的 Azure 資料庫。
注意
如果此移轉路徑似乎不符合您的業務需求,請參閱 移轉判定樹。