I just uninstalled an older Oracle installation on my computer (which was working fine) and installed a new one, and the new installation can't seem to find the TNSNAMES.ORA file even though it is in the \network\admin folder of the same installation directory as \bin\sqlplus.exe - and SQLPlus works if I connect by entering the IP and SID directly.
Is there some setting that I am missing that points to TNSNAMES.ORA? I always thought it looked in \network\admin by default.
If you uninstall previous Oracle SQL client and reinstall it. There should be multiple folder as below. In windows C:\app\USER\product\ORACLE_CLENT_VERSION\client_INSTANCE-NO\network\admin Replace the upper case string with your computer path.
In Linux, it should be in ./oracle/network/admin folder.
And connection string should be like net_service_name= (DESCRIPTION= (ADDRESS=(protocol_address_information)) (CONNECT_DATA= (SERVICE_NAME=service_name)))
I guess your issue is you are still using previous version client's TNSNAMES.ORA. In the "C:\app\USER\product\ORACLE_CLENT_VERSION\client_INSTANCE-NO\network\admin", first instance installed created a client_1 (client_INSTANCE-NO) folder and second instance created a client_2 folder and so on. You need to ensure you editing latest instance TNSNAMES.ORA.