Reputation: 7351
I'm currently developping to application, one using the ODP.Net 9.2 and the other one should use the ODP.Net 11. I'm using the Server Explorer from VS2008 to add a new connection but failed each time with the error "ORA-12154: TNS: Could not resolve the connect identifier specified". I'm not able to debug which ODP VS2008 is using. Does someone has run into this kind of problems?
I'm using ODP.net 9.2 and 11, with Visual Studio 2008 on a Windows XP SP3 machine.
Thank you
Upvotes: 0
Views: 804
Reputation: 3308
I guess this is a bug submitted to Oracle.
1) Desktop -> Create test.udl file -> choose "Oracle Provider for OLEDB" -> click next -> in datasource provide the tnsname -> provide authentication credential -> hit "test connection" -> you should see connection succeeded. 2) Now with above step completed, you can easily connect to oracle DBs from you visual studio's "Server Explorer".
GOOD LUCK.
Upvotes: 0
Reputation: 291
Copy the 9.2 Oracle.dataAccess.dll to your bin directory of the application.
Upvotes: 0
Reputation: 7351
Finally, I went into the C:\windows\assembly and remove the 9.2 Oracle.dataAccess from the GAC. Not really what I was hoping for a solution, but at least its work for now.
Thank you James and Sha!
Upvotes: 1
Reputation: 16864
This means your connection is missing from TNSNAMES.ORA. It's easier to use a TNS-less connection string... something like this:
Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MyOracleSID)));User Id=myUsername;Password=myPassword;
Upvotes: 1
Reputation: 17860
Do you have correct version of 9.2 and 11 libraries? I mean 32bit vs 64bits? I used both of them on my machine abut you have to be careful about using proper bits version.
Upvotes: 0