错误信息:ORA-28547: connection to server failed, probable Oracle Net admin error数据库服务器:oracle 10g
客户端:先安装oracle9i310,然后用instantclient-basiclite-win64-10.2.0.5覆盖bin\目录下文件如果用oracle9i310安装的bin目录下的sqlplusw.exe可以连接上数据库,但是通过程序基于(10.2.0.5版oci)却连接不上,提示上述错误信息,两种方法均在同一台客户端测试,使用相同的配置,比如tnsnames.oraoracle文档(红色部分)看不明白:
Cause: A failure occurred during initialization of a network connection from a client process to the Oracle server: The connection was completed but a disconnect occurred while trying to perform protocol-specific initialization, usually due to use of different network protocols by opposite sides of the connection. This usually is caused by incorrect Oracle Net administrative setup for database links or external procedure calls. The most frequent specific causes are:
-- The connection uses a connect string which refers to a Heterogeneous Services agent instead of an Oracle server.
-- The connection uses a connect string which includes an (HS=) specification.

Action: Check Oracle Net administration in the following ways: -- When using TNSNAMES.ORA or an Oracle Names server, make sure that the client connection to the ORACLE server uses the correct service name or SID. -- Check LISTENER.ORA on the connection end point"s host machine to assure that this service name or SID refers to the correct server. -- Confirm in TNSNAMES.ORA or the equivalent service definition that the connect string does NOT contain (HS=).哪位大侠帮帮我,谢谢!

解决方案 »

  1.   

    应该是tnanames
    文件的问题
      

  2.   

    您指的是服务端还是客户端 tnsnames.ora的问题?
      

  3.   

    把你的TNSNAMES.ORA文件贴出来看下
      

  4.   

    # TNSNAMES.ORA Network Configuration File: C:\oracle\ora90\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.#sample#DATABASENAME =
    #  (DESCRIPTION =
    #    (ADDRESS_LIST =
    #      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    #    )
    #    (CONNECT_DATA =
    #      (SERVICE_NAME = servicename)
    #    )
    #  )ORACLE =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 130.81.100.101)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = scbus)
        )
      )ORACLEBCV =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 130.81.100.136)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = scbus)
        )
      )
    REPORT =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 9.83.70.14)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = report)
        )
      )INNETDB_192.168.1.158 =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.158)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = innetdb)
        )
      )

      

  5.   

    tnsping  INNETDB_192.168.1.158 先测试一下,看看啥结果