.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Connection to Oracle

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :ASP.Net
I am currently working on the connection between ASP.NET and Oracle. I tried to search over the net and know there are many ways. Is there any 'normal practice' on which method to be used? Or it depends? I tried with OLEDB connection provided by .NET and it appears to be fine.   Thanks a lot!

View Complete Post

More Related Resource Links

Need Oracle Data Provider .CS File for Oracle 10g Database connection !



I need a 'Wrapper.cs' file which takes care of the Database connection ( Oracle 10g) where

i can just call the method with my SQL Query


Gridview1.DataSource = SampleWrapper.ExecuteDatatable("THE SQL QUERY");


Plz Post the link if there is any open source !    

BIDS Connection Manager Cannot Connect to Remote Oracle Db

Hi All,
I'm not having much luck getting an 'Oracle Provider for OLE DB' remote connection in connection manager to work when creating an SSIS package in BIDS.

I've covered off all the steps in the following link

The local machine is running SQL 2005 Sp2 Enterprise Edition on W2003 Sp2 Standard Edition X64

Using the Oracle 'Net Configuration Assistant' I can connect successfully to the remote service

I'm using ODAC 10g Release 2.

The steps to reproduce the error are as follows

1. in BIDS after creating an SSIS Solution
2. Right click in the  Connection Manager and select new OLE DB Connection
3. Click 'New'
4. Select 'Oracle provider for OLE DB'
5. Under server I enter the service name that I created in the Oracle 'Net Configuration Assistant'
6. Enter the user name and password as I entered in the Oracle 'Net Configuration Assistant'
7. When I click 'Test Connection' I get the following error

Test connection failed because of an error in initializing provider. ORA-12154: TNS could not resolve the connect identifier specified

I've spent a lot of time trying to get this to work and tried othe

Oracle Connection to asp.net MVC


how i can use Oracle database with asp.net mvc 2 web application?

thnx in advance. 

How to create a source component using Oracle oledb connection


How to create a source component using Oracle oledb connection in x64??


Server Explorer Data Connection to ORACLE in VS2008 on Vista x64?

How do I set up a connection to an ORACLE database from Visual Studio 2008's Server Explorer in Vista x64?

If I install the 32-bit ORACLE client, I can configure a Data Connection in Server Explorer, but I can't use it to connect to the database because I can't setup a DSN in the Control Panel (the Oracle provider doesn't show up because it's a 64-bit OS).

If I install the 64-bit ORACLE client, I can configure a DSN in Control Panel, but I can't configure a Data Connection in Server Explorer, because VS2008 is a 32-bit app and throws a BadImageFormatException when it tries to load the 64-bit OCI.

Is there a way to do this without moving to a 32-bit development environment?

Sql Server 2008 (64bit) on Windows Server 2008 with a connection to Oracle 10g (64bit)



I know there are similar questions posed but none that provided a solution to my particular problem.

I am upgrading a SSIS package from Sql Server 2005 (32bit) to Sql Server 2008 (64bit) on Windows Server 2008 R2. It worked on the Sql Server 2005 machine. This package connects to an Oracle 10g (64bit) database.

The Oracle 11g client and networking tools are installed (by the Oracle DBA). I tested my connection on the sql server 2008 machine using SqlPlus and doing a tnsping. I can also create a Windows ODBC datasource connection to the Oracle 10g database.

The package executes properly on my local computer XP (32bit) running bids 2008.

The package fails on the server in SSIS. I need to be able to schedule the package in a job so it must run in SSIS.

I have also tired to create a connection manager to the Windows ODBC oracle connection without success. It is blank and does not allow me to select or refresh to view the Windows ODBC datasources.

Any assistance would be greatly appreciated. I have seen other forums where installing the Oracle 11g ODAC and Oracle Developer Tools for Visual Studio might assist in creating the package. But I need assistance in running the package from SSIS and not BIDS.






Oracle connection fail with Microsoft OLEDB provider for Oracle MSDAORA.1



On my dev server I have working ssis packages that use connections Microsoft OLEDB provider for Oracle MSDAORA.1 and Oracle provider for oledb and OracleClient data provider.

I use one or the other according to my needs.

In anticipation and to prepare for the build of a new production server, I have build a test server from scratch and deployed to it the entire dev.

Almost everything works except Microsoft OLEDB provider for Oracle.

ssis packages on the test machine will return an error

Error at Pull Calendar from One [OLE DB Source [1]]: The AcquireConnection method call to the connection manager "one.oledb" failed with error code 0xC0202009.

Error at Pull Calendar from One [DTS.Pipeline]: component "OLE DB Source" (1) failed validation and returned error code 0xC020801C.

[Connection manager "one.oledb"]: An OLE DB error has occurred. Error code: 0x80004005.

An OLE DB record is available. Source: "Microsoft OLE DB Provider for Oracle" Hresult: 0x80004005 Description: "Oracle error occurred, but error message could not be retrieved from Oracle.".

I have used the same installers for OS, SQL and Oracle SQL*Net on both dev and test machines. The in

Package Configuration causing problems with Oracle Connection


Hi All,


We need to import the data from Oracle 10g database to SQL Server 2005 database.

Solution Picked:

In order to accomplish the above, we used SQL Server Integration Services along with Business Intelligence Developer Studio.


Base Details:

There are around 17 packages, each retrieving data from Oracle and storing into SQL Server based on current date. Following are the steps used:

  1. Get current date from SQL Server [Execute SQL Task].
  2. Create Query based on date obtained from step (1) [Script Task].
  3. Based on query obtained from step (2). Inside a [Data Flow Task] following sub actions are performed:

    Actions performed in [Data Flow Task]

  1. Retrieve data from Oracle database using query through [OLE DB Source].
  2. Perform any data modifications to correct the data [Derived Column].
  3. Store data in SQL Server [OLE DB Destination].
  4. Rejections are saved in text file [Flat File Destination].

how to write logs without opening and closing the Oracle DB Connection


I am developing logging application with asp.net & vb.net & Oracle

At present I'm using this mechanism to write logs

Method1 Connect (
Conn.open ()
Close () & Dispose ()
Method2 WriteLogs (
Call Connect ()
If flag=True
                Write logs into Oracle Database
                Write logs into Text File

The problem with above procedure is, I'm using "Method2 WriteLogs" more than 2000 locations in my program. So each time it's opening & closing the DB connections. It's slows the system.
I want to use Method2 without using the Method1
 Please advice me







ERROR: ORA-12504: TNS: listner was not given the SERVICE_NAME in CONNECT_DATA.



HERE IS THE tnsnames.ora entries:


MOCTST.world =



Problem with Oracle connection


Hi all,
I've had a search around and I can't find any information on this specific problem, so here I am.

I'm developing on a 32bit windows xp machine, and sourcing data from an oracle server. I have the 32bit driver installed locally and I can develop, deploy and process locally with no problem. When I try and deploy my cube to a 64bit SQL Server 2008r2 server I get the following error:

 Errors in the back-end database access module. The provider 'OraOLEDB.Oracle.1' is not registered

The Oracle server is version Oracle Database 10g Enterprise Edition Release - 64bit

I have client installed locally. I'm not sure what is installed on the r2 server.

I've been told that the 64bit oracle driver has been installed on the r2 server, but I don't have permission to log on to the server remotely to check. Has anyone experienced this error before?



Oracle connection via LDAP



Can anyone tell me how can I make a connection to Oracle 11g data base via LDAP using ASP.NET?

How can set the connection string? What is the best Data Provider?




Oracle reside in linux server connection from asp.net 2010



I am starting a new project where I have to use oracle and asp.net. Oracle 11 enterprise edition. Problem is oracle database reside in linux server and application server is in windows. My question is

1. Is there any problem connecting oracle from asp.net?

Waiting for your responses.


Oracle connection in web.config



I am connecting to SQL server and Oracle with the below connection strings in web.config. My project needs windows authentication.

    <add name="dbSQLConnectionString" connectionString="Data Source=SQLDB;Initial Catalog=sql; User ID=username;Password=pswd" providerName="System.Data.SqlClient"/> 
    <add name="dbOracleConnString" connectionString="Data Source=ORADB;Password=pswd;User ID=username;Persist Security Info=True" providerName="System.Data.OracleClient"/>

It works in my local machine but when deployed into the server, SQL part works fine wihtout any problem but the pages using oracle doesn't open anything and shows empty page.

Please let me know whats the problem in my connection string with Oracle which is not allowing to connect to server.

Thanks in advance.

Linkserver connection fails between SqlServer 2005 and Oracle 10g


This is what I did:


The instructions for changing the registry entries per previous MSDN postings were:

               For Windows 2000


Changed the registry entries on my WindowsXP machine:

     entry name           old value          new values
     "OracleXaLib"     xa80.dll            oraclient10.dll
    "OracleSqlLib"     sqllib80.dll       orasql10.dll
    "OracleOciLib"    oci.dll                oci.dll


Then created the Linkserver definition:


EXEC sp_addlinkedserver   'ORA10G',  'ORACLE',  'MSDAORA',  'ORA10G'
  Command(s) completed successfully.

EXEC sp_addlinkedsrvlogin 'ORA10G', 'FALSE',NULL, 'scott', 'tiger'

Command(s) completed successfully.


    scott/tiger is given as an example here; used my real userid/pw instead. BTW, I am able to connect

     to the Oracle database using the userid/pw from the same host that is running the Sqlserver db.So, the

     Oracle client software is installed and is working

SharePoint BDC- Oracle ODBC connection with SSO


Can someone help me with LOBSystemInsance for Oracle ODBC connection with SSO?

SQL Connection String

We can learn or know how can we connect the database from our .net. This will help for freshers or .NET beginners!
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend