Home » Infrastructure » Unix » TNS could not resolve service name
TNS could not resolve service name [message #97300] Tue, 26 February 2002 22:50 Go to next message
payal
Messages: 6
Registered: February 2002
Junior Member
HI

I installed Oracle 8.1 Ent edition and the Forms and Reposrts developer (6i). My problem is that i cant connect the backend to the front end. I always get the error ORA -12154 TNS: could not resolve service name. My O/S is Windows 2000. The TNSnames ORA file look like -

# TNSNAMES.ORA Network Configuration File: C:orant4networkadmintnsnames.ora
# Generated by Oracle configuration tools.

DB4 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = payal)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = db4)
)
)

INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = payal)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = db4)
(PRESENTATION = http://admin)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC7))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

I can work on the database through SQL, but just cant connect the front end to the back end...any ideas??
Re: TNS could not resolve service name [message #97302 is a reply to message #97300] Wed, 27 February 2002 10:09 Go to previous messageGo to next message
Grant
Messages: 578
Registered: January 2002
Senior Member
Check your TNS_ADMIN setting in your registry for both "homes" and make sure you have the right path to the correct tnsnames file or copy the right one to both directories.
Re: TNS could not resolve service name [message #97332 is a reply to message #97300] Fri, 15 March 2002 03:14 Go to previous messageGo to next message
payal
Messages: 6
Registered: February 2002
Junior Member
hey thxs for replying!

i did check those and made some changes...but still doesnt owrk...can u take a look at them...my Oracle 8i home name is orant4 and the developer one is orant3dk...

TNS of oracle 8i

# TNSNAMES.ORA Network Configuration File: C:orant4networkadmintnsnames.ora
# Generated by Oracle configuration tools.

DB4 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = local)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = db4)
)
)

INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = local)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = db4)
(PRESENTATION = http://admin)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC7))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

and for the forms and reports...
Beq-local.world =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = beq.world)
(PROTOCOL = BEQ)
(PROGRAM = oracle73)
(ARGV0 = oracle73ORCL)
(ARGS = '(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))')
)
)
(CONNECT_DATA = (SID = db4sid)
)
)
Tcp-loopback.world =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = tcp.world)
(PROTOCOL = TCP)
(Host = 127.0.0.1)
(Port = 1521)
)
)
(CONNECT_DATA = (SID = db4sid)
)
)
Example1.world =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = tcp.world)
(PROTOCOL = TCP)
(Host = Production1)
(Port = 1521)
)
)
(CONNECT_DATA = (SID = db4sid)
)
)
Example2.world =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = spx.world)
(PROTOCOL = SPX)
(Service = Server_lsnr)
)
)
(CONNECT_DATA = (SID = db4sid)
)
)
Example3.world =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = nmp.world)
(PROTOCOL = NMP)
(Server = FinanceServer1)
(Pipe = ORAPIPE)
)
)
(CONNECT_DATA = (SID = db4sid)
)
)
Rep60_PAYAL-orant3dk,Rep60_PAYAL-orant3dk.world=(ADDRESS=(PROTOCOL=tcp)(HOST=PAYAL)(PORT=1949))

Thanks! : )
Re: TNS could not resolve service name [message #97334 is a reply to message #97300] Fri, 15 March 2002 08:08 Go to previous messageGo to next message
Grant
Messages: 578
Registered: January 2002
Senior Member
I am not sure what you are doing. What are the server names, SIDs for each server, and port the listener is listening on? Each server must be able to ping/communicate bi-directionally. The port number in the tnsnames file must match the listener port number on that server. Each server hosting a database has to have a reference (alias) in the tnsnames file and an alias for any remote DB it needs to communicate with for example.

Name SID
SRV1 SID1
SRV2 SID2

On SRV1:

SID1.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = SRV1)(PORT = 1521))
)
(CONNECT_DATA =
(SID = SID1)
)
)

SID2.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = SRV2)(PORT = 1521))
)
(CONNECT_DATA =
(SID = SID2)
)
)

On SRV2:

SID2.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = SRV2)(PORT = 1521))
)
(CONNECT_DATA =
(SID = SID2)
)
)

SID1.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = SRV1)(PORT = 1521))
)
(CONNECT_DATA =
(SID = SID1)
)
)
Re: TNS could not resolve service name [message #97417 is a reply to message #97300] Fri, 26 April 2002 20:14 Go to previous message
talasu
Messages: 1
Registered: April 2002
Junior Member
Hello!
Can any body help me on the same with some different issue...

Some times I am also facing the same problem...
In our case, after loading Oracle Client in our PC's (OS : Windows 95/98).. i created one alias name( service name) eg:pbs by Oracle Net8 Easy Config..i had given all the parameters propely (like Portno , Tcp/Ip Protocol,
Hostname Severs Ipaddress or Sever Host Name, SID database name..i tested for connection ...when i am giving userid and password its getting connected to database...
I am able to connect server by SQL client...
But the Problem is , when ever am going to configure my front end software with Oracle Client ...
In front end S/W , i have to give Server Name , Userid and Password ...
Syntax:
Server Name 0r Host String :
@tns:sevice name 0r Alias Name
Userid: ( example : Raja)
Password:( example: Ramu )...

here, when am clicking the button for connection testing...am getting
Ora-12154..TNS could not resolve service name

I checked all the parameters in Listener.Ora in Server and Tnsnames.Ora ,SqlNet.Ora in Client machine..

NOTE:We are not using ODBC DSN (Microsoft ODBC driver for Oracle or Oracle ODBC Driver) for client and front End S/W connectivity..

Our way of Diagnosis: Just by Formatting the PC and by reloading the windows..as this problem occurs very rarely..we are following this method..we know that its not a Good Practise...

If any body knows the Solution for this, pls help me out
Previous Topic: Re: install oracle8 &form6 but tns error
Next Topic: Re: help help what to do migration of oracle8 to oracle 8i
Goto Forum:
  


Current Time: Sun Sep 27 22:39:02 CDT 2020