cannot connect to oracle database server in crystal report development - oracle

I just tried to connect oracle database server when I tried to add the database connection in crystal report through Visual Studio 2015
So steps I followed as following
Create an empty crystal report
then right click on that report
Database Expert > Create New Connection > OLE DB(ADO) > Provider > Microsoft OLE DB Provider for Oracle
Then Following window
once I give above details and hit the finish
I'm getting following error
Error
Logon failed Details: ADO Error code: 0x80004005 Source: Microsoft
OLE DB Provide for Oracle Description ]: Oracle client and networking
components were not found These components are supplied by Oracle
Corporation and are part of the Oracle Version 7.3.3 or later client
software installation.
Provider is unable to funtion until these components are installed.
I'm having 32-bit Visual Studio 2015, in my Local machine I have installed 32-bit Oracle Client and Oracle Database server that is I'm going to connect has 64-bit Oracle 11g database
What should I do to make this work?

Related

SSIS Oracle connector

I am in the process of setting up a new SQL server 2019 standard edition. (due to price unable to go to enterprise edition)
The issue I am having is I have re-written a SSIS package that uses an oracle connector within the package to push data into my SQL server tables.
However when I run this in SSMS it returns an obvious error:
I have also tried to run this via CMD line however returns the same error.
My query is there a way for me to auto extract data from an oracle DB using SQL server 2019 Standard edition.
Due to license restriction we are unable to have VS installed on the server.
Any ideas would be much appreciated.
TIA

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

Connecting to Oracle thru Excel 2013

While connecting to Oracle thru Excel 2013, i am getting below error. Oracle is installed on Remote Machine. Please advise how to move forward. Do I need to install something on my local machine?
Thanks
Error
The provider being used is depracated System.Data.OracleClient requires Oracle client software version 8.1.7 or greater
you need do what the error says: install Oracle client
link to Oracle client 32bit
link to Oracle client 64bit

Driver Issues connecting to Oracle 11g using MS OLE driver from SSIS

I am having driver issues trying to connect to an Oracle Database 11g in an SSIS SQL Server Integration Package.
In SSIS, I created a OLE Database Connection using the Native OLE DB\Microsoft OLE DB Provider for Oracle. When I test the connection, the outcome is successful but I run into issues when I attempt to reference this Connection from an OLE DB Source task.
In the OLE DB Source task, I am able to see all of the tables but when I select one, I get the following error:
Exception from HRESULT: 0xC02020E8
Error at Data Flow Task [OLE DB Source [1]]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft OLE DB Provider for Oracle" Hresult: 0x80004005 Description: "Unspecified error".
An OLE DB record is available. Source: "Microsoft OLE DB Provider for Oracle" Hresult: 0x80004005 Description: "Oracle error occurred, but error message could not be retrieved from Oracle.".
An OLE DB record is available. Source: "Microsoft OLE DB Provider for Oracle" Hresult: 0x80004005 Description: "Data type is not supported."
Error at Data Flow Task [OLE DB Source [1]]: Opening a rowset for ""MySchema"."MyTable"" failed. Check that the object exists in the database.
I did not see any Oracle OLE drivers to select. I considered downloading one (ODAC101040.exe (174MB)) from here:
http://www.oracle.com/technetwork/database/windows/utilsoft-088126.html
but the download was very large and I already have 2 oracle drivers on my PC that are very large install. I'd hate to download more drivers that I need because they are huge downloads and my company probably would rather me not be a maverick downloader, but if I know what I need instead of trial and error downloading, it'll get done.
When I look on my PC under Startup->All Programs, I see the following menu folders:
Oracle - OraClient11g_home1
Oracle - OraClient11g_home1_32but
I do not have Admin rights on my PC but I do have elevated rights. When I run the Net Configuration Assistant under the 32 bit folder, I test the connection and it works fine. When I try to run the 64 bit version, nothing comes up.
I only seem to have 1 TNS file on my PC,
c:\windows\tnsnames.ora
this file was manually edited originally. I suspect that it is associated with my 32 bit driver. I expected to find my TNS files under these two folders, but did not find any:
C:\Oracle\product\11203_32bit\CLIENT_1\NETWORK\ADMIN\
C:\Oracle\product\11203_62bit\CLIENT_1\NETWORK\ADMIN\
Here's my version of the Oracle database that I am trying to connect to:
1 Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
2 PL/SQL Release 11.2.0.3.0 - Production
3 CORE 11.2.0.3.0 Production
4 TNS for Linux: Version 11.2.0.3.0 - Production
5 NLSRTL Version 11.2.0.3.0 - Production
What driver should I install to get my SSIS Package to work? I'd prefer to download a compatible (newer?) MS OLE driver but would be willing to install others.
Added Info:
My connection string:
Data Source=MyDb.MyCompany.COM;User ID=MyEffinId;Provider=MSDAORA.1;Persist Security Info=True;
I prefer the Attunity then Oracle then Microsoft drivers, in that order. Attunity requires SQL Server Enterprise Edition.
I tend to only install the 32-bit versions and force the packages to run in 32-bit mode to avoid wasting time on setup, config & patching on every developer machine and server, and also avoid the obscure issues between the versions.
The Microsoft driver seems to be the best one for calling Oracle Stored Procedures and passing parameters.

How is Visual Studio 2010 connecting to SQL Server 2008 if I don't have the native client installed?

I have MS VS 2010 installed on my Windows 7 but, I don't have the SQL Server Native client installed in it.
After loading Visual Studio I do click menu Data / Transact-SQL Editor / New Query Connection.
The SQL Server 2008 R2 login dialog will show up, I type server name, select SQL Server authentication, type username and password and click connect. The connection is established and an editor window shows up and I'm ready to query!
I understand the SQL Server 2008 native client files are sqlncli10.dll, sqlnclir10.rll. I did search for these files in my entire hard drive and they weren't found.
So, how is Visual Studio 2010 connecting to SQL Server 2008 if I don't have the native client installed?
Is VS 2010, when connecting to SQL Server 2008, using .NET Framework assemblies?
The .NET Framework already contains the Sql Server (and other) Database clients.
Have a look at System.Data.SqlClient
If NO native client is installed, Visual Studio 2010 is using the .NET Framework version 4.0 to connect to SQL Server 2008 R2 when connecting through menu Data/Transact-SQL Editor/New Query Connection.
I verified and it is loading assembly System.Data.dll (located under C:\Windows\Microsoft.NET\Framework\v4.0.30319) to establish the connection to the server.
I have not installed the Native client 10.0 for SQL Server 2008 R2 and I'm not using it right now but, if installed, the native client files (sqlncli10.dll, sqlnclir10.rll, and s10ch_sqlncli.chm) should be found under
%SYSTEMROOT%\system32\
which are installed as part of the SQL Server installation.
There is also a redistributable installation program named sqlncli.msi, which should be found on the SQL Server installation CD under
%CD%\Setup\
The reference for installation details
http://msdn.microsoft.com/en-us/library/ms131321.aspx
And the reference for the SQL Server 2008 R2 Native Client Features
http://msdn.microsoft.com/en-us/library/ms131456.aspx
The key piece of information here is:
You do not need to install SQL Server Native Client on your client machine (in this case your dev box where Visual Studio is), in order for an application using ADO.Net, to connect to SQL Server.
The reason is as #dknaack said: the .Net framework contains the code required to make the connection. This is contained in System.Data.SqlClient.
SQL Native Client on the other hand is used by unmanaged applications to connection to SQL Server via either OleDB or ODBC providers.
In short:
System.Data.SqlClient - used for connections from managed code to SQL Server i.e an ADO.Net connection
SQL Server Native Client - used for connections from unmanaged code to SQL Server
Whilst you CAN connect to SQL Server from a managed app using SQL Server Native Client, it is not a recommended practice:
If you are developing a new application, it is recommended that you
consider using ADO.NET and the .NET Framework Data Provider for SQL
Server instead of SQL Server Native Client to access all the new
features of recent versions of SQL Server.
References:
https://learn.microsoft.com/en-us/sql/relational-databases/native-client/sql-server-native-client-programming?view=sql-server-2017
https://learn.microsoft.com/en-us/sql/relational-databases/native-client/applications/using-ado-with-sql-server-native-client?view=sql-server-2017

Resources