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)
    )
  )
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)
    )
  )
  • i changed SID to SERVICE_NAME but still i am getting the same exception – Triandh Velchuri Jan 4 '16 at 22:12
  • Any chance that adding SERVICE_NAME will help instead of replacing? – hot2use Jul 25 '17 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, privacy policy and cookie policy

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