Skip to Main Content

DevOps, CI/CD and Automation

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!

TNS Less Connection

185706Apr 9 2013 — edited Sep 24 2013
*For some reason on my production server I can not get a connection to the database using TNSnames --*
TNSping Works and the TNSNAMES.ORA is correct.
And it works fine on my test server.

So I hard coded the server IP in the connection string

<connectionStrings>
<add name="ORAConnectionString" connectionString="Data Source=XXX.XXX.XXX.XXX:1521;User ID=MyUser;Password=MyPassword;" providerName="Oracle.DataAccess.Client"/>
</connectionStrings>

But my boss hates it because I'm not using TNSNAMES proper..

<connectionStrings>
<add name="ORAConnectionString" connectionString="Data Source=MyTNSnames;User ID=MyUser;Password=MyPassword;" providerName="System.Data.OracleClient"/>
</connectionStrings>


Does anybody know how to resolve this issue? Is there a way to point the TNSNAMES.ORA file from within the CoonectionString
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 22 2013
Added on Apr 9 2013
5 comments
4,997 views