1

I installed oracle client 11.2.0 version in my machine and also installed Oracle data access providers for visual studio.I also installed Oracle Data Access 11.2.0.3.20. I am trying to connect to the database through the visual studio i am getting the below exception

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

The tnsnames.ora file contains the folloing code

creds=
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = aaa.cedd.net)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = creds)
    )
  )

2 Answers 2

1

Just alter SID to SERVICE_NAME:

creds=
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = aaa.cedd.net)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = creds)
    )
  )
2
  • i changed SID to SERVICE_NAME but still i am getting the same exception Jan 4, 2016 at 22:12
  • Any chance that adding SERVICE_NAME will help instead of replacing?
    – John K. N.
    Jul 25, 2017 at 5:55
1

It may not be loading the TNSNAMES.ORA file you think it's loading. Instead prefer Easy Connect Naming. Here something like '//aaa.cedd.net/creds'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.