Solved

How to configure ODP.NET XCOPY installation on client machine?

Posted on 2008-10-30
6
4,364 Views
Last Modified: 2013-11-11
I have created a Windows service that interacts with an ORACLE database. For talking with the database I am using the latest version of ODP.NET.
Now, I want to install the service on a client server. However, I do not want to install a full-blown ORACLE client. I only want to copy the necessary files to the server.

Found the following from a thread in the ORACLE forum:

------------------------------------------------------------------

"if you're using ODP.NET 11g and .NET framework 2.0, then try copying these files into your ASP.NET application bin folder

oci.dll
ociw32.dll
Oracle.DataAccess.dll
orannzsbb11.dll
oraociei11.dll
OraOps11w.dll


And make sure you're using easy connect naming for your connection string in your web.config file, similar to below sample

<connectionStrings>
   <add name="ConnectionString"
        connectionString="Data Source=//192.168.2.8/xe;Password=hr;User ID=HR"
        providerName="Oracle.DataAccess.Client"/>
</connectionStrings>


Just replace 192.168.2.8 with your server ip/name and xe with your database service name."

------------------------------------------------------------------

I tried this, but still the service cannot find the dataprovider.
Something tells me that I should have added something to the registry or to the PATH.
Does anyone know what I am missing?
0
Comment
Question by:Ole_Brun
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 48

Expert Comment

by:schwertner
ID: 22839651
Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MyOracleSID)));User Id=myUsername;Password=myPassword;

see

http://www.connectionstrings.com/?carrier=oracle
0
 

Author Comment

by:Ole_Brun
ID: 22839704
schwertner,

Not sure what you mean by this.
I forgot to mention that the connectionstring "Data Source=//myip/prd;Password=pwd;User ID=User" is actually working on my development machine. Only difference is that i ran an installation script for ODAC on this machine. I'd rather not do that on the customer server.
Using EZconnect so that I don't need tnsnames.ora.
0
 

Accepted Solution

by:
Ole_Brun earned 0 total points
ID: 22841050
Looks like I'm having a breakthrough here!
Added the following to my app.config file:

<system.data>
  <DbProviderFactories>
    <add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client"
description="Oracle Data Provider for .NET"
type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess,  Version=2.111.6.20,
Culture=neutral, PublicKeyToken=89b483f429c47342" />
  </DbProviderFactories>
</system.data>

I cannot seem to find any documentation on this though.

However now I am facing a different problem (which I'm also facing using Microsoft's Oracle data provider.
Error message:

Oracle.DataAccess.Client.OracleException ORA-12705: Cannot access NLS data files or invalid environment specified    at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure)
   at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src)
   at Oracle.DataAccess.Client.OracleConnection.Open()

This is happening when accessing the database from the server.
When running the same application from a client machine, it seems to be working.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Ole_Brun
ID: 22848225
I have been debugging this issue for some time now, and the only solution (or workaround) I have found, is to delete the NLS entry in the registry.
This is ok on a client machine, but when installing the application on an ORACLE server, this is probably not a very good solution.
Anyone who know a different solution to this problem?
0
 
LVL 48

Expert Comment

by:schwertner
ID: 22848251
On the server NLS_LANG parameter is very important and if you use the application there
all components that ensure language transformation should be available. And apparantly this is not the case.
Concentrate on the client site. Oracle also have 'thin client", that is not so big as the normal Oracle client.
0
 

Author Comment

by:Ole_Brun
ID: 22849591
Thanks for you answer!

I have tried using both the ODP.NET client and the Microsoft Oracle client, but with the same result.
The error message regarding the NLS_LANG pops up. Strangely this only happens when running the .NET 2.0 version of the application. I have an older version using .NET 1.1, and that works fine.

One of our clients will have the application running on an ORACLE server, which means it will not work.
This is becoming a big problem, and I have to find a way around it asap.
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
Suggested Courses

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question