oracle 11g gateway 连接sqlserver 2005 ,ORA-28545解决

安装好oracle 11g transport gateway,原本机器上已经存在oracle 10g database,同是windows 2003 64bit平台上的。

1.在tg_1\dg4msql\admin新建一个init+[sid].ora文件,命名为initef2kweb.ora,实例名为ef2kweb。编辑文件内容如下:

HS_FDS_CONNECT_INFO=172.19.1.36//ef2kweb
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER

其中172.19.1.36为sqlserver所在的host,ef2kweb为databasename。

2.因为和原先的database为同一台,安装完gateway后,会自动新建一个11g的listener。编辑内容如下:

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ks55.dynapack.com.tw)(PORT = 1521))
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = d:\oracle\product\10.2.0\db_1)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (SID_NAME = EF2KWEB)
      (ORACLE_HOME = d:\oracle\product\11.2.0\tg_1)
      (PROGRAM = dg4msql)
    )
  )

3.tnsnames.ora 添加如下内容

EF2KWEB =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.19.128.55)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = ef2kweb)
    )
    (HS = OK)
  )

4建立dblink

create public database link EF2KWEB
  connect to SPC indentified by SPC
  using 'EF2KWEB';

 

建立dblink,查询相关语句后报ORA-28545:Error Diagnosed By Net8 When Connecting To An Agent

解决方式如下:

将gateway的listener换个端口号:listener内容编辑如下:

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ks55.dynapack.com.tw)(PORT = 1523))
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = d:\oracle\product\10.2.0\db_1)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (SID_NAME = EF2KWEB)
      (ORACLE_HOME = d:\oracle\product\11.2.0\tg_1)
      (PROGRAM = dg4msql)
    )
  )

tnsnames.ora中的服务端口号也改掉

EF2KWEB =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.19.128.55)(PORT = 1523))
    )
    (CONNECT_DATA =
      (SID = ef2kweb)
    )
    (HS = OK)
  )

 

重启监听后OK,可以查询。

 

 

 

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7958405/viewspace-709161/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7958405/viewspace-709161/

你可能感兴趣的:(oracle 11g gateway 连接sqlserver 2005 ,ORA-28545解决)