inittg4msql.ora文件
#HS_FDS_CONNECT_INFO="SERVER=10.61.136.196;DATABASE=dsn"
HS_FDS_CONNECT_INFO=10.61.136.196.dsn
HS_FDS_TRACE_LEVEL=DEBUG
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER两个HS_FDS_CONNECT_INFO都试过了,都不行。listener.ora文件
# LISTENER.ORA Network Configuration File: D:\oracle\ora90\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.61.136.156)(PORT = 1521))
    )
  )SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = oradb)
      (ORACLE_HOME = C:\oracle\ora90)
      (SID_NAME = oradb)
    )
          (SID_DESC=
          (SID_NAME=tg4msql)
          (ORACLE_HOME=C:\oracle\ora90) 
          (PROGRAM=tg4msql)
          )
  )tnsnames.ora文件
####################################
# TNSNAMES.ORA Configuration File:C:\oracle\ora90\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle Enterprise Manager V2
# Date..........: Tue Mar 24 15:38:44 CST 2009
####################################TG4MSQL =
  (DESCRIPTION=
    (ADDRESS_LIST=
      (ADDRESS=(PROTOCOL=TCP)(HOST=10.61.136.156)(PORT=1521))
    )
    (CONNECT_DATA=(SID=tg4msql))(HS=OK)
  )
ORADB_10.61.136.158 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.61.136.158)(PORT = 1521))
    )
    (CONNECT_DATA = (SID = oradb)(SERVER = DEDICATED))
  )ORADB_10.61.136.156 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.61.136.156)(PORT = 1521))
    )
    (CONNECT_DATA = (SID = oradb)(SERVER = DEDICATED))
  )create database link TG4MSQL connect to ZJGC identified by ZJGC using 'TG4MSQL';
select "dptcode" from dsndy_dpt@TG4MSQL;
ORA-28500: 连接 ORACLE 到非 Oracle 系统时返回此信息: 
[Transparent gateway for MSSQL]DRV_InitTdp: Could not open MS-SQL Connection
ORA-02063: 紧接着2 lines(源于TG4MSQL)这是怎么回事啊?愁死人了...

解决方案 »

  1.   

    Oracle MetaLink documents give an account of ORA-02063 as occurring when "You want to query or update a remote table and receive the following error":
    ORA-02063: preceding line from <name of a database link>This also happens when a select is issued over a database link, and not a 
    distributed transaction
    Solution Description
    --------------------The ORA-2063 indicates that this must be done at the remote database.
    Explanation
    -----------When the error is generated at the remote database it is accompanied with an
    ORA-2063. In this case the parameter distributed_transactions must be increased
    at the remote database.If there is no ORA-2063 the parameter distributed_transactions must be
    increased at the local database.In a distributed environment, if a select is issued in a session without the 
    SET TRANSACTION READ ONLY command, the select query is considered a 
    distributed transaction.If the parameter distributed_transactions is set too low, this too will result in an ORA-2042 and ORA-2063
      

  2.   

    如上
    在SQL Plus里先
    SET TRANSACTION READ ONLY
    再SELECT
    或加大distributed_transactions参数
      

  3.   

    SET TRANSACTION READ ONLY 
    是在创建dnlink之前加吗?还是在什么地方加?
    distributed_transactions的值应该加大为多少啊?
    是在init.ora里加吗?
      

  4.   

    我在创建dblink之前执行的SET TRANSACTION READ ONLY 
    distributed_transactions改为146
    出发的错误还是一样的。
      

  5.   

    sqlnet.ora文件 要设置什么吗?
    我装完oralce9i怎么没有sqlnet.ora文件啊