Connecting remotely to Oracle database without OracleClient installed

J

John

Hello,

I am developing a .Net (version 1.1) application in C# for which I need
to connect remotely to an Oracle database server. To accomplish this I
am using the .NET Framework Data Provider for Oracle
(System.Data.OracleClient.dll). However, this application will be
distributed to multiple clients so I do not want to require that they
install OracleClient itself.

Currently the application is throwing the following exception when
attempting to connect to the remote database:
System.Data.OracleClient.OracleException: ORA-12154: TNS:could not
resolve service name

The data provider is apparently attempting to find the tnsnames.ora
file to resolve the service details, however this file does not exist
as OracleClient is not installed. The application works fine when
OracleClient is installed, but as stated, I do not want this to be a
requirement.

How can I connect remotely to the Oracle database server in the .Net
framework without installing the OracleClient?

Thanks in advance for any help.

John Fleming
(e-mail address removed)
 
R

Rob Schieber

John said:
Hello,

I am developing a .Net (version 1.1) application in C# for which I need
to connect remotely to an Oracle database server. To accomplish this I
am using the .NET Framework Data Provider for Oracle
(System.Data.OracleClient.dll). However, this application will be
distributed to multiple clients so I do not want to require that they
install OracleClient itself.

Currently the application is throwing the following exception when
attempting to connect to the remote database:
System.Data.OracleClient.OracleException: ORA-12154: TNS:could not
resolve service name

The data provider is apparently attempting to find the tnsnames.ora
file to resolve the service details, however this file does not exist
as OracleClient is not installed. The application works fine when
OracleClient is installed, but as stated, I do not want this to be a
requirement.

How can I connect remotely to the Oracle database server in the .Net
framework without installing the OracleClient?

Thanks in advance for any help.

John Fleming
(e-mail address removed)

You could try creating a web service or remoted component on an
application server and make all db calls to that. Or you could use the
OLDB Provider instead of ODP.Net.
 
D

David Browne

Rob Schieber said:
....

You could try creating a web service or remoted component on an
application server and make all db calls to that. Or you could use the
OLDB Provider instead of ODP.Net.
The OleDB provider also requires the Oracle Client.

David
 
P

Paul Clement

¤ Hello,
¤
¤ I am developing a .Net (version 1.1) application in C# for which I need
¤ to connect remotely to an Oracle database server. To accomplish this I
¤ am using the .NET Framework Data Provider for Oracle
¤ (System.Data.OracleClient.dll). However, this application will be
¤ distributed to multiple clients so I do not want to require that they
¤ install OracleClient itself.
¤
¤ Currently the application is throwing the following exception when
¤ attempting to connect to the remote database:
¤ System.Data.OracleClient.OracleException: ORA-12154: TNS:could not
¤ resolve service name
¤
¤ The data provider is apparently attempting to find the tnsnames.ora
¤ file to resolve the service details, however this file does not exist
¤ as OracleClient is not installed. The application works fine when
¤ OracleClient is installed, but as stated, I do not want this to be a
¤ requirement.
¤
¤ How can I connect remotely to the Oracle database server in the .Net
¤ framework without installing the OracleClient?
¤

Other than a web service or remote component, as Rob mentioned, your only other option is to use a
third party solution that eliminates the client software requirement (link below). Unfortunately you
cannot connect directly from the client PC w/o first installing and configuring the Oracle client
software.

http://www.datadirect.com/products/net/index.ssp


Paul
~~~~
Microsoft MVP (Visual Basic)
 
J

John

Thanks for the help everyone. I am also using Oracle Mobile Server to
synchronize the local Oracle Lite database I am using. Is there any
way to utilize Mobile Server to make a separate call to the database,
outside the scope of synchronization?

Thanks again.

John
 
G

Guest

9i version 2 was the first Oracle version that did not require client
install. It still requires some DLLs be installed, but not the complete
client. If you are using version(s) older than this, you are out of luck.

The Oracle released ODP.NET (free download from otn.oracle.com) is better
than the Microsoft released bits (largely due to Oracle changes to the
underlying engine with each iteration). You are more likely to end up with a
thinner install with it, although it will be a larger install than a .NET
only version with .NET already installed.

The OTN site (Oracle TechNet) may have other helpful hints.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
J

John

Hello Gregory,

Thank you for responding. I was looking into ODP.NET on the Oracle
site, however according to the FAQ, that too requires that Oracle
Client be installed, the question and answer from the Oracle site are
listed below.

I have also posted this question on the Oracle TechNet site, but have
not received any replies. Please let me know if you have any further
information into which dlls from the Oracle Client are requried, maybe
I can just include them in my project.

Thanks.

John


Q: What do I need to have installed on my client machine to have
ODP.NET work?
A: You will require the following:
Windows 2000, Windows XP Professional, or Windows Server 2003
Microsoft .NET Framework 1.0 or higher
Oracle9i Client Release 2 (9.2) or higher
Oracle Net Services (included with the client)
Oracle Services for Microsoft Transaction Server, Release 2 (9.2) or
higher. This is required for applications using distributed
transacations.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top