none
Connecting to oracle DB Server help RRS feed

  • Question

  • Hi,

    Recently we have developed an application which connects to oracle database for fetching records. For fetching records, we are using OLEDB for Oracle. Application runs fine on my machine by connectng properly with Oracle ,since i have oracle client installed on my machine. Now i tried to test application on another machine, which doesnot have any oracle instance/Client installed on his machine. Application fails to connect to oracle central DB Server. Is it necessary for users to install oracle client on their machine before the application communicates with Oracle.

    Here is Connection string

    <

     

    add name="Connection"

     

     

    connectionString="Provider=msdaora;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=XYZ)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=abc.com)));Persist Security Info=False;User Id=mahens; Password=XXXXXXXXX" providerName="System.Data.SQLOLEDB"/>

    The above code is for OLEDB for oracle. Is there any thing i required to install for connecting to central Oracle DB server from my windows application(.NET application installed on local machine).

    If we try to use ODP.NET dll and include those dll's along within BIN directory,will that work?..Can any1 tell me a way wherein user need not install any oracle Client on their machine and communicate to server.

    -Mahender


    Mahender
    Friday, July 16, 2010 7:32 PM

Answers

  • Mahender,

    Most Oracle connectivity components (.NET data providers, OLE DB providers, ODBC drivers, etc.) rely on core Oracle client libraries to handle the communication to the Oracle database.  There are some (Data Direct's Oracle components come to mind) that have that functionality built into the components, but that simplicity comes with a cost.  Literally.  Those components are not free.

    Oracle has tried to simplify the installation of those core Oracle client libraries via their "instant client".  The basic premise is that you put a small number of the DLLs in the executable directory or system path, rather than go through an entire Oracle client installation.  I'm a little rusty on working with their instant client, but you should be able to do a couple quick searches on Oracle's forums or via your favorite search engine to figure out what DLLs to include.

    For connecting to Oracle via .NET, ODP.NET is the right way to go.  I would not recommend using System.Data.OleDb or System.Data.OracleClient.  The Microsoft MSDAORA OLE DB provider is 32-bit only and (to the best of my knowledge) not supported.  Oracle's OraOLEDB provider is fine if you're working directly with OLE DB or ADO from C, C++ or VB "classic" but ODP.NET is Oracle's recommended approach for .NET developers.  System.Data.OracleClient is marked for deprecation and is not something Microsoft has invested heavily in.

    I hope this information proves helpful.


    David Sceppa
    Friday, July 16, 2010 9:16 PM
    Moderator

All replies

  • Mahender,

    Most Oracle connectivity components (.NET data providers, OLE DB providers, ODBC drivers, etc.) rely on core Oracle client libraries to handle the communication to the Oracle database.  There are some (Data Direct's Oracle components come to mind) that have that functionality built into the components, but that simplicity comes with a cost.  Literally.  Those components are not free.

    Oracle has tried to simplify the installation of those core Oracle client libraries via their "instant client".  The basic premise is that you put a small number of the DLLs in the executable directory or system path, rather than go through an entire Oracle client installation.  I'm a little rusty on working with their instant client, but you should be able to do a couple quick searches on Oracle's forums or via your favorite search engine to figure out what DLLs to include.

    For connecting to Oracle via .NET, ODP.NET is the right way to go.  I would not recommend using System.Data.OleDb or System.Data.OracleClient.  The Microsoft MSDAORA OLE DB provider is 32-bit only and (to the best of my knowledge) not supported.  Oracle's OraOLEDB provider is fine if you're working directly with OLE DB or ADO from C, C++ or VB "classic" but ODP.NET is Oracle's recommended approach for .NET developers.  System.Data.OracleClient is marked for deprecation and is not something Microsoft has invested heavily in.

    I hope this information proves helpful.


    David Sceppa
    Friday, July 16, 2010 9:16 PM
    Moderator
  • I developed a Web API using .NET CORE and using the ORACLE database. There is still no official provider released by Oracle, so the solution was to use this third-party provider.

    It works very well for me.

    https://solitto.com.br/csharp/oracle-data-provider-net-core/
    Friday, February 16, 2018 1:00 AM