Home » RDBMS Server » Networking and Gateways » TNS Ping works Sqlplus not
TNS Ping works Sqlplus not [message #144128] Tue, 25 October 2005 03:49 Go to next message
mariaschreiber
Messages: 11
Registered: June 2005
Junior Member
Hy List,
I am Tring to connect from Linux Box 10.1.0.4.0
hrou oracle DB 7.3.4.0.0 on Windows NT
TNS Ping works bur sqlplus or any JDBC Connection not

###########
Fatal NI connect error 12504, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=##.###.##.##)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)(CID=(PROGRAM=sqlplus)(HOST=oracl e-t
est01)(USER=oracle))))

VERSION INFORMATION:
TNS for Linux: Version 10.1.0.4.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 10.1.0.4.0 - Production
Time: 24-OCT-2005 19:28:01
Tracing not turned on.
Tns error struct:
ns main err code: 12564
TNS-12564: TNS:connection refused
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
#######################

any Ideas

Maria
Re: TNS Ping works Sqlplus not [message #144381 is a reply to message #144128] Wed, 26 October 2005 05:36 Go to previous messageGo to next message
girish.rohini
Messages: 744
Registered: April 2005
Location: Delhi (India)
Senior Member
Looking at your connection description, i think you have an space in host name in connect_data & tats causing you problem.

Use the fooliwing string instead.

(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=##.###.##.##)
(PORT=1521)
)
(CONNECT_DATA=
(SERVICE_NAME=orcl)
(CID=
(PROGRAM=sqlplus)
(HOST=oracle-test01)
(USER=oracle)
)
)
)


--Girish

**Next time when you post, pls dont forget to format the strings. That'll assist you even in diagnosing the issue early.
Re: TNS Ping works Sqlplus not [message #151341 is a reply to message #144381] Wed, 14 December 2005 06:58 Go to previous messageGo to next message
mmix
Messages: 2
Registered: December 2005
Location: Greece/Britain
Junior Member
My case is the same except the syntactic error.

Oracle 9.2.0.4 runing on Linux AS/3

tnsnames.ora:

mediation=(
DESCRIPTION=(
ADDRESS_LIST=(
ADDRESS=(
PROTOCOL = TCP)(HOST = inmediation)(PORT = 1521)))
(CONNECT_DATA = (SERVICE_NAME = mediation)))


sqlnet.ora:
TNSPING.TRACE_LEVEL = 16
TNSPING.TRACE_DIRECTORY = /tmp/sqlnet/
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)



Running tnsping
$> tnsping mediation

TNS Ping Utility for Linux: Vesion 9.2.0.4.0 - Production on 14-DEC-2005 14:52:24

Copyright (c) 1997 Oracle Corporation. All rights reserved.

Used parameter files:
/home/oracle/product/9.2.0.4.0/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = inmediation)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = mediation)))
OK (10 msec)

When I attempt sqlplus:
$> sqlplus mediation/mediation@mediation

SQL*Plus: Release 9.2.0.4.0 - Production on Wed Dec 14 14:53:59 2005

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

ERROR:
ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect
descriptor

Any Ideas?

Regards Mike
Re: TNS Ping works Sqlplus not [message #151343 is a reply to message #151341] Wed, 14 December 2005 07:09 Go to previous messageGo to next message
mmix
Messages: 2
Registered: December 2005
Location: Greece/Britain
Junior Member
I guess it was the missing space when I called sqlplus:

$> sqlplus mediation/mediation@mediation
should be
sqlplus mediation/mediation @mediation

Mad
Re: TNS Ping works Sqlplus not [message #151836 is a reply to message #151343] Mon, 19 December 2005 06:57 Go to previous message
sunil_v_mishra
Messages: 506
Registered: March 2005
Senior Member
hi,

You are getting the ORA-12514 error because your database listener is not configured to listen for this database. You'll have start the Net8 Assistant to configure and start a listener. Due to the ORA-12154 error, I'm thinking that the listener is up and running, but not configured for your database. You'll have to add a service for your database, then bounce the listener

Please also check the proper entiries for your database on client machine in tnsnames.ora file .

Regards
sunilkumar
Previous Topic: delete instance name
Next Topic: cannot create user account
Goto Forum:
  


Current Time: Mon Apr 29 05:32:48 CDT 2024