connect to remote db without @oracle_sid (Unix)
One can configure net8 on a Unix box which will allow the dba to set his oracle_sid/export oracle_sid to a instance running on a different server. the database connect info is in tnsnames.ora.
i have oracle_sid set to 'live' on serverA
i have a test instance on serverB which is configured in tnsnames.ora.
I set ORACLE_SID=test, export ORACLE_SID
Error: 'Oracle not available' - it is trying to look for the 'test' instance on serverA(my current connected server) instead of remotely on serverB.
however if i issue the following command:
sqlplus username/password@test - the instance is found on serverB and connection established.
Why when I change the ORACLE_SID and export it I still have to qualify the SID i am trying to connect to (in this case have to add '@test' to the end of the sqlplus connect statement?)
I need to be able to set Oralce_Sid's and connect to remote databases without having to add @oracle_sid to the sqlplus connect statement, i have been able to do this before but for some reason i have gone blank here and am having trouble figuring it out.
sqlplus username/password (without having to enter @oracle_sid), connects without problems when establishing a connection to the instance on the server i am currently on.
Once you have eliminated all of the impossible,
whatever remains however improbable,
must be true.
ORACLE_SID is looking on the local machine (i.e not using tnsnames / the listener - bypassing the network)
Setting TWO_TASK will have the effect you want, i.e export TWO_TASK=test
sqlplus username/password and you will connect to your remote database
Click Here to Expand Forum to Full Width