Operating System - HP-UX
1752518 Members
5290 Online
108788 Solutions
New Discussion юеВ

Re: Oracle Output: ORA-12154: TNS:could not resolve the connect

 
Javier  Hernandez (Vene
Occasional Contributor

Oracle Output: ORA-12154: TNS:could not resolve the connect

I have the problem with:Oracle Output: ORA-12154: TNS:could not resolve the connect.

I have 2 instance in the same server, but i don't knows if its possible.Configure 2 instance of SAP in Data Protector 6.0 in the same server.
The client server is Windows server
I think so , that the problem is Enviromen Variables


Someone can help me with this problem

Thank you very
8 REPLIES 8
Rita C Workman
Honored Contributor

Re: Oracle Output: ORA-12154: TNS:could not resolve the connect

I'm not a SAP person, but on our boxes we run several Oracle instances. So seems like you should be able to similar.

Confirm your tns file is correct.

Then...., it may be the problem is just resolution. I'd be looking to do a reverse lookup from a client station and ensure it resolves correctly first using 'nslookup ' then 'nslookup '.
See if you get the correct results...

Just a thought,
Rita
skt_skt
Honored Contributor

Re: Oracle Output: ORA-12154: TNS:could not resolve the connect

if you can confirm the connection to the server where the DB is hosted is perfect then definitly some internal things to Oracle. What is the response time you get while doing a tnsping to the instance
Javier  Hernandez (Vene
Occasional Contributor

Re: Oracle Output: ORA-12154: TNS:could not resolve the connect

thank for yours ask

Remember that I have 2 instances on the same server, so I have 2 tnsname.ora and sqlnet.ora.

The files are correct.

When I run the nslookup appear :

C:\Documents and Settings\pdiadm>nslookup 192.168.40.18
Server: pssw2dc01.netpolar.com
Address: 200.5.129.5

Name: pssw2ap128.netpolar.com
Address: 192.168.40.18


the server pssw2ap28 is who has the 2 instances
Gokul Chandola
Trusted Contributor

Re: Oracle Output: ORA-12154: TNS:could not resolve the connect

Hi,
The ORA-12154 is a very common error, always related to your local copy of the tnsnames.ora file, your listener configuration and your database name aliases.

* Make sure that your listener is listening for the same service name that you are using.

* Your service name might have an alias, so check for global (world) entries and local entries. Check $ORACLE_HOME/network/admin/tnsnames.ora.

* Check your global_name

******** We can install multiple SID in a single server, as I am using two SAP System in a single machine.

Please put information of your both server detail in listener file.

You can check the listener status for Both SID.

Regards,
Gokul Chandola
There is always some scope for improvment.
IMGERALD
Occasional Advisor

Re: Oracle Output: ORA-12154: TNS:could not resolve the connect

I have 12 servers each hosts 20-25 instances with 2 sets of binaries (9i and 10G). They are all controled by one 10G listener(that's right 1 port), and 1 tnsnames.ora, 1 sqlnet.ora (made possible by using ifile and or softlink). Post your tnsnames.ora, listener.ora from your Oracle server. Post your tnsnames.ora, sqlnet.ora from your client. Is your server IP address and FQDN host coded in /etc/hosts file? Post all and I can suggest area where it may need attention.
Javier  Hernandez (Vene
Occasional Contributor

Re: Oracle Output: ORA-12154: TNS:could not resolve the connect

Thank for yours helps


Its the listener for the instances:

Instance: PDI

################
# Filename......: listener.ora
# Created.......: created by SAP AG, R/3 Rel. >= 6.10
# Name..........:
# Date..........:
# @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/LISTENER.ORA#4 $
################
ADMIN_RESTRICTIONS_LISTENER = on
LISTENER =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = IPC)
(KEY = PDI.WORLD)
)
(ADDRESS=
(PROTOCOL = IPC)
(KEY = PDI)
)
(ADDRESS =
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = pssw2ap128)
(PORT = 1528)
)
)
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10
TRACE_LEVEL_LISTENER = OFF
LOG_DIRECTORY_LISTENER= Q:\oracle\PDI\102\network\log
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PDI)
(ORACLE_HOME = Q:\oracle\PDI\102)
)
)


Instance: PDM


################
# Filename......: listener.ora
# Created.......: created by SAP AG, R/3 Rel. >= 6.10
# Name..........:
# Date..........:
# @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/LISTENER.ORA#4 $
################
ADMIN_RESTRICTIONS_LISTENER = on
LISTENER =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = IPC)
(KEY = PDM.WORLD)
)
(ADDRESS=
(PROTOCOL = IPC)
(KEY = PDM)
)
(ADDRESS =
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = pssw2ap128)
(PORT = 1527)
)
)
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10
TRACE_LEVEL_LISTENER = OFF
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PDM)
(ORACLE_HOME = H:\oracle\PDM\102)
)
(SID_DESC =
(SID_NAME = PDM)
(ORACLE_HOME = H:\oracle\PDM\102)
)
)

The problem continue.

I'm verified

*Hosts
*Listener
*tnsname

I think that the files are fine


Thanks
Volker Borowski
Honored Contributor

Re: Oracle Output: ORA-12154: TNS:could not resolve the connect

Hello,

yes with windows this is a tricky setup.
Since under Windows the dataprotector Service needs to run as the SAPServiceSID account you'll have at least trouble with the other SID not belonging to this Service User.

Configure one System first straight forward according to the book. When this runs fine, you configure the second System. During this configuration you'll need to provide the ORACLE_HOME and ORACLE_SID of the second system. I'd assume this is where your fault is located. May be you just gave the second ORACLE_SID, but the first ORACLE_HOME and therefore only the tnsnames.ora of the first system is found and the second one can not be resolved.

As for brbackup and brarchive, you'll need to set
SAPDATA_HOME
SAPBACKUP
SAPARCH
SAPREORG
SAPTRACE
for the second system in addition, because the defaults from your SAPServiceSID-User point to the first system.

Good luck
Volker
IMGERALD
Occasional Advisor

Re: Oracle Output: ORA-12154: TNS:could not resolve the connect

For PDM, try the following 2 entries in your tnsnames.ora on your client machine.


PDM = (DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=pssw2ap128)(PORT=1527))
(CONNECT_DATA=(SID=PDM)(SERVER=DEDICATED))
)

PDM.WORLD = (DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=pssw2ap128)(PORT=1527))
(CONNECT_DATA=(SID=PDM)(SERVER=DEDICATED))
)
=========================================
Your SQLNET.ORA should have something like this

SQLNET.AUTHENTICATION_SERVICES= (NTS)

NAMES.DIRECTORY_PATH= (TNSNAMES)