萬盛學電腦網

 萬盛學電腦網 >> 數據庫 >> oracle教程 >> oracle透明網關環境的建立

oracle透明網關環境的建立

1、安裝oracle 的transparent gateway 透明網關。
安裝ORACLE 選擇自定義安裝, 然後再選擇 安裝透明網關,再進去選擇 安裝FOR SQLSERVER 的組件。
2、修改 oraclehomeora92tgsmsqladmininittg4msql.orq 文件

HS_FDS_CONNECT_INFO="SERVER=YIRONG-NO1;DATABASE=jsoct"
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER
說明 可以通過 ORACLE 工具中的migration WorkBench 進行配置。(過程中需要配置ODBC)

3、建立監聽 修改oracle 的 oraclehomeora92networkadminlistener.ora 文件。


# LISTENER.ORA Network Configuration File: F:oracleora92networkadminlistener.ora
# Generated by Oracle configuration tools.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = yirong-no1)(PORT = 1521))
)

)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = F:oracleora92)
(PROGRAM = extproc)
)

(SID_DESC =
(GLOBAL_DBNAME = ora9i2)
(ORACLE_HOME = F:oracleora92)
(SID_NAME = ora9i2)
)

#連接 sqlserver
(SID_DESC =
(GLOBAL_DBNAME = tg4msql)
(PROGRAM = tg4msql)
(SID_NAME = tg4msql)
(ORACLE_HOME = F:oracleora92)
)

)

4、修改TNS

TG4MSQL =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
(CONNECT_DATA=(SID=tg4msql))
(HS=)
)

5、創建DBLINK 說明建立的 用戶名,密碼要是 SQLSERVER 的用戶名和密碼
create PUBLIC DATABASE LINK oratoSql
CONNECT TO sa IDENTIFIED BY "lanwei"
USING 'TG4MSQL' ;

6、測試數據的是否正常檢索。

copyright © 萬盛學電腦網 all rights reserved