Skip to Main Content

ODP.NET

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

572474Jan 19 2008 — edited Jun 23 2010
Hello,

I hit problem this time.

Database server: Oracle 11g Release 1
Tools: Visual Studio 2008 Team System 2008
ODT.NET version 2.111.6.20

When I am trying to connect to Database using SCOTT from either the Server Explorer or Code I get the error:

"ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA"

I can connect to the Database using SCOTT from Oracle SQL Devloper or JDeveloper without any problem.

Please help,
Ming Man

Comments

Sdhamoth-Oracle

Hi,

Did you set TNS_ADMIN environment variable? If not, can you try after setting it?

Thanks,

Senthil

TheVenkster

Senthil:

What should it point to?

Anyway, I re-installed both the 64-bit Oracle DB and the 32-bit client. There are two sets of TNSNames.Ora, Listener.Ora and SQLNet.ora, one for the 64-bit and one for the 32-bit in their respective folders.

I have no problem creating an ODBC DSN for the 64-bit version. The link connects fine to the DB

I have two TNS Listeners defined, one for the 64-bit and one for the 32-bit. While the 64-bit uses Port 1521, I am using Port 1522 for the 32-bit; I also made sure that Listener.ora refers to the same port. But when I use Oracle Net Configuration Assistant to configure Local Net Service Name Configuration to test the Service, it says "TNS:listener does not currently know of the service requested in connect descriptor.

I did check that both the TNS Listener services are running.

venki

TheVenkster

Senthil:

I don't know what happened but now, everything works just as expected. I am able to attach Oracle DB tables to an Access database using ODBC. I am able to also connect to the DB using the 64-bit drivers.

Venki

1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 21 2010
Added on Jan 19 2008
12 comments
212,975 views