Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

Interesting Problem with Oracle

SOLVED
Go to solution

Interesting Problem with Oracle

Hi,

I am working D class HP9000 machine.

I am able to mount the database,able to start listener.

But when i try to connect with Database user with the tnsnames. It says "tns could not resolve service name"

I checked tnsnames.ora file ...the entries are there for same tnsname.

can somebody guide me ? how should i proceed?

Thanks
Ganesh
Interested to learn HP-unix,Sun and problem solving
22 REPLIES
MANOJ SRIVASTAVA
Honored Contributor

Re: Interesting Problem with Oracle

Hi Ganesh

I think you are working on the new OS , how is the system able to resolve its name . Do a nslookup and nslookup I think there is some issue with your resolv.conf or nssswitch file , all you can do is to rename the resolve.conf if you entries are good in /etc/hosts.



Manoj Srivstava

Re: Interesting Problem with Oracle

hi manoj,

I checked nslookup for host and ip ..its working fine.

I am able to connect for database user without tnsname , but not with tnsname.

how should i do this?

ganesh
Interested to learn HP-unix,Sun and problem solving
Helen French
Honored Contributor

Re: Interesting Problem with Oracle

Hi Ganesh:

Some options:

1) Check the permission of tnsnames.ora file
2) Make sure that your SID is in the tnsnames.ora file
3) Make sure that the listener knows that the SID is in the tnsnames.ora file.
4) If you are using NNM, then there can be a problem while resolving the names. Then you need to edit the file -/home/dba/oracle/product/8.0.6/network/admin/sqlnet.ora - and comment out this line:

NAMES.DEFAULT_DOMAIN

HTH,
Shiju
Life is a promise, fulfill it!

Re: Interesting Problem with Oracle

Dear Manoj,

can you tell me how should i check that on which IP,database is running as I have to IPs for one NIC in the same machine.

Is this tns error is related to that?

I checked group and and permissions for the unix user from which i was connecting to db ..all are correct.

please guide me.

ganesh
Interested to learn HP-unix,Sun and problem solving
Wodisch
Honored Contributor

Re: Interesting Problem with Oracle

Hi,

my guess would be just the opposite: you don't have a "sqlnet.ora" file and hence all your TNSnames are too complicated (having some kind of ".something" appended).
So check, wether you have a "sqlnet.ora" in "$ORACLE_HOME/network/admin" or "/etc" ("/etc" wins if both exist!).

HTH,
Wodisch

Re: Interesting Problem with Oracle

Hi,

I check sqlnet.ora file

It is in $ORACLE_HOME\network\admin
but not in \etc

so what next?

ganesh
Interested to learn HP-unix,Sun and problem solving
John Palmer
Honored Contributor
Solution

Re: Interesting Problem with Oracle

Also ensure that you only have one tnsnames.ora file.

I believe that Oracle searches for it as follows:

1. TNS_ADMIN environment variable.
2. $ORACLE_HOME/network/admin
3. /etc

Regards,
John

Re: Interesting Problem with Oracle

hi,

I ensured that in ENV variables

1.TNS_ADMIN is set to
$ORACLE_HOME/network/admin

2.what about etc? what shall i check for etc?

ganesh
Interested to learn HP-unix,Sun and problem solving

Re: Interesting Problem with Oracle

hi,

I checked for tnsnames.ora file it is only in
$ORACLE_HOME/network/admin directory.

ganesh
Interested to learn HP-unix,Sun and problem solving
Dave Chamberlin
Trusted Contributor

Re: Interesting Problem with Oracle

Where is the user connecting from and using what?
Joseph C. Denman
Honored Contributor

Re: Interesting Problem with Oracle

Ganesh,

It might help if you post your tns entry. Also, what version of oracle are you using????


...jcd...
If I had only read the instructions first??

Re: Interesting Problem with Oracle

hi,

here is tnsnames.ora
======================================
#
# Installation Generated Net8 Configuration
# Version Date: Oct-27-97
# Filename: Tnsnames.ora
#
extproc_connection_data =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = TGM1))
(CONNECT_DATA = (SID = extproc))
)

TGM1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL= TCP)(Host = hux9)(Port= 1521))
(CONNECT_DATA = (SID = TGM1))
)

TGM1_BEQ =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = BEQ)(PROGRAM = /oracle/app/oracle/product/8.0.6)
(argv0 = oracleTGM1)
(args = '(DESCRIPTION = (LOCAL=YES)(ADDRESS=(PROTOCOL=BEQ)))')
(envs = 'ORACLE_HOME=/oracle/app/oracle/product/8.0.6,ORACLE_SID=TGM1')
)
)
=======================

Oracle i am using is 8.0.6

ganesh
Interested to learn HP-unix,Sun and problem solving
Eric Z
Occasional Advisor

Re: Interesting Problem with Oracle

One possible reason is that you have a domain name in your sqlnet.ora but do not have corresponsive TNS name.

Say, there is domain name called my_domain in SQLNET.ora. When Oracle client do the resolution, it automatically attaches a domain to the name you enter. As when you try "tnsping80 TGM1", actually Oracle will look for TGM1.my_domain.
Printaporn_1
Esteemed Contributor

Re: Interesting Problem with Oracle

Hi,

Try
tnsping TPM1.world
does it work ?
if yes check sqlnet.ora
(if you not found it in /etc it could OK)
enjoy any little thing in my life
T G Manikandan
Honored Contributor

Re: Interesting Problem with Oracle

Hello,
remove the below entry from your file
This is optional (not required)
TGM1_BEQ =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = BEQ)(PROGRAM = /oracle/app/oracle/product/8.0.6)
(argv0 = oracleTGM1)
(args = '(DESCRIPTION = (LOCAL=YES)(ADDRESS=(PROTOCOL=BEQ)))')
(envs = 'ORACLE_HOME=/oracle/app/oracle/product/8.0.6,ORACLE_SID=TGM1')
)


and try starting your listener.

lsnrctl stop
lsnrctl start
or
lsnrctl reload

If this is not working

use
$ORACLE_HOME/bin/netasst to configure your service names again.
Remove everything and configure your
extproc_connection_data
and TGP1 afresh.

Thanks
G Manikandan

Re: Interesting Problem with Oracle

Hi,

when I tried

tnsping TGM1

Its showing that :" Failed to resolve name"

Now how should i proceed?

Ganesh
Interested to learn HP-unix,Sun and problem solving
Dave Chamberlin
Trusted Contributor

Re: Interesting Problem with Oracle

How do you know that the listener is running? Have you done a ps -ef and grepped for your listener command?
Simeon Fox
Advisor

Re: Interesting Problem with Oracle

Hi Ganesh, have you checked your listener.ora? You need an entry for TGM1 in the SID_LIST_LISTENER section.

Regards
SMF
Arturo Castaneda
Occasional Contributor

Re: Interesting Problem with Oracle

Have you tried this?

lsnrctl stat

This will tell you what are the instances that your listener is working with, and you'll know if your listener is running.

what happens if you issue this:

echo $ORACLE_SID

if ORACLE_SID is different from TGM1

you should try

. oraenv

and whrite TGM1 when asked then press enter an try again with echo $ORACLE_SID
Arturo Castaneda
Occasional Contributor

Re: Interesting Problem with Oracle

Could you post your listener.ora file?

It must be in $ORACLE_HOME/network/admin

Re: Interesting Problem with Oracle

Hi,

I checked following :

1.Tnslistner : Its running properly
2.echo $ORACLE_HOME its showing : TGM1
3.oraenv:$ORACLE_SID is set to TGM1
4.env :$TNS_ADMIN=$ORACLE_HOME/network/admin

I checked with Listener stop and start its working fine.

One more thing I checked following files:
1.resolve.conf
2.initTGM1.ora
3.sqlnet.ora - this file is not there.
4.netconf - etc/rc.config.d/netconf
5.hosts - etc/hosts

I am still not able to get in to oracle with tnsname.e.g user@TGM1

Here is listener.ora file:
----------------------------------------------
#
# Installation Generated Net8 Configuration
# Version Date: Jun-17-97
# Filename: Listener.ora
#
LISTENER =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= IPC)(KEY= TGM1))
(ADDRESS= (PROTOCOL= IPC)(KEY= PNPKEY))
(ADDRESS= (PROTOCOL= TCP)(Host= hux9)(Port= 1521))
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = hux9)
(ORACLE_HOME/oracle/app/oracle/product/8.0.6)
(SID_NAME = TGM1)
)
(SID_DESC =
(SID_NAME = extproc)
(ORACLE_HOME = /oracle/app/oracle/product/8.0.6)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = TGM1)
(ORACLE_HOME = /oracle/app/oracle/product/8.0.6)
(PROGRAM = extproc)
)
)
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10
TRACE_LEVEL_LISTENER = OFF

listener.ora: END
----------------------------------------------

Now what to do?

Ganesh
Interested to learn HP-unix,Sun and problem solving

Re: Interesting Problem with Oracle

Hi there,

Thanks all

I apriciate for the Help from all.

My problem is solved.

Ganesh
Interested to learn HP-unix,Sun and problem solving