Oracle Data provider for .NET in visual studio - oracle

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

Related

Add providers to VS 2008 Connection Manager?

With Visual Studio 2008 I'm trying to connect to an Oracle database using Oracle Provider to OLE DB (the only Oracle driver available in dropdown), and I'm having issues with it. So I'm trying to add other drivers to that VS2008 "Connection Manager" dropdown. Unfortunately, I only see the ones in this screenshot
How can I add other drivers to this dropdown? When I create an ODBC driver, I see several other Oracle drivers to choose from that I don't see in the VS2008 dropdown.
You installed more than one Oracle Client, this is always a bad idea. Usually there is no reason to install more than one Oracle Client, i.e. one each for 32-bit and 64-bit.
For OLE DB you cannot install more than one driver (per architecture), see Installation Considerations for Oracle Database Client:
You can install all Oracle components in multiple Oracle homes on the
same computer. However, some components can only support one active
instance at a time. This means that the current (latest) installation
renders the previous one inactive. These components are:
Oracle Administration Assistant for Windows
Oracle Provider for OLE DB
This is a limitation in COM. So, you cannot add other providers, at least no other Oracle Provider for OLE DB
You could use the Microsoft OLE DB Provider for Oracle (MSDAORA), however this has been deprecated for ages and it is really not recommended to use it.
Instead of OLE DB you could also use ODBC or use the Oracle Data Provider for .NET, you can download and install it from here: 32-bit Oracle Data Access Components (ODAC)
As far as I know Visual Studio 2008 supports only .NET Framework only up to version 3.5, thus you would have to use the Oracle Data Provider for .NET 2.0, version 4 will not work.
Maybe this list provides an overview for you: How to connect to Oracle 11 database from . net
If you like to get a list of all OLE DB providers which are installed on your machine, check this one: How to check the version of oracle provider for ole-db. OraOLEDB.Oracle provider

How can I fix ORA: 01013 (user requested cancel...) when trying to link Oracle tables in MS Access?

I have installed Oracle Express (XE, version 18) on a Windows 10 (64-bit) machine with Office 365 (32-bit) installed. I have installed the correct Oracle Instant Client (18_3) and its ODBC package (32-bit versions). I successfully created a DSN using the ODBC Data Source Administrator (32-bit) tool in windows.
When I attempt to link tables into an Access database, I get error ORA: 01013. If I remove the timeout from the DSN configuration, it simply spins with the Oracle RDBMS kernel eating up CPU cycles for as long as I'm willing to sit and wait.
I have to be missing a configuration parameter somewhere on either the Oracle side or the Microsoft side, or I'm missing a Microsoft component. MS Visual Studio C++ redestributables for 2010, 2013, and 2017 are already present and Microsoft updates indicates that my .NET framework is up to date.
I have attempted this same task with Oracle 12c and instant clients 12_1 and 12_2. In both cases, the behavior is the same.
Any and all ideas sincerely appreciated!

How do I do an ODBC connection to ORACLE from SSIS/ Visual studio?

Despite that OLE DB and ADO.NET are newer than ODBC potentially, I've heard that ODBC connections to Oracle are potentially faster within SSIS.
I'm trying to set up a simple ODBC connection to an Oracle DB in SSIS
The OLE DB / ADO.Net connections were easy. I entered the credentials and boom, connected.
ODBC proves very difficult. I'm running Windows 10 64 bit. Visual Studio 2015 (I believe the designer for SSIS was only meant to initially play with 32-bit ODBC connections). Oracle is version 12c.
So ... I did the convoluted Oracle driver install. Downloaded Oracle basic light express + ODBC. Put them in the same directory. Ran odbc.install.exe WITH admin privileges. Finally got the Oracle driver to show up in Microsoft ODBC (32 or 64, ended up downloading both eventually). I test the connection in Microsoft ODBC setup? Success!! NOOOOW. .. enter Visual studio. Set up connection --- test --- FAIL! Some cryptic error .... 127 ... the "oracle" in quora32.dll can't be found.
Are Microsoft Drivers for Oracle still available for download?
32-bit vs 64-bit
I think that the main cause of the problem is that Visual studio is a 32-bit application and the ODBC driver installed is 64-bit. On the other hand the operating system is 64-bit then it will work normally. Check the following links for more information:
ODBC Connection not appearing SSIS
Set up the ODBC Driver for SSIS
Attunity connectors
I really didn't tried connecting to Oracle using ODBC, but if your goal is to achieve higher performance then the fastest way to connect to Oracle from SSIS is using Attunity high speed connectors for Oracle that have been selected by Microsoft to be included with SQL Server Integration Services (SSIS).
Check the following links for more information:
Microsoft Connectors for Oracle and Teradata by Attunity for Integration Services (SSIS)
Microsoft Connectors by Attunity
Oracle provider for Oledb missing in VS 2015 Shell
SSIS not running in parallel with OraOLEDB.Oracle.1 Provider
As noted in various ways on this question, the VS IDE (and its typical testing environment) is 32-bit, even when installed/running on 64-bit Windows, or when building for use/deployment on 64-bit Windows. My employer has a knowledgebase article discussing this.
Also, SQL Server, SSIS, and VS are always OLE DB or ADO.NET clients; they don't actually speak ODBC directly. When you tell either SQL Server, SSIS, or VS to connect to an ODBC driver or ODBC DSN, they invisibly use the Microsoft OLE DB [Bridge] Provider for ODBC Drivers for that connection.
The easiest way to work around all this, given that you explicitly want to use ODBC, is to install both 32-bit and 64-bit variants of all OLE DB (including the Bridge Provider) and ODBC components (and any libraries on which they depend, such as OCI or Oracle Instant Client), and to configure a pair of ODBC System DSNs (not User DSNs, for several reasons), one each 32-bit and 64-bit, which are named and configured identically excepting only the driver library.
This strategy works whether you're using ODBC drivers from my employer (which might be the "12-15x faster" ones referenced previously? if so, it's important to note that Enterprise Edition "concurrent users" is about actively connected clients, not installed seats), from another third-party, or from Oracle themselves.

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 clr host

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

Resources