Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2008-10-30
6
Medium Priority
?
4,434 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
Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 

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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

715 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