There exist four main methodologies to access Oracle database from a .NET application:
- Microsoft’s .NET data provider for ODBC (or ODBC.NET)
- Microsoft’s .NET data provider for OLEDB (or OLEDB.NET)
- Microsoft’s .NET data provider for Oracle
- Oracle’s data provider for .NET (or ODP.NET)
There are several ways to connect to Oracle database from within .NET. Each of those methods having its own advantages and disadvantages. But in this post we concentrate only on how to connect to Oracle database from .Net. It is necessary to have Oracle 8i, 9i or Oracle 10g client installed on your system.
Proper Connection descriptors are to be configured on your system to connect to Oracle. The connection descriptors for oracle lies in the file called TNSNAMES.ORA . TNS stands for Transparent Network Substrate. You can locate the tnsname.ora file in your system at the Path <oracle_home>/network/admin/tnsname.ora. If it is already configured and you are able to connect to Oracle 9i database thru SQL* PLUS , then there is no need to disturb this file.
An example of connection descriptor in my system is

