準備資料庫連線
瞭解如何設定 Oracle GoldenGate for Sybase 的資料庫連線、系統以及參數設定值。
Oracle GoldenGate FOR Sybase 會使用 Sybase SDK FOR SAP ASE 16.0.3 的 DB-Library 套裝程式中提供的從屬端程式庫連線至 Sybase ASE 資料庫。連線可以使用列出的連線並提供資料庫伺服器、連接埠、資料庫名稱和使用者資訊,或者連線可以設定為使用 DSQUERY,並提供伺服器名稱、資料庫和使用者資訊。
這兩種類型的連線都可以從 Web UI 中資料庫連線功能表下的管理服務新增,但使用 DSQUERY 時,需要在 Oracle GoldenGate 伺服器上進行額外的設定。
在 Linux 中設定 DSQUERY 連線
若要使用 DSQUERY 連線,必須將連線詳細資訊列在 interfaces 檔案中,該檔案必須建立並儲存在 SDK FOR SAP ASE 16.0.3 安裝資料夾中,例如 /opt/sap。1。以安裝 Sybase SDK 的使用者身分連線,瀏覽至 Sybase SDK 安裝目錄並建立一個名為 interfaces 的新檔案,如圖所示。不需要副檔名。
<pre class="copy"><code>cd /opt/sap vi interfaces</code></pre>
-
將下列資訊新增至
interfaces檔案,根據您的環境編輯欄位。servername master tcp ether Host_IP_Address Database_Port_Number query tcp ether Host_IP_Address Database_Port_Number #Connections using SSL #master tcp ether Host_IP_Address Database_Port_Number ssl="CN=host name" #query tcp ether Host_IP_Address ssl="CN=<host name"注意:請務必遵循
interfaces檔案中連線資訊的必要版面配置。
For more information about the `interfaces` file, review the Sybase documentation available at:
[https://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc35823.1572/doc/html/san1334282782407.html](https://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc35823.1572/doc/html/san1334282782407.html)
The following rules are applicable to the `interfaces` file:
- Each SAP ASE has only one entry, although there may be multiple lines in the entry.
- Each line that follows the `servername` line must begin with a space or a tab
- Each element on the line must be separated by a single space.
- Each entry is separated by a blank line.
**Example:**
<pre class="copy"><code>sybase_source master tcp ether 10.0.0.100 5000 query tcp ether 10.0.0.100 5000</code></pre>
-
儲存並關閉檔案。
-
在
interfaces檔案中建立項目之後,您可以從「管理服務」的 Web 介面建立資料庫連線,然後選取連線類型底下的伺服器名稱選項,列出interfaces檔案的 servername 值,並完成其餘的連線詳細資訊。備註:
如果在建立建置時,您未在「Oracle GoldenGate 組態輔助程式」步驟 3 的「環境變數」段落中設定
LD_LIBRARY_PATH和SYBASE變數,您將需要使用 Sybase SDK 安裝的值手動新增任何遺漏的變數,否則資料庫連線可能會失敗。您可以展開建置名稱並選取組態,從「服務管理程式」的建置頁籤新增環境變數。對部署組態所做的任何變更都需要重新啟動「管理服務」,才能讓變更生效。