Introduction
Let's have a look at the contents.
Contents
- Oracle Database Server
- Oracle Client
- Connect the Oracle Database Server
- Connect the Oracle Database server without Oracle client
- Developer Setup
- Code
- Server Deployment (Web server or Application Server)
- Conclusion
It has the following two main parts:
- Oracle Database Server
- Oracle Client
This is where your data is saved. A database server is the key to solving the problems of information management. In general, a server reliably manages a large amount of data in a multiuser environment so that many users can concurrently access the same data. All this is done while delivering high performance. A database server also prevents unauthorized access and provides efficient solutions for failure recovery.
Oracle Client
If you are connecting to an Oracle server from your application, then the Oracle clients help you to push and pull the data from the Oracle server database, in other words a piece of software that allows a remote computer to talk to Oracle. If you were to write a piece of software that communicates with the database, you would use the Oracle Client to facilitate that communication.
In other words, the Oracle client plays like a broker between your front-end application and the Oracle server database.
Connect the Oracle Database Server
There are many ways to connect to an Oracle database server but it should use the Oracle client.
- ODBC
- OLEDB
- Service
Connect to the Oracle Database Server without Oracle Client
This tool is about connecting to the database server without installing the Oracle client.
- Download Oracle Data Access Components (ODAC) 11.2.0.1.2 - (xcopy version - ODAC112012Xcopy.zip). This component is available in the Oracle downloads.
- Copy OraOps11w.dll found in the odp.net4/b in directory.
- Copy oci.dll, orannzsbb11.dll and oraociicus11.dll found in the instantclient_11_2 directory.
- Copy the Oracle.DataAccess.dll found in the odp.net4/odp.net/bin/4 directory.
Place the preceding DLLs into your application's executable path.
Place the Oracle.DataAccess.dll in the GAC as in the following:
- C:\> gacutil /i “<Application Path>\ Oracle.DataAccess.dll”
Add the Oracle.DataAccess.dll to your project.

Create the connection string as in the following sample.
- user id=USERID;word=WORD;data source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=IPorSERVERNAME) (PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ValidSID)))
Import the Oracle.DataAccess.Client into your source file. Build the ADO.Net code based on the ODAC reference.
- using System;
- using Oracle.DataAccess.Client;
- namespace Sample
- {
- class Program
- {
- static void Main(string[] args)
- {
- //You need to enter a valid Oracle connection
- string connectionString =
- "user id=USERID;word=WORD;" +
- "data source=(DESCRIPTION=(ADDRESS=" +
- "(PROTOCOL=tcp)(HOST=IPorSERVERNAME)" +
- "(PORT=1521))(CONNECT_DATA=" +
- "(SERVICE_NAME=ValidSID)))";
- using (OracleConnection connection =
- new OracleConnection())
- {
- connection.ConnectionString =
- connectionString;
- try
- {
- connection.Open();
- Console.WriteLine
- ("Connection Successful!");
- Console.ReadLine();
- }
- catch (OracleException ex)
- {
- Console.WriteLine(ex.ToString());
- Console.ReadLine();
- }
- }
- }
- }
- }
- Place the Oracle.DataAccess.dll in the GAC.
- Deploy your application with the preceding supporting libraries.
Now you have connected to the Oracle database server without an Oracle client.

Bhumika SablePosted Dec 20, 2018, 2:31 AM
Hi, I want to connect to Oracle Server without using Oracle client. Is there any approach?
Thavaselvan PalanivelPosted May 13, 2016, 11:20 PM
@Manjunath Muttin: Where did you placed the oracle.dataaccess.dll?
Manjunath MuttinPosted May 11, 2016, 2:10 AM
Hi, what you explained will works fine with web application. but for windows application am getting following exception. "The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception." please help me to resolve this error.
Talha Bin AfzalPosted Feb 11, 2016, 2:22 AM
Thavaselvan P, I am doing the same steps just like you mentioned but getting The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception.. Can you please explain what to do now?
Karthik Muthu KaruppanPosted Apr 29, 2015, 6:14 PM
Good one
Santhakumar MunuswamyPosted Apr 29, 2015, 3:14 PM
Good work
Sibeesh VenuPosted Apr 29, 2015, 2:22 AM
Good One
Rahul Kumar SaxenaPosted Apr 29, 2015, 1:12 AM
Good show