Oracle Client No Likey Parentheses In Folder Names

posted @ Wednesday, January 24, 2007 12:00 AM

 

So I just have to write this down in case anyone else every encounters this problem.  I spent most of the afternoon troubleshooting a problem with one of my applications not connecting to an Oracle database during acceptance testing.  Here was the situation...

Most of our current projects are smart client applications using WCF for the application tier.  So part of my build script packages up a couple WCF service hosts, one which can be run in a Console Application and another as a Windows Service.  So I have a set of automated acceptance tests which perform end-to-end testing of the application using an already running WCF service host. 

First I would fire up the Console Service Host from my build directory (i.e. trunk\build), run my acceptance tests and everything is just peachy. 

Then I installed the Windows Service under C:\Program Files\Some Service Host (Test) (since I'm simulating a test environment) which starts up the exact same WCF services as the Console Service Host.  Run my acceptance tests and crikey, I would get this error message:

Oracle.DataAccess.Client.OracleException ORA-12154: TNS:could not resolve the connect identifier specified

So I triple-check (probably more than that) the code in the console app and the windows service (which both use the same class for starting up the services) and compare the configs which are identical.  Then I finally copied over the console app to the same folder as the windows service, C:\Program Files\Some Service Host (Test), and I got the same error message when running the Console Service Host from that folder. 

So I took a long shot and googled OracleException "Program Files" since it only happens when run under the Program Files directory.  I really didn't expect to find anything about that, but I was desperate.  Well, just so happens I found this forum post that explained what was going on.  Apparently the Oracle client has a documented bug with folder names that have parentheses in them!!!  Here's a quote...

"This turned out to be a problem with the Oracle 32bit Client (version 10.2.0.1)  when running an application from the folder "Program Files (x86)" that contains parenthesis. This issue is Oracle bug 3807408 and can be fixed by applying 10.2.0.1 Patch 6. This can be downloaded from MetaLink if you have an account:
http://updates.oracle.com/ARULink/PatchDetails/process_form?patch_num=5059238"

So instead of worrying about downloading the patch (which apparently I need to create an account to get) and installing it on my workstation and on the build servers, I just renamed my folder to Some Service Host - Test instead.  :)

So hopefully this will save at least one person from blowing away most of an afternoon narrowing down this creepy little bug.  Ahh, now I can get back to my deployment.  :)

Comments
Derek - 1/14/2008 2:28 AM
# re: Oracle Client No Likey Parentheses In Folder Names
I found your blog about this only after realising the problem and adjusting my google search to include the phrase "parenthesis". But I'm glad I'm not the only person to waste a day and a half trying to debug Oracle tnsnames.ora files and connection problems. :)
M Relva - 9/24/2008 3:34 PM
# re: Oracle Client No Likey Parentheses In Folder Names
Man, me and 3 people spent almost 2 days because this problem...
Post Comment






Please add 8 and 8 and type the answer here: