使用與可公開存取之非 Oracle 資料庫的客戶管理異質連線建立資料庫連結
使用 DBMS_CLOUD_ADMIN.CREATE_DATABASE_LINK
建立從位於公用端點的專用 Exadata 基礎架構上的 Autonomous Database 到 Oracle Database Gateway 的資料庫連結,以存取非 Oracle 資料庫。
Oracle Database Gateway 是專為存取特定非 Oracle 系統所設計的閘道。使用 Oracle Database Gateway,無需知道資料位置或儲存方式,即可存取分散式資料庫系統中的任何位置資料。使用 Autonomous Database 上的資料庫連結搭配 Oracle Database Gateway 支援異質環境,並不需要自訂應用程式,即可從非 Oracle 系統存取資料。
附註:
只有 19c 和 23.6 和更新版本 (適用於 23ai) 的 19.25 和更新版本才支援使用客戶管理的異質連線建立資料庫連結,以連線至可公開存取的非 Oracle 資料庫。必備條件
若要在公用端點上使用來自 Autonomous Database 執行處理的資料庫連結,請執行下列作業:
-
設定讓 Oracle Database Gateway 存取非 Oracle 資料庫。請參閱 Oracle Database 19c Database Heterogeneous Connectivity User's Guide 中的 Oracle Database Gateways 或 Oracle Database 23ai Database Heterogeneous Connectivity User's Guide ,瞭解詳細資訊。
視您要連線的資料庫而定,您可以參閱相應的 Installation and Configuration Guide 和 Gateway User's Guide。
例如,若為 Oracle Database Gateway for SQL Server,請參閱:
-
Oracle Database 19c Installation and Configuration Guide for Microsoft Windows 中的 Installing and Configuring Oracle Database Gateway for SQL Server 或 Oracle Database 23ai Installation and Configuration Guide for Microsoft Windows
-
Oracle Database 19c User's Guide 中的 Introduction to the Oracle Database Gateway for SQL Server 或 Oracle Database 23ai User's Guide
-
Oracle Database 19c Installation and Configuration Guide for Microsoft Windows 中的 Configure Oracle Net for the Gateway 或 Oracle Database 23ai Installation and Configuration Guide for Microsoft Windows
-
-
設定 Oracle Net Listener 處理 Oracle Database Gateway 上的內送要求。
-
在 Oracle Database Gateway 上建立自行簽署的公事包。
- 將目標閘道設定為使用 TCP/IP 與 SSL (TCPS) 認證。如需詳細資訊,請參閱 Oracle Database 19c Security Guide 中的 Configuring Transport Layer Security Authentication 或 Oracle Database 23ai Security Guide 。
程序
使用 DBMS_CLOUD_ADMIN.CREATE_DATABASE_LINK
建立從公用端點上的 Autonomous Database 執行處理到 Oracle Database Gateway 的資料庫連結,以存取非 Oracle 資料庫。
BEGIN
DBMS_CLOUD.UPDATE_CREDENTIAL(
credential_name =>'DB_LINK_CRED',
attribute =>'PASSWORD',
value=>'password'
);
END;
/
新密碼的位置。
此作業之後,使用此證明資料的現有資料庫連結會繼續運作,而不需要刪除並重新建立資料庫連結。
請參閱 UPDATE_CREDENTIAL 程序以瞭解詳細資訊。
請參閱 How to Access Non-Oracle Databases from Autonomous Database using Oracle Database Gateway ,瞭解如何建立連至 Oracle Database Gateway 的資料庫連結,以存取 Microsoft SQL Server 資料庫的範例。
附註:
雖然上述部落格討論 Autonomous Database Serverless 的內容,但該部落格中的所有內容也適用於 Autonomous Database on Dedicated Exadata Infrastructure 。