Page 1 of 1

TNS:could not resolve service name

Posted: Thu Sep 07, 2006 8:50 am
by sudhakar_viswa
Hi,

I am getting the following problem frequently.

TNS:could not resolve service name

some times jobs are running finely.Some times it is throwing above error.
Each time i am processing the same data.Can anybody suggest me the solution.

Thanks & Regards,
-- sudhakar

Posted: Thu Sep 07, 2006 9:06 am
by meena
Hi,
Check this post:

viewtopic.php?t=92460

May give you some idea. If not you need to check with your DB admin regarding the connection.
TNS:could not resolve service name

some times jobs are running finely.Some times it is throwing above error.
Each time i am processing the same data.

Posted: Thu Sep 07, 2006 9:47 am
by srinagesh
Go to Oracle Home on your unix box and check for tnsnames.ora file in $ORACLE_HOME/network/admin folder

find out if the Entry for Database exists in the tnsnames.ora file.

check if the tnsnames.ora is a local file or is it a file on the network (mounted using automout). If it is a file on the Network share, check for the network connectivity.
TNS:could not resolve service name
some times jobs are running finely.Some times it is throwing above error.
Each time i am processing the same data.

Posted: Thu Sep 07, 2006 11:37 am
by sudhakar_viswa
Hi,

Thanks for reply.I could not get the solution.

Thanks & Regards,
-- sudhakar

Posted: Thu Sep 07, 2006 12:01 pm
by prabu
sudhakar_viswa wrote:Hi,

Thanks for reply.I could not get the solution.

Thanks & Regards,
-- sudhakar
please try the following in the same order

1) type

Code: Select all

which tnsping
2) if 1 returns the path then
cd to the path returned by 1
else

Code: Select all

      find . -name tnsping 2>/dev/null
cd the path retured from above
end if

3)

Code: Select all

tnsping SERVICE_NAME
if failure on 3
open your .dsenv file [find it in the same way as 2 else part]
vi .dsenv
type /TNS
goto the path returned by TNS and add the missing entry
this entry you can get from your DBA or the dev team

4)based on 3 set your ORACLEHOME

Code: Select all

   setenv ORACLE_HOME name
please let me know if this helps![/code]

Posted: Thu Sep 07, 2006 3:45 pm
by ray.wurlod
:idea: Sounds like getting a briefing on the basics from your Oracle DBA would not be a bad idea either!