I'm trying to understand tnsnames.ora on my unix boxes. I have 9i installed on HP-UX and Tru64. From my windows machine, I can connect to them both using sqlplus.
To connect to the DBs on either machine from windows, I used the net config assistant. For the Service Name, I give the global dbname. At the end of the creation, it automatically fills in the Net Service Name with just the SID. This way, I can connect with sqlplus user/pass@SID. It also created an sqlnet.ora file.
I have 2 problems on UNIX:
1. how do I configure tnsnames.ora to be able connect to a DB on another machine?
2. how do I configure tnsnames.ora to be able to connect to a local database?
The problem is that I don't know the dependence between Service Name, the connection identifier, sqlnet.ora, and ORACLE_SID.
If I'm on the HP-UX machine and I try to connect to the Tru64 machine, I put in my tnsnames.ora file:
I think I sort of understand the sqlnet.ora file now. I've set
NAMES.DEFAULT_DOMAIN = subnet.company.com
and changed my tnsnames for the local DB:
so when I use
I can connect to the network db. When I do
I no longer get the error ORA-12154, but now I get
ORA-12541: TNS:no listener. I've looked at my listener.ora file, and I have:
(DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = hpdb)) )
(ADDRESS = (PROTOCOL = TCP)(HOST = hpux.subnet.company.com)(PORT = 1521))
Is this not enough? Do I need to add it to the SID_LIST_LISTENER?