avoid using tns names in c#
k1ng87Apr 11 2013 — edited Apr 12 2013I'm having issues getting tns names to work correctly on another machine. I've made a c# app that currently references it but was wondering if I can connect without tns. I tried this:
"Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=105.1.12.190)(PORT=1521))(CONNECT_DATA =(SID=<OMP1>)));User ID=user;Password=pass;";
but am getting this error:
{"ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA"}
my TNS NAME file on the computer which I'm doing development has this in it:
OMP1=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=105.1.12.193)
(PORT=1521)
)
(CONNECT_DATA=
(SID=OMP1)
)
)
I know that works since I can connect via SQL+