設定Oracle來同時訪問多個SQL Server

來源:互聯網
上載者:User

如何在Oracle裡設定訪問多個SQL Server資料庫?假設我們要在Oracle裡同時能訪問SQL Server裡預設的pubs和Northwind兩個資料庫。

1、在安裝了Oracle9i Standard Edition或者Oracle9i Enterprise Edition的windows機器上(IP:192.168.0.2), 產品要選了透明網關(Oracle Transparent Gateway)裡訪問Microsoft SQL Server資料庫:ORACLE9I_HOME\tg4msql\admin下新寫initpubs.ora和initnorthwind.ora設定檔。

initpubs.ora內容如下:

HS_FDS_CONNECT_INFO="SERVER=SQLSERVER_HOSTNMAE;DATABASE=pubs" HS_DB_NAME=pubsHS_FDS_TRACE_LEVEL=OFF HS_FDS_RECOVERY_ACCOUNT=RECOVER HS_FDS_RECOVERY_PWD=RECOVER

initnorthwind.ora內容如下:

HS_FDS_CONNECT_INFO="SERVER=sqlserver_hostname;DATABASE=Northwind" HS_DB_NAME=Northwind HS_FDS_TRACE_LEVEL=OFF HS_FDS_RECOVERY_ACCOUNT=RECOVER HS_FDS_RECOVERY_PWD=RECOVER

$ORACLE9I_HOME\network\admin 下listener.ora內容如下:

LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.2)(PORT = 1521)) ) ) ) SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = test9) (ORACLE_HOME = d:\oracle\ora92) (SID_NAME = test9) ) (SID_DESC= (SID_NAME=pubs) (ORACLE_HOME=d:\Oracle\Ora92) (PROGRAM=tg4msql) ) (SID_DESC= (SID_NAME=northwind) (ORACLE_HOME=d:\Oracle\Ora92) (PROGRAM=tg4msql) ) )

 

重啟動這台做gateway的Windows機器上(IP:192.168.0.2)TNSListener服務(凡是按此步驟新增可訪問的SQL Server資料庫時,TNSListener服務都要重啟動)。

  • 1
  • 2
  • 3
  • 下一頁
【內容導航】
第1頁:設定Oracle來同時訪問多個SQL Server 第2頁:設定Oracle來同時訪問多個SQL Server
第3頁:設定Oracle來同時訪問多個SQL Server

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.