|
A lot of programs like for instance Excel or Visual Studio install (partly) in the 32 bits C:\Program Files (x86) folder. As a result, if you want to connect to an Oracle database from within those applications via e.g. ODBC or the data source configuration wizard in Visual Studio the Oracle client on the machine completely flips because of the parentheses and you'll likely to get errors like:
ORA-12154: tns could not resolve the connect identifier specified or ORA-6413 connection not open problem Excel / Visual Studio

This bug is know under: 3807408 ORA-12154 or ORA-6413 Running 32-bit Oracle Software on 64-bit Windows OS
Solutions you'll find to solve this vary from 'Patch you client and server' to 'install the software in a different folder than program files'. I didn't really like the idea of patching all clients and especially didn't like the thought of having to patch our critical currentyly good functioning Oracle ERP production database because of this bug and for the second solution offered, I don't think programs like office / visual studio are used to being installed in a c:\office folder and will alway install partly in the %ProgramFiles(x86)% folder...
There's a third solution however, which I found, that's by starting the Oracle calling executable with the 8 characters long DOS path name e.g. C:\PROGRA~2\MICROS~1\Office12\excel.exe
You can find these DOS path names with the command dir/x:

If we have the complete string / path with the executable we can start / run it et voila we can ODBC, OLE DB to Oracle like we were used to do with our 32-bits XP or Vista clients! Last thing to do is to create a shortcut with the DOS path / folder string, pay attention here that if you'd copy the string in a shortcut windows automatically converts your carefully created string back to a normal in our case useless shortcut:

So you'll have to copy the string into notepad and save it as a batch file:

You can find this info spread around the web but I hope this article helps people who are as desperate as I was when I found out all my dev projects in Visual Studio and VBA projects in Excel where pretty much useless on my new Windows 7 laptop..
Live long and prosper!
Mike
ORA-12154: tns could not resolve the connect identifier specified or ORA-6413 connection not open problem Excel / Visual Studio Solved
|