Error creating connection to Oracle ODBC in Excel

2019-09-21 15:54发布

问题:

I am trying to connect to Oracle ODBC for OraClient10g_home1 in System DSN.once done,i have tested the connection and it says connection successful.but when i try to import Oracle data from Excel's built-in function (Microsoft Query),it gives me the following error message.please let me know how to fix this issue.

Oracle Database Server - 32 Bit,Operating System - Windows 10(64-Bit),Excel Office 2010 (32-Bit)

回答1:

in tnsnames.ora you should have an entry for database instance located in target server like :

Test=
 (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST=target server)(PORT=1521))
    )
    (CONNECT_DATA =
      (SID = orcl)
    )
  )

then tnsping Test in cmd should work fine. you will use this tns entry in your odbc.