Solve the problem of unable to connect sqlstate = 08004 when ODBC connects to Oracle database

Today, when using ODBC to connect to Oracle database, I reported such an error as “unable to connect sqlstate = 08004 Oracle ODBC ora-12154”. After checking on the Internet for a long time, I said that the powerdesign installation path has special characters, but I still reported this error after removing the spaces and brackets in my path. Simply remove powerdesign and connect directly with ODBC, but still report an error. At this time, I realize that it is not the problem of powerdesign installation path. Take a closer look at TNS service name, it is all garbled

The database version I use is Oracle 11g 64 bit server, and the 32-bit client is installed. The 64 bit ODBC TNS service name will be garbled. As shown in the picture above

solution:

add system environment variable

Variable name: TNS_ ADMIN

Variable value: C: app, administrator, product, 11.2.0, client_ 2\network\admin (ORACLE_ Network under home (admin)

Restart or log off after adding

    

Similar Posts: