I have an interesting problem. I was able to fix but unsure of why it worked. I am looking to see if anyone can explain, as I cannot after 2 days. I tried to make the below as precise and as simple as I could.
On a Unix HP server, I have one 8i database and one 10.1.x database running. They each have the own separate ORACLE_HOMEs. They each have their own tnsnames.ora file. The variable TNS_ADMIN is pointing to the respective correct place.
In the 10.1.x database, I have a link going to another 10.1.x database on another server. Logging in to sqlplus, I can use the link successfully (by querying global_name). I can tnsping okay. Snapshots using the same link are okay. Essentially the 10.1.x database is using it’s tnsnames.ora as expected.
The problem occurs when using Oracle’s Advanced Queueing. AQ’ing is using the 8i tnsnames.ora file. I know this, as we started to get ora-12541 errors when the AQ processes were running. After 2 days I could not figure out why, so on a lark I changed the 8i tnsnames.ora file, where it was incorrect, and then AQ’ing started to work. And yes, AQing is using the same link as I was.
So what I am seeing is AQ’ing is using the 8i tnsnames.ora to resolve the link and non AQ processing (snapshots, sqlplus, etc) is using the 10g tnsnames.ora to resolve the link.
Any ideas? I am out of ideas.