Just installed today Oracle 11g Express Edition on server Oracle11g.
And on a W7 VM installed VS2010 with ODP.Net
(ADDRESS = (PROTOCOL = TCP)(HOST = Oracle11g.domain.local)(PORT = 1521))
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
With sqlplus i can connect to the server, but "Add Connection" in VS2010 fails with "ORA-12154: TNS: could not resolve the connect identifier specified".
Can someone give me a hint?
The Oracle Developer Tools for Visual Studio add-in is going to look for the tnsnames.ora file in the network\admin directory under the path where the tools were installed.
There are multiple things that can be done to address this but I think the easiest is to either:
- Copy the tnsnames.ora file from the database home network\admin directory to the tools home network\admin directory
- Copy the alias specification in the tnsnames.ora file in the database home network\admin directory into the tnsnames.ora file in the tools home network\admin directory
Correct, i'm using ODP.NET on a W7 (64) VM and the 11g server is installed on a w2k8R2 server.
It doesn't matter if i use the IPAddress or dnsname, from the client i can connect with sqlplus, but not with VS2010.
On the server tnsnames answers with:
TNS Ping Utility for 32-bit Windows: Version 18.104.22.168.0 - Production on 26-OKT-2012 22:39:33
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = Oracle11
g.domain.local)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
OK (0 msec)
The alias comes from the file tnsnames.ora when i right-click on "database refences" --> "new database refence".
In the dropdownlist is XE the second option.
Hmm, i wanted to go to bed, so i closed VS2010...
Turns out MS Essential thinks a dll from Oracle is suspicious and wants it to send to MS....
As i clicked OK, and restarted VS2010, i could connect to the server....
My humble apologies....
OK, just another confirmation...
You installed the Oracle Developer Tools into the following directory:
Do you have a sqlnet.ora file in the following directory:
If so, what are the contents?
OK, thanks for the follow-up. I have not seen Microsoft Security Essentials flag an Oracle DLL yet, but there you go, I guess it can!
Edited by: Mark Williams on Oct 26, 2012 4:56 PM