Oracle clr host - oracle

I'm so new to oracle
and I have been ordered to execute .net clr in oracle
but I'm confused now with these concepts
oracle data access components
oracle data .net extensions
please any help to put me on the right way
how I'm going to execute clr written in .net in oracle environment
I'm using oracle 12c and visual studio 2013
i have installed this oracle data access components
in this link
http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html
for oracle 12 release1
and then
download oracle developer tools for visual studio
http://www.oracle.com/technetwork/topics/dotnet/downloads/odacmsidownloadvs2013-2756823.html
and i'm getting errors when making new oracle project
is installation order wrong?

thanks for your replies
,but
i have discovered that each release of oracle has specific corresponding ODAC (oracle Data Access Components) ,and if you install un correct one you will get a lot of problems when deploying .net stored procedure (clr)
for me with oracle 12c release 1
the suitable odac were Release 4 (12.1.0.2.4) For windows x 64 found in this link
http://www.oracle.com/technetwork/database/windows/downloads/index-090165.html
when i installed these components i was able to have visual c# oracle project and then i followed this link tutorial
https://docs.oracle.com/cd/E63277_01/win.121/e63386/demo.htm#CLRNT154
and every thing in clr was ok

Related

How to uninstall deprecated Oracle Data Provider?

I am trying to install Oracle Developer Tools for Visual Studio 2015 so that I can connect to a remote 11g database from SSRS/Visual Studio Projects in general, from my dev machine. When I go to the downloads page, I see this:
So I went to Visual Studio to determine whether I already had ODT, and found this:
However, I don't think I installed this ODP, and it just came with the Visual Studio installation. Is there a way to uninstall this provider, or am I OK to just install the new ODT over top? Lastly, as I did more research for this post I became a little more unsure: does ODAC include ODP.net?
Thanks.
Microsoft OLE DB Provider for Oracle and .NET Framework Data Provider for Oracle are providers from Microsoft, i.e. they are part of your Windows installation.
Indeed, they are deprecated from many years, however there is no reason to remove them. They are just two little DLL's.
It is no problem to install Oracle Provider for OLE DB and Oracle Data Provider for .NET (ODP.NET) from Oracle, the drivers from Oracle and the drivers from Microsoft do not interfere with each other.
Yes, ODAC (Oracle Data Access Components) is a collection of various drivers, ODP.NET, OLE DB, ODBC and a few more.
Just a note, unless you use the ODP.NET Managed Driver all drivers mentioned above require an Oracle Client installation, typically an Oracle Instant Client. I think the Oracle Instant Client is also included in the ODAC package.
Maybe have a look at this post to get a little overview: How to connect to Oracle 11 database from . net

Oracle Data provider for .NET in visual studio

Newbi to oracle and its versions and .NET providers, but did some investigation.
I'm trying to add Oracle connection to the visual studio server Explorer (before setting up the Entity Framework 6 for oracle).
System preferences:
Windows 10 enterprise - 64 bit operating system
Visual Studio 2015
Oracle Data Access Components (ODAC) which includes Oracle developer Tools for Visual Studio: ODAC12C - 12.2.0.1 - it is suitable to 64 bit !
The DB is located in a remote machine and I can see the DB objects using the Oracle SQL developer. It uses the TNSNames file to locate the DBs.
when trying to "add connection" in the visual studio server explorer:
Select Data Source: Oracle DataBase
Data Provider:.NET framework data provider for Oracle.
It claims that:
"This provider is deprecated and should not be used. Instead download
Oracle Developer tools for visual studio for comprehensive integration
with Oracle database."
The problem is that the mentioned above reference links to a 32-bit Oracle Data Access Components (ODAC) bundle which includes "Oracle Developer Tools for Visual Studio". The same shXX happens when choosing .NET framework data provider for OLEDB.
Either I don't see the relevant provider in the list or there is a problem.
After inserting Server name, User name and Password in the "Add connection" dialog box, I get this error message:
"Attempt to load Oracle Client libraries threw BadImageFormatException.
This problem will occur when running 64 bit mode with the 32 bit Oracle Client components installed"
What am I doing wrong ?
Is this the way of defining connection string when I have a TNSNames file ?
Microsoft .NET Framework Data Provider for Oracle is different to Microsoft OLE DB Provider for Oracle which is different to Oracle Data Access (which can be Oracle Data Provider for .NET or Oracle Data Provider for .NET Managed Driver or Oracle Provider for OLE DB, depending on which one you installed), see How to connect to Oracle 11 database from . net
Visual Studio 2015 is 32-bit, when you like to connect to an Oracle database directly from Visual Studio Explorer then you have to download/install the 32-bit version of ODAC - and also install 32-bit Oracle Client.
In case you like to use also 64-bit Oracle Client and drivers follow this instruction: BadImageFormatException. This will occur when running in 64 bit mode with the 32 bit Oracle client components installed

ODAC for visual studio 2013

There are a lot of ODAC download at the Oracle website but I want to know what is the right ODAC to download for my VS 2013? I have a Windows 7 64-bit OS.
And also, do I need to install ODAC on BOTH my laptop (where I will create my project) and to the Oracle database server?
When I'm trying to connect to my Oracle database, it throws me this error:
System.Data.OracleClient requires Oracle client software version 8.1.7 or greater
so I read other blogs saying that I should install ODAC, but these blogs example are using either VS2005 or VS2008, but mine is VS2013
Start with easy answers:
No, you don't have to install any ODAC on Oracle database server (most likely they might be installed anyway by default)
It does not matter at all which Visual Studio you have, regarding Oracle installation they are all the same.
Now regarding your error:
"Microsoft .NET Framework Data Provider for Oracle", i.e. System.Data.OracleClient is deprecated for ages, you should not use it in new projects. You should use the Oracle provider "Oracle Data Provider for .NET" (ODP.NET), so by downloading ODAC from Oracle you have been on the right path.
When you like to use ODP.NET you also have to install an Oracle Client, otherwise it does not work (this requirement is also valid for System.Data.OracleClient, that's the actual error you get).
You can either install "Oracle Instant Client" and ODP.NET or download full Oracle Client where you can make a "Custom" installation. There you have to enable component "Oracle Data Provider for .NET" at least.
It is important to have everywhere the same architecture, i.e. Oracle Client, ODP.NET and your application must be all the same - either x86 or x64 ("AnyCPU" means x64 on nowadays 64-bit Windows). In case you have to support both x86 and x64 follow this instruction to install x86 and x64 on one machine.
Another possibility is to use the "ODP.NET Managed Driver", this one is just a single .dll and does not require any further Oracle client installation. Unlike "ODP.NET" the "ODP.NET Managed Driver" does not depend on the architecture, i.e. it works for both x86 and x64.
It does not matter whether your database is 32-bit or 64-bit. This applies for everything mentioned above.

Oracle Forms 11g compilation errors

I was recently required to take over a project which was built on Oracle Forms 11g.
I checked out the source code and tried to compile fmb files, but I received a large number of comile errors, below are some typical errors for examples
identifier 'TO_MESSAGES.MODULE' must be declared
identifiter 'TO_MESSAGES.MESSAGE' must be declared
Oralce developer in my company suggest these errors maybe related into incorrect Oracle Forms installation and some missing core libraries. I tried to re-install all required software, but the errors are still there. I am new to Oracle Forms development, could anyone point me to right direction ?
Here is information about my local environment and tools
Windows 7 Enterprise 64 -bit
Oracle Portal, Forms, Reports and Discoverer 11g (11.1.1.2.0) for Microsoft Windows x86 (64-bit)
Oracle Portal, Forms, Reports and Discoverer 11g Patch Set 3 (11.1.1.4.0) for Microsoft Windows x86 (64-bit)
Oracle Form Builder 11.2.0.4.0
Java version "1.6.0_45"
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0
By looking the above errors it does not seems to related to Oracle forms installation. I think these are functions and procedures which have been declared in plsql libraries created by developers and these libraries are not attached to the form.
Check for the .pll files in your source code and try to attach to the form and compile after that and then it should be compiled.

connect with oracle database through visual studio 2010

I have installed oracle database 11gR2 and visual studio 2010 32 bit. Then I tried to install odac for oracle client 11.2.0.1.2. It gives this error.
"Oracle Data Access Components for oracle client 11.2.0.1.1 can only be installed over and existing Oracle client 11.2 Hoeme. Use Oracle Data Access Components for Oracle server 11.2.0.1.0 to install in Oracle server 11.2.0.1.0 Home."
I can't understand what to do next.Hope your helps...
thank you.
When you install, choose a new Oracle Home directory with the client. If you want a step by step guide how to do this, follow this tutorial:
http://docs.oracle.com/cd/E17781_01/appdev.112/e18751/installation.htm#CACBIDHI

Resources