消息关闭
    暂无新消息!
环境:oracle db ,sql server db, oracle gateway 分别在不同电脑,

进入$GATEWAY_HOME\tg_1\dg4msql\admin,配置 initdg4msql.ora

                                HS_FDS_CONNECT_INFO=[sqlserver ip]/MSSQLSERVER/JYDB
                                HS_FDS_TRACE_LEVEL=OFF
                                HS_FDS_RECOVERY_ACCOUNT=RECOVER
                                HS_FDS_RECOVERY_PWD=RECOVER

进入$GATEWAY_HOME\network\admin下,编辑listener.ora

SID_LIST_LISTENER =
  (SID_LIST =
 
    (SID_DESC =
      (SID_NAME = dg4msql)
      (ORACLE_HOME =  D:\product\11.2.0\tg_1)
      (PROGRAM = dg4msql)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = gateway ip)(PORT = 1522))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
    )
  )

ADR_BASE_LISTENER = D:\product\11.2.0\tg_1


启动网关监听,LSNRCTL.EXE

创建dblink
         create database link  mslink 
           connect to “zh” identified by “mm”
           using '  (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=gateway ip)(PORT=1522))
    (CONNECT_DATA=(SID=dg4msql))
    (HS=OK)
  )  '

4个回答

︿ 1
我在网上找了几个教程,里面配置的ip很混乱,
    (ORACLE_HOME =  D:\product\11.2.0\tg_1)
     (ADDRESS = (PROTOCOL = TCP)(HOST = gateway ip)(PORT = 1522))   
     (ADDRESS=(PROTOCOL=tcp)(HOST=gateway ip)(PORT=1522))
请指点小弟
︿ 0
还有 我查询sql server表的时候,执行sql语句过半分钟才给我报错ora-28545,这是怎么回事,如果失败怎么这么久才报错