This content has been marked as final. Show 6 replies
968090 wrote:The Oracle Developer Tools for Visual Studio add-in is going to by default look for the tnsnames.ora file in the network\admin directory under the path where the tools were installed.
I want to use oracle in a visual studio 2010 project.
I have the TNS String. and if i put connection in a connectionstring i can get informations from table on my project. But i would like to use a manager on my Server Property.
i have tried to use Oracle Developer Tools, but when i try to add a new Database Server, i get this error : Unable to resolve the connect identifier.
I take the tnsnames.ora from Admin/Sample and put it to Admin directory. set env variables for TNS_NAME on system to put where i set my TNS file. but after. What i need to do?
My OS are in 64 bits, my project are in 64 bits too. But i use a 32 bits versions of Oracle Client 11g. Does i need to use a 64 bits?
like i said, i can select * from a view inside my code with my connectionstring, but i can't see table, views, etc from Server Explorer in my VisualStudio 2010.
Thanks for your support.
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 a known, good home network\admin directory to the tools home network\admin directory
- Copy the alias specification in the tnsnames.ora file in a known, good home network\admin directory into the tnsnames.ora file in the tools home network\admin directory
I do not recommend setting TNS_ADMIN in the registry or the environment unless you really understand the nature of doing so.
I'm not sure why you copied the tnsnames.ora file from the network\admin\sample directory as it is just, well, a sample, and would not have a working tns alias defined within it.
Hi, ok sorry, i have copied the tnsnames.ora FROM the Sample directory to Network/Admin directory
And changed to tns inside the file to have our oracle database server.
the tns works with the connectionstrings.
But not in my server explorer.
thanks for your answer
This seems like a question about the Oracle Developer Tools for Visual Studio more than a question about ODP.NET and the forum for ODT is located here:
Oracle Developer Tools for Visual Studio
However, since we're already here, let's take a step back and review some information...
1. In what directory did you install the Oracle Developer Tools for Visual Studio?
For example, on my laptop I have installed ODT in the following directory:
2. Provide a listing of the files in your ODT_Home\network\admin directory.
Again, on my laptop:
3. Copy and paste the contents of the files in your network\admin directory so we can review. Obfuscate host names/ip address if necessary. Wrap the content in
$ dir C:\Oracle\11.2\odt\Network\Admin Volume in drive C is System Volume Serial Number is 80E9-2868 Directory of C:\Oracle\11.2\odt\Network\Admin 10/06/2012 04:51 PM <DIR> . 10/06/2012 04:51 PM <DIR> .. 10/06/2012 04:41 PM <DIR> Sample 08/27/2012 01:47 PM 293 sqlnet.ora 08/27/2012 12:01 PM 1,221 tnsnames.ora 2 File(s) 1,514 bytes 3 Dir(s) 143,498,870,784 bytes free
tags to help formatting.
Hi, sorry for wrong section.
My installation are on C:\Oracle.
From my ODT directory i have this
My Network/Admin are somewhere else
C:\Oracle\product\11.2.0\client_1\odt>dir Le volume dans le lecteur C n'a pas de nom. Le numéro de série du volume est C85E-3EA4 Répertoire de C:\Oracle\product\11.2.0\client_1\odt 2012-10-29 09:08 <REP> . 2012-10-29 09:08 <REP> .. 2012-10-29 09:07 <REP> doc 2012-10-29 09:07 2 756 RemoveProjectFiles.bat 2012-10-29 09:08 <REP> vs2008 2012-10-29 09:07 <REP> vs2010 1 fichier(s) 2 756 octets 5 Rép(s) 5 052 821 504 octets libres C:\Oracle\product\11.2.0\client_1\odt>
And my 'sqlnet.ora' file have default value
C:\Oracle\product\11.2.0\client_1\Network\Admin>dir Le volume dans le lecteur C n'a pas de nom. Le numéro de série du volume est C85E-3EA4 Répertoire de C:\Oracle\product\11.2.0\client_1\Network\Admin 2012-10-29 12:17 <REP> . 2012-10-29 12:17 <REP> .. 2012-10-29 09:07 <REP> Sample 2007-12-13 15:16 237 sqlnet.ora 2012-10-29 09:10 931 tnsnames.ora 2 fichier(s) 1 168 octets 3 Rép(s) 5 011 484 672 octets libres C:\Oracle\product\11.2.0\client_1\Network\Admin>
and my tnsnames.ora have this
# Every line that begins with # is a comment line # You can modify the entry below for your own database. # sqlnet.ora Network Configuration File SQLNET.AUTHENTICATION_SERVICES= (NTS) NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
what do you suggest?
<a name>.com = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = <ip adress>)(PORT = 3471)) ) (CONNECT_DATA = (SID = <id>) ) )
Removed directory listing as it was for my ODT top-level home directory whereas OP has posted directory listing for the "odt" directory within the home install directory and they are not the same thing so not a valid comparison of course.
I presume that the supplied tnsnames.ora file has been obfuscated and that the values posted here are not the actual characters in the file.
I say this because you previously stated "...And changed to tns inside the file to have our oracle database server."
However, if this is incorrect then what Alex notes about configuration holds true.
Edited by: Mark Williams on Oct 30, 2012 4:58 PM
Your ODT directory looks ok. Your problem is that you haven't configured your tnsnames.ora file.
Here's some instructions on how to configure the file settings:
Basically, anything between the less than and greater than symbols needs to be replaced by your deployment specific attributes. You are also using an unconventional port number. The conventional one is port 1521, but your DBA should be able to tell you the correct port number to use.