sql server 导入 oracle 9i,使用oracle provider for ole db 测试连接的时候总是提示测试连接失败,因为初始化提供程序是发生错误,ora-12154,这是怎么回事,我安装了oracle数据库,没有安装oracle client,是不是必须安装 oracle client才行,请各位高手指教

解决方案 »

  1.   

    ORA-12154: TNS:could not resolve service nameCause: Oracle Net could not locate the net service name specified in the tnsnames.ora configuration file.Action: Perform these steps:Verify that a tnsnames.ora file exists. See Also: 
    "Localized Configuration File Support" for configuration file location information
     
    Verify that there are not multiple copies of the tnsnames.ora file. 
    In the tnsnames.ora file, verify that the net service name specified in your connect string is mapped to a connect descriptor. 
    Verify that there are no duplicate copies of the sqlnet.ora file. 
    If you are using domain names, verify that your sqlnet.ora file contains a NAMES.DEFAULT_DOMAIN parameter. If this parameter does not exist, you must specify the domain name in your connect string. 
    If you are not using domain names, and this parameter exists, delete it or disable it by commenting it out. 
    If you are connecting from a login dialog box, verify that you are not placing an "@" symbol before your connect net service name. 
    Activate client tracing and repeat the operation. 
    Cause: Oracle Net could not locate the database service name or net service name specified in the directory server.Action: Perform these steps:Verify that the database service or net service name entry exists in the directory that this computer was configured to use. See Also: 
    Chapter 8, "Setting Up Directory Server Usage" for directory setup instructions
     
    Verify that the sqlnet.ora file includes the following entry: 
    NAMES.DIRECTORY_PATH=(ldap, other_naming_methods)
    首先要安装Oracle Client,然后保证你的tnsnames.ora配置正确.
      

  2.   

    去下载个Oracle的ADO驱动,然后正确设置TNSNAME。