This is my first ever post to any forum so, dont let this go in vain...........
Here is the scenario........
I have logged into the unix where oracle_sid is initialized for some X database in the .profile.
I have a unix script where some sql query which fetches data from X database.
Now, i need to connect to some other database say Y, I have set the ORACLE_SID to point to Y. But, when i try to connect to that database i get the following error "ORA-12154: TNS:could not resolve service name".
This is more an Oracle related question. The message comes from you TNS Listener that he doesn't know where to find the requested SID. They should be specified in tnsnames.ora AFAIK.