Reputation: 30922
I'm using the 'Data Connections' server explorer to connect to my Oracle database. I have specified the connection in Web.Config in:
<oracle.manageddataaccess.client>
<version number="*">
<dataSources>
<dataSource alias="[removed]" descriptor="[removed]" />
</dataSources>
</version>
</oracle.manageddataaccess.client>
with a corresponding element in
<add name="DbPower" connectionString="[removed]" />
and added it to the TNS names file on my machine. Although when I go to manage the connection I get
Searching doesn't come up with anything and the alias in the dialog matches the one in the config.
Any ideas?
Upvotes: 1
Views: 1532
Reputation: 143083
In order to avoid such headaches, I'd suggest you to create environment variable called TNS_ADMIN and point it to a directory (for example, C:\ora_lib). Put a single copy of TNSNAMES.ORA file in there, and put all databases you use into that TNSNAMES.ORA.
Doing so, you'll have to maintain only a single copy of TNSNAMES.ORA (instead of all of them, scattered over all your \network\admin directories that belong to different Oracle installations) and all your Oracle products will know where to look for a database you're connecting to.
Upvotes: 1
Reputation: 30922
I figured this out myself, as per usual with an Oracle installation you end up with multiple tnsnames.ora files on your machine. The one that visual studio is using is shown in the modify connections dialog:
Once I made sure I'd updated this file all was good.
Upvotes: 2