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!

avoid using tns names in c#

k1ng87Apr 11 2013 — edited Apr 12 2013
I'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+
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 10 2013
Added on Apr 11 2013
8 comments
3,117 views