Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ORA-12154 error

Status
Not open for further replies.

mixedbag

Technical User
Jan 18, 2001
5
0
0
GB
Hi.
Oracle 9.2.0.1.0 on redhat 8.0
when starting the database or using sqlplus I get ORA-12154 : TNS: could not resolve service name.
Any ideas?
I have attached my tnsnames.ora and listener.ora below. both are located in $oracle_home/network/admin.

listener.ora:
LISTENER=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=servo)(PORT=1521))
(ADDRESS=(PROTOCOL=ipc)(KEY=po))))
STARTUP_WAIT_TIME_LISTENER =0
CONNECT_TIMEOUT_LISTENER = 10
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=po.workgroup)
(ORACLE_HOME=/oracle/OraHome1)
(SID_NAME=po)))


tnsnames.ora:
po =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(Host = servo)
(Port = 1521)
)
(CONNECT_DATA = (SID = po)
)
)

my database is called po
the server is servo and can be resolved by name.
the databaes domain is workgroup.
 
Need a little more info...

How are you starting sqlplus? (ie sqlplus scott@po)
Is your ORACLE_HOME and ORALCE_SID environment variables set?

What is in sqlnet.ora for default_domain?
 
yes I am starting sqlplus in the way mentioned above.
I have now created a sqlnet.ora with defult domain set to workgroup
the oracle_home is set to my oracle path /oracle/OraHome1
the oracle_sid is set to my instance po.
 

What is the value of the env veriable TNS_ADMIN ?
Is it same as the directory where you have kept your tnsnames.ora ? It should be .
I feel , this can be the potential cause .
 
yep that variable is also correctly set.
 
If you set NAMES.DEFAULT_DOMAIN=workgroup, this suffics is automatically added to "unqualified" alias (scott/tiger@po.workgroup). I'd suggest to comment this line or change an entry in tnsnames.ora Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top