A cliché, yes, but I think what cause the problem is worth noted, at least for myself. One day I was thinking about bringing home some of my work and the country in which I live and work was (and still) no high-tech developed countries where internet speed generally fast enough to remotely access a Database Server. Anyway, the problem was that I only have Oracle 9i Client installed on my laptop, I need Server. So I installed Oracle 10g Express Edition (the download took quite some time, mind you).
Everything went just fine until I was back at my office trying to run the application with the TNS configuration set to Oracle Server at the office, when it said:
Oracle TNS Error : Could not resolve the connect identifier specified
I tried TOAD to connect using the same TNS configuration and no problem occurred, which was an addition my confusion. So I called Google, worked some search and found some discussions about the topic here:http://forums.oracle.com/forums/thread.jspa?messageID=2154989
The point is that after I installed Oracle XE I had two Oracle Homes, the one used by my application was the Oracle XE’s, that’s why it won’t connect to my office’s server. One of the solutions is to use TNS_ADMIN variable, but those instructions brought me headache. I need a quick solution, my boss was coming. So my solution was to temporarily replace Oracle XE’s TNSNAMES.ORA file with the one from the Oracle 9i Client. It was a quick and certainly a dirty solution, but save me some accusing questions from my boss.
Actually if I was thinking more careful (and having more knowledge on Oracle) instead of instantly weep and ran to Google, I should have seen the Oracle Home options on TOAD’s Login Window at which displayed selections of which Oracle Home to use, then I would (probably) got the problem figured out at that moment, silly me.