我的机器上可以用10g的客户端连接9i的。你看看你的tnsnames.ora中是怎样配置的。

解决方案 »

  1.   

    我对oracle不太了解。我一共找到了两个tnsnames.ora 我把内容贴出来请你和其他各位高手帮我看一下吧。
    第一个tnsnames.ora 的内容
     tnsnames.ora Network Configuration File: E:\Oracle\product\10.1.0\Client_1\NETWORK\ADMIN\tnsnames.ora
    # Generated by Oracle configuration tools.JIANG =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.11)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = orcl)
        )
      )第二个TNSNAMES.ORA的内容
    # This file contains the syntax information for 
    # the entries to be put in any tnsnames.ora file
    # The entries in this file are need based. 
    # There are no defaults for entries in this file
    # that Sqlnet/Net3 use that need to be overridden 
    #
    # Typically you could have two tnsnames.ora files
    # in the system, one that is set for the entire system
    # and is called the system tnsnames.ora file, and a
    # second file that is used by each user locally so that
    # he can override the definitions dictated by the system
    # tnsnames.ora file.# The entries in tnsnames.ora are an alternative to using
    # the names server with the onames adapter.
    # They are a collection of aliases for the addresses that 
    # the listener(s) is(are) listening for a database or 
    # several databases.# The following is the general syntax for any entry in 
    # a tnsnames.ora file. There could be several such entries 
    # tailored to the user's needs.<alias>= [ (DESCRIPTION_LIST =  # Optional depending on whether u have 
    # one or more descriptions
    # If there is just one description, unnecessary ]
      (DESCRIPTION=
        [ (SDU=2048) ] # Optional, defaults to 2048
    # Can take values between 512 and 32K
        [ (ADDRESS_LIST=    # Optional depending on whether u have
    # one or more addresses
    # If there is just one address, unnecessary ]
          (ADDRESS=
    [ (COMMUNITY=<community_name>) ] 
    (PROTOCOL=tcp)
    (HOST=<hostname>)
    (PORT=<portnumber (1521 is a standard port used)>)
          )
          [ (ADDRESS=
      (PROTOCOL=ipc)
      (KEY=<ipckey (PNPKEY is a standard key used)>)
    )
          ]
          [ (ADDRESS=
      [ (COMMUNITY=<community_name>) ]
      (PROTOCOL=decnet)
      (NODE=<nodename>)
      (OBJECT=<objectname>)
    )
          ]
                  ... # More addresses
        [ ) ] # Optional depending on whether ADDRESS_LIST is used or not 
        [ (CONNECT_DATA=
    (SID=<oracle_sid>)
    [ (GLOBAL_NAME=<global_database_name>) ]
          )
        ]
        [ (SOURCE_ROUTE=yes) ]  
      )
      (DESCRIPTION=     
        [ (SDU=2048) ] # Optional, defaults to 2048
    # Can take values between 512 and 32K
        [ (ADDRESS_LIST= ] # Optional depending on whether u have more
    # than one address or not
    # If there is just one address, unnecessary
          (ADDRESS
    [ (COMMUNITY=<community_name>) ]
    (PROTOCOL=tcp)
    (HOST=<hostname>)
    (PORT=<portnumber (1521 is a standard port used)>)
          )
          [ (ADDRESS=
      (PROTOCOL=ipc)
      (KEY=<ipckey (PNPKEY is a standard key used)>)
             )
          ]
          ...  # More addresses
        [ ) ]  # Optional depending on whether ADDRESS_LIST  
    # is being used
        [ (CONNECT_DATA=
    (SID=<oracle_sid>)
    [ (GLOBAL_NAME=<global_database_name>) ]
          )
        ]
        [ (SOURCE_ROUTE=yes) ]
      )
      [ (CONNECT_DATA=
          (SID=<oracle_sid>)
          [ (GLOBAL_NAME=<global_database_name>) ]
        )
      ]
      ...   # More descriptions 
    [ ) ] # Optional depending on whether DESCRIPTION_LIST is used or not
      

  2.   

    你是用什么工具执行什么命令后出现上面的错误信息?我是用sqlplus来做的。上面第一个tnsnames.ora,就是在network\admin下面的那个,是实际配置文件。另一个是sample。
      

  3.   

    用oracle net manager,进行连接测试时出现的错误信息!用sqlplus怎么做啊?出现这样的情况应该是哪儿的问题啊?盼指教!
      

  4.   

    在9i下面怎么连在这里还怎么连接,前提是你保证你的数据库已经启动正常
    D:\Oracle\product\10.1.0\Client_1\NETWORK\ADMIN\tnsname.ora,编辑该文件
    内容如下:
    HG =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.100.4)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = hg)
        )
      )
    10.10.100.4是数据库服务器的地址,1521是oracle默认的数据库访问端口,SERVICE_NAME = hg,这里的hg是你的数据库实例名称