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

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.

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

Getting BIDS 2008 R2 to connect to Oracle using MSDAORA on Windows 8

I have a new dev machine, and I need to support legacy SSIS packages. The new machine is Windows 8 64 bit with a SSD primary drive (C:) and a regular HDD for data (D:). On it, I have installed BIDS 2008 R2 (and all the tricks to get it to work with TFS2010), as well as VS2010, ODAC 32 bit and 64 bit (I think??), Oracle Client (SQLDeveloper).
I can get the following to connect just fine to an Oracle database:
VS2010 with MSDAORA
VS2010 with ODAC
VS2010 with ADO.NET
Test connection using .udl file with Oracle OLE DB Provider (MS provider does not show up as an option here)
SQLDeveloper (Oracle's Client Tool)
What I CAN'T seem to do is get BIDS 2008 R2 to connect to Oracle using ANY method (MSDAORA, ADO.NET, ODAC).
The problem seems isolated to my machine, I can otherwise open, view, validate, connect and run these packages on other machines with no issues.
I have tried the following:
Ensured any/all TNSNAMES files are correct and identical (taking working copies from other machines, and let's not forget, this works fine in VS2010)
Created ORACLE_HOME and TNS_ADMIN Environment Variables and pointed them to various directories within D:\app\username\product\11.2.0
Checked registry manually to make sure no other references to ORACLE except for the entries in HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
Unistalled/Reinstalled SQL Server 2008 R2 components
Every "solution" offered in every thread in every search I have tried
Thrown chicken bones and offered sacrifices to pagan deities
After each attempt at a fix, I still get the following error when trying to Preview a SQL Command in the Data Flow:
An OLE DB record is available. Source: "Microsoft OLE DB Provider for Oracle" Hresult: 0x80004005 Description: "Error while trying to retrieve text for error ORA-01019"
Yes, I know I need to drop MSDAORA in favor of ODAC, and if ODAC worked in BIDS 2008 R2 I would certainly do it. However, I can't get anything to connect to Oracle there (even though, as mentioned above, it connects fine in various other tools)
I have two "client_n" directories in D:\app\username\product\11.2.0. As mentioned, I have tried pointing my environment variables to various paths inside. It seems like the correct path for ORACLE_HOME should be just D:\app\username\product\11.2.0, correct?
Has anyone had any luck getting BIDS 2008 R2 to connect to Oracle while on WINDOWS 8 with VS2010 also installed? It seems to me like it's a simple Oracle connection issue, I just don't know enough about Oracle to troubleshoot.
Any other ideas to try?
BIDS is x32 (even on an x64 machine), so you will need to install the Oracle Client x32 edition, Full Install.
We were able to get it to work, though I believe that we installed too much software. (I have not been able to test it with only the ODAC drivers.)
Install the Oracle Client 32 & 64-bit drivers.
Install the Oracle ODAC 32 & 64-bit drivers.
In BIDS use the native Oracle connection, and not the Microsoft driver.

Resources