Solved

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

Posted on 2008-10-30
6
4,195 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 47

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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

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 47

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Via a live example, show how to take different types of Oracle backups using RMAN.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

762 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now