Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-12504 tns listener was not given the SERVICE_NAME in CONNECT-DATA

ACID25Sep 21 2010 — edited Sep 22 2010
Hi

i installed a fresh oracle linux and installes 11.2.0 database server. the server works fine but i have a proplem to connect to the database from a windows 2008 r2
client. For the client connection i installed the oracle instantclient on the windows system. Now i want to configure the system dsn to connect to the oracle
server like this
data source description: vSphere 64
description: ----
TNS Service Name: VCDB
user id: system
then i go to TEST connection
Service Name: VCDB
user name: system
Password: mypassword

so i copied the tnsnames.ora from the server to the client

then i get
ora-12504 tns listener was not given the SERVICE_NAME in CONNECT-DATA

here´s my tnsnames.ora from the client

VCDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.31.98.173)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = vcdb.vmware)
)
)

i tested serveral config´s but nothing works. I can ping the server and also i cn telnet the server on port 1521. The listener on the server works fine

lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 20-SEP-2010 20:48:52

Copyright (c) 1991, 2009, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vc-db1.mydomain)(PORT=1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 20-SEP-2010 20:47:45
Uptime 0 days 0 hr. 1 min. 7 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/vc-db1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=vc-db1mydomain)(PORT=1521)))
Services Summary...
Service "vcdb.vmware" has 1 instance(s).
Instance "vcdb", status READY, has 1 handler(s) for this service...
Service "vcdbXDB.vmware" has 1 instance(s).
Instance "vcdb", status READY, has 1 handler(s) for this service...
The command completed successfully

but it´s not possible to create a connection to the server. My enviroment variables are this
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
ORACLE_HOSTNAME=vc-db1.mydomain
ORACLE_SID=vcdb
ORACLE_TERM=xterm

so i think on the server site everything is correct. How could i establish a connection from the windows client
to the linux database server. Or is ODBC the wrong method for this?

Kind regards
ACID25
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 20 2010
Added on Sep 21 2010
3 comments
1,543 views