Solved

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

Posted on 2008-10-30
6
4,269 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
  • 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

828 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