This is a migrated thread and some comments may be shown as answers.

Oracle Connection Issue

16 Answers 1372 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Bruce
Top achievements
Rank 1
Bruce asked on 31 May 2011, 06:25 PM
I'm getting the following error when trying to create a Domain Model:

Unable to retrieve the database schema information.
Reason: Could not load file or assembly 'Oracle.DataAccess, Version=2.102.2.20, Culture=neutral, PublicKeyToken=89b483f429c4724' or one of its dependencies.  The system cannot find the file specified.

My project has a reference to Oracle.DataAccess.dll version 2.112.1.0 and it appears that this is the only DLL provided in ODP.NET.

Is my newer version the cause of the problem?  Does Oracle.DataAccess.dll have a dependency that is not apparent?  Any guidance would be appreciated.

16 Answers, 1 is accepted

Sort by
0
Ralph Waldenmaier
Telerik team
answered on 01 Jun 2011, 04:32 PM
Hi Bruce,

You need to have ODP.NET installed on your machine, which you can download from here. The installer install's a policy file to your GAC which looks like this:

Policy.2.102.Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=x86

OpenAccess links against a 10.2 version of the client. The policy file redirects the version to 2.112.1.0. You can either add it manually or uninstall everything and reinstall ODP.NET. This way you will get the policy file installed automatically. You do not need the 10.x version if you have this policy file. 
Hope this helps.

All the best,
Ralph
the Telerik team
Q1’11 SP1 of Telerik OpenAccess is available for download; also available is the Q2'11 Roadmap for Telerik OpenAccess ORM.
0
Libertad
Top achievements
Rank 1
answered on 02 Oct 2011, 12:08 AM
Hi Ralph,
Please describe your solution more.
I uninstall everything and reinstall ODP.NET 11.2.0.2.1 and have a policy you mentioned in GAC but I still have the same above error.

Thanks
0
Ralph Waldenmaier
Telerik team
answered on 04 Oct 2011, 10:12 AM
Hello Libertad,

Please ensure that you have the same version of the ODAC driver installed as your application is.  If you are running a x86 program please install the x86 version of the Oracle ODAC drivers. The same goes for x64.
32 bit applications (x86 build setting) require the 32 bit ODAC ro be installed; 64 bit applications (i64 build setting) require the 64 bit ODAC version. 

Hope that helps.

Kind regards,
Ralph
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's SQL Server Community Awards. We are competing in TWO categories and every vote counts! VOTE for Telerik NOW >>

0
Libertad
Top achievements
Rank 1
answered on 04 Oct 2011, 02:11 PM
Hello Ralph,
I have not any problem regarding the installed ODAC driver in my development machine which is a Win7 32bit. I have this error only on production machine which runs on Windows Server 2008 R2 64bit.
I have installed the latest version of ODAC driver 32 bit on the server which I've downloaded from here.
Regarding my development machine OS (Win7 32bit) the build type of my application is x86 and since 32 bit of ODAC has been installed on the server, so my application should work fine on the server, but I'm getting the above mentioned error when I run my application from server.
What do you think Ralph?
0
Ralph Waldenmaier
Telerik team
answered on 04 Oct 2011, 04:49 PM
Hello Libertad,

I guess you are using this DLL within an IIS setup. Have you checked that your Application Pool supports 32bit applications. This can be set in the settings of the Application Pool.

Hope this helps.

All the best,
Ralph
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's SQL Server Community Awards. We are competing in TWO categories and every vote counts! VOTE for Telerik NOW >>

0
Libertad
Top achievements
Rank 1
answered on 04 Oct 2011, 07:40 PM
You just made my day Ralph.
Thanks a lot
0
Shravan
Top achievements
Rank 1
answered on 19 Dec 2011, 05:21 PM
I have a similar issue, but I want to downgrade instead from Oracle 11g Data Provider to Oracle 10g Data Provider for our prod. I am using Telerik.OpenAccess.dll ver2011.02. I get the same error specified here above and am seeking a quick solution.

Thanks,
Shravan
0
Ralph Waldenmaier
Telerik team
answered on 20 Dec 2011, 08:41 AM
Hi Shravan,

I'm not sure, if I understood what your problem is, but if you face the same problem regarding the x86 drivers and you are in an IIS environment, then you can also enable support for 32Bit applications for your App pool. 
You can use the Version 10.2 or higher of the ODP.net driver with Telerik OpenAccess ORM. Your downgrade should not be the reason for such an error.

I hope this information is useful for you. Do not hesitate to contact us if you need further assistance or you have other questions.

Greetings,
Ralph
the Telerik team

Q3’11 of Telerik OpenAccess ORM is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Shravan
Top achievements
Rank 1
answered on 20 Dec 2011, 10:51 AM
Nopes, its not working(10.2 client for 11g via ORM).

I cleaned up my computer from all previous installations of Oracle and Telerik ORM. Then installed Oracle 10.2 Client Win32 runtime components (and even Instant Client and even Custom configuration), updated my tnsnames.ora, I could only create a new connection to my Oracle server using either Oracle Data Proider .NET or .NET Data Provider for Oracle in Telerik ORM Q3 2011, but in the next screen in Choose database items on New Domain Model Wizard, I still get the error Could not load file or assembly 'Oracle.DataAccess, Version=2.102.2.0....The system cannot find the file specified. I see that I have got Oracle.DataAccess.dll ver10.2.0.100 installed in GAC and also the Policy.9.2.Oracle.DataAccess.dll ver10.2.0.100. I could even use VS2010 Server Explorer to query my Oracle database. I even switched to x86 build. But, I just can't use Telerik ORM to work with Oracle 11g using 10g client. Is there anything that I am not aware of?

I appreciate your response.

Thanks,
Shravan.
0
Ralph Waldenmaier
Telerik team
answered on 20 Dec 2011, 02:46 PM
Hi Shravan,

Can you please check your machine.config file (mine is located at C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config), if you have an entry similar to the following under the DbProviderFactories node? 

<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=4.112.2.40, Culture=neutral, PublicKeyToken=89b483f429c47342" />

You should have an entry depending on the client you have installed.

I really hope you get your application running with this entry.
Best wishes,
Ralph
the Telerik team

Q3’11 of Telerik OpenAccess ORM is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Shravan
Top achievements
Rank 1
answered on 20 Dec 2011, 08:42 PM
Can I have 11g Client on my developer PC and 10g on Prod? Could you explain how to do this?

Thanks,
Shravan
0
Ralph Waldenmaier
Telerik team
answered on 21 Dec 2011, 09:33 AM
Hello Shravan,

Since you don't have to add any reference to the ODP.net assemblies in your project, you can simply deploy you application to the production environment without any additional efforts. The respective driver is resolved through the entries in the machine.config on the hosting system. We are assuming that the driver was installed on that system before, so the respective entries should be there.
Therefore it is possible to have a 11g client on your dev machine and a 10g client on your prod machine.

All the best,
Ralph
the Telerik team

Q3’11 of Telerik OpenAccess ORM is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
uugaa
Top achievements
Rank 1
answered on 22 Feb 2013, 02:21 PM
i'm follow this blog sample code http://alderprogs.blogspot.com/2009/04/deploying-odpnet-with-oracle-instant.html


static void Main(string[] args) {
OracleConnection conn = new OracleConnection("User Id=scott;Password=tiger;Data Source=machine_name/service_name");
conn.Open();
OracleCommand cmd = new OracleCommand("select sysdate from dual", conn);
DateTime dtm = (DateTime)cmd.ExecuteScalar();
Console.WriteLine("Database time is {0}", dtm.ToString("F"));
cmd.Dispose();
conn.Dispose();
}

this is code good work

my project openaccess orm using
this exception error
Could not load file or assembly Oracle.DataAccess

i'm odac install windows xp sp3 32bit comuuter run application is werry good work.

odac never install any computer run my project?
 my requirement:  never install oracle client  and run my project 

sorry my bad english :P

tnx

0
Ralph Waldenmaier
Telerik team
answered on 25 Feb 2013, 08:21 AM
Hi uugaa,

Can you please ensure that your Oracle.DataAccess dll platform version matches your project's platform.
For an x86 platform, you need the x86 Oracle.DataAccess assemby. Same goes for x64. In case your project is configured to use Any CPU, then you need the platform of your OS.

I hope this helps.
Do come back in case you need further assistance. 

All the best,
Ralph
the Telerik team
Q3'12 SP1 of OpenAccess ORM packs Multi-Table Entities mapping support. Check it out.
0
uugaa
Top achievements
Rank 1
answered on 25 Feb 2013, 08:46 AM
tnx
my project platform X86 debug

my solution app.config file add this config add good work any other computer

<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.112.3.0,
                  Culture=neutral,
                  PublicKeyToken=89b483f429c47342" />      
    </DbProviderFactories>
  </system.data>
0
Ralph Waldenmaier
Telerik team
answered on 25 Feb 2013, 12:56 PM
Hello uugaa,

I was following the example link provided by you and based on this I have created two sample applications that use this approach. One via the way from the link, the other via OpenAccess.
For the attached packaged, I have removed all the Oracle dlls. To run this project, please add them as described in your link. This should be done in the OAXCopy and in the OracleXCopy test project. Also please adjust the connection strings and Oracle.DataAccess version informations appropriately.
With this I was able to connect to the oracle database via the direct connection approach and via OpenAccess.
Can you try if this also works in your environment?
Have you ensured in your application that you have the appropriate versions of the assemblies? What exceptions are you getting on your side?

I hope the sample application is useful for you.
Do come back in case you need further assistance.

Greetings,
Ralph
the Telerik team
Q3'12 SP1 of OpenAccess ORM packs Multi-Table Entities mapping support. Check it out.
Tags
General Discussions
Asked by
Bruce
Top achievements
Rank 1
Answers by
Ralph Waldenmaier
Telerik team
Libertad
Top achievements
Rank 1
Shravan
Top achievements
Rank 1
uugaa
Top achievements
Rank 1
Share this question
or