Search code examples
oraclevisual-studio-2010database-connection

Connect to Oracle in remote server with .NET


In Visual Studio 2010 I select Add new connection and then I choose Oracle server. Then I choose Oracle provider for .Net, and this window comes.

enter image description here

I wonder what I should write in the Data Source text field if the Oracle database is at a server with name AZSSRV and IP address 172.117.17.1? Any help will be appreciated.


Solution

  • Your entries from TNSNames.ora should appear here and you would select the one that you need to use.

    Since the drop down does not seem to be working, it would indicate that VS2010 cannot find your Oracle home.

    An easy solution to this is to create an environmental variable called

    TNS_ADMIN

    and place the path to the TNSNames.ora file you wish to you as such

    C:\app\MyDir\product\11.2.0\client_1\Network\Admin\

    Close VS2010. Make the environment variable changes, then reopen, the drop down should then show you the available ora connections you may want to use.

    (you can look @ this thread for a bit more info: http://forums.oracle.com/forums/thread.jspa?threadID=2213359&tstart=0)

    hth