I want to connect oracle database from AIX to Linux using user id and password only. For that I have changed
tnsnames.ora
RATARA =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = XX.XX.XX.XX)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RATARA)
)
listener.ora
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = XX.XX.XX.XX)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
Above code, I have done in my AIX machine. In the above change I have used IP address in place of HOST for both listener.ora and tnsnames.ora and PORT no has used for remote machine.
I have updated my .profile also in AIX machine:
export ORACLE_SID=RATARA
I have stop and started listener on AIX. After that not able connect using @RATARA
RATARA oracle sid name is from remote(Linux) machine which I have set in my AIX.
I am able to connect using sqlplus <user_id>/@oracle_sid but I want to connect without using @oracle_sid since my entire code project uses without @oracle_sid. Means I want to connect only sqlplus userid/pwd
Kindly provide me solution to connect using only user id and pwd for remote connection if it was missed anything for setting
Best Answer
There is no solution that would not require
@[remote_connection_info]
to connect to a remote database.ORACLE_SID
is only applicable on the actual database server, not a remote client, as this uses BEQ protocol to talk directly to Oracle processes and doesn't use the listener at all. Remote connections must use TCP protocol.Also,
listener.ora
is only for the actual database server, not the remote client. Running a listener on the client won't do anything for you. – pmdba