The requested OLE DB provider Microsoft.ACE.OLEDB.12.0 is not registered. If the 64-bit driver is not installed, run the package in 32-bit mode - excel

I'm trying to run a job in SQL Server Management Studio that executes a SSIS package. The SSIS package copies data from an excel file to a database.
I installed the 64-bit version of Microsoft Access Database Engine (https://www.microsoft.com/en-us/download/details.aspx?id=13255). When I tried to run the SSIS package by itself (through Data Tools, not as a job) it displayed an error about ACE.OLEDB not being registered. I got the same error when running the SSIS package as a job.
I uninstalled the 64-bit version and installed it's 32-bit counterpart. It works when I run the SSIS package by itself. When I try to run the package as a job I get the following error:
"The requested OLE DB provider Microsoft.ACE.OLEDB.12.0 is not
registered. If the 64-bit driver is not installed, run the package in
32-bit mode"
I edit the job step, go to 'execution options' and tick the 'use 32 bit runtime' box. When the box is ticked and I run the job I'm getting the following error:
"An OLE DB error has occurred. Error code: 0x80004005. An OLE DB
record is available. Source: "Microsoft Access Database Engine"
Hresult: 0x80004005 Description: "Unspecified error".
I also tried installing JET.OLEDB instaed of ACE.OLEDB but nothing works. I can run the SSIS package by itself but when I try to run it as a job step in SQL Server Management Studio I always get the two errors mentioned above depending on whether the 32 bit box is ticked or not.

It turns out that the proxy account which was used to run the job didn't have the right permissions.
https://support.microsoft.com/en-us/kb/933835

Related

No Tables or Views when Connecting to Excel file in SSIS

Visual Studio 2019
Excel 365 64-bit
Excel file has a single worksheet named raw_products
I added a Data Flow Task to my Control Flow
Added Excel Source to the Data Flow
Opened the Excel Source and clicked "New" to create a new connection manager.
Selected my Excel file (Noted that the Excel version changed from 97-2003 to 2007-2010 after I selected the file).
I selected Table or View for Data Access Mode and was greeted with the error:
No Tables or Views could be loaded
Could not retrieve the table information for the connection manager 'Excel Connection Manager'.
Failed to connect to the source using the connection manager 'Excel Connection Manager'
I went through and tried every version available and none would connect.
A quick search on SO shows that the fixes are anywhere from reverting to Windows 98 or reinstalling VS to installing 32bit or 64bit Access Database drivers.
The purpose of this task is to import the Excel file into my SQL database. If I use the SQL Import Wizard it works perfectly, and I actually saved it as a SSIS package and imported it into the package I'm working on now.
I've tried all the versions available in the connection manager, and I installed the 64bit Access Database Engine drivers (it won't allow me to install the 32bit since I have 64bit office installed). I tried changing the Run64BitRuntime option in the project properties.
I don't want to reinstall VS2019, it took me 4 hours to get it and the Integration Services installed!
EDIT: Against my better judgement I removed VS2019 and Integration Services. It took me almost 8hrs to get them reinstalled and for everything to work again since MS Visual Studio Tools were not removed or registered correctly.
I have reinstalled everything, rebooted at least a dozen times, and I am still having the same issue where it will not show anything. VERY frustrating since this is the most important part of the SSIS package.
You need to Connection manager:
One for the source (Excel) that you already added
One for the target/destination (SQL)
Do you have the second one with SQL? Can you test it if it is successful?
Once it is successful you will have list of tables and you can choose your target table from the list if it exists.

How to connect Excel to Oracle with PowerQuery

I am trying to connect Excel to my company's Oracle Database. According to the following instructions it should be fairly easy: https://www.wikihow.com/Connect-Excel-to-an-Oracle-Database.
However it has been impossible and quite frustrating so far.
I have followed two different approaches that I've found online.
FIRST APPROACH: installed ODAC from Oracle's Universal Installer
I went to this site https://www.oracle.com/database/technologies/dotnet-odacdev-downloads.html and downloaded the ODAC 12.2.0.1.1 file.
Then, I went through the installation process basically just clicking 'next' on every step.
Note 1: (I don't know if this might be important), in the Database Connection configuration tab I did not fill in any of the information (simply because I didn't know what to put there). It said that if information wasn't filled in, it would not create the TNSNAMES.ORA file.
Note 2: After finishing the installation it says 'run the SQL scripts located in the ... directory after the install'. Which I didn't do, again, because I didn't know how.
After the installation finished a directory was created in the following location: C:\app\client\myUserName\.
The directory goes all the way down to C:\app\client\myUserName\product\12.2.0\client_1, and it contains a bunch of files and folders.
I noticed that no environmental variable was created.
SECOND APPROACH: installed ODBC instant client
I went to this site https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html and downloaded both instantclient-basic-windows.x64-19.6.0.0.0dbru.zip and instantclient-odbc-windows.x64-19.6.0.0.0dbru.zip.
Then I created the directory C:\Oracle\instantclient_19_6 and unziped both folders contents into it.
Finally, I ran odbc_install from the command_line, as an administrator, but got Oracle ODBC Driver with same name already exists.
Note: in this case I also noticed that no environmental variable was created.
RESULTS:
When I go to Excel and click on Data\From Database\From Oracle Database I keep getting the same error as before: The recommended provider ('Oracle.DataAccess.Client') is not installed. You can continue with your current provider, however it has been deprecated and may not work properly.".
I was able to solve it by installing the 64 bits version of Oracle's client. Its located at https://www.oracle.com/database/technologies/112010-win64soft.html, file win64_11gR2_client.zip.
Although the message "The recommended provider ('Oracle.DataAccess.Client') is not installed. You can continue with your current provider, however it has been deprecated and may not work properly." remained, I was able to connect after ignoring it.
I have also tried a bunch of approaches and finally got rid of the 'Oracle.DataAccess.Client is not installed' error.
Install Oracle Client for Microsoft Tools:
ODP.NET, Oracle Developer Tools for Visual Studio (Code), and ODAC
https://www.oracle.com/database/technologies/net-downloads.html
Oracle Client for Microsoft Tools installs and configures ODP.NET to support 64-bit Microsoft tool connections with Oracle database. It supports connecting with Power BI Desktop, Power BI service, Excel, SQL Server Analysis Services, SQL Server Data Tools, SQL Server Integration Services, SQL Server Reporting Services, and BizTalk Server.
I have installed Oracle Client for Microsoft Tools 19.17 for (Microsoft Windows x64 (64-bit)) (V1032890-01.exe).
Alternatively, you could follow the learn more link:
Connect Microsoft Tools to Oracle Databases
https://www.oracle.com/database/technologies/appdev/ocmt.html
Tutorials > Power BI Desktop: Connect to Oracle Database
https://www.oracle.com/a/ocom/docs/database/microsoft-powerbi-connection-adw.pdf

Python MS Access COM "Server execution failed"

I recently had to reinstall Office on my computer. I am running Windows 7 home premium x64, and had to install Office 2016 x64 (click-to-run). I initially had some problems due to my Path environmental variable (not sure when THAT got messed up).
I also tried to install the ODBC drivers for Access and eventually resorted to installing the Access 2013 x64 Runtime Environment to get it. The 2016 Database Engine x64 and 2016 Runtime Environment x64 both did not want to install on my computer, probably because I had click-to-run Office 2016 installed.
Now I'm having trouble using COM commands in Python (x64, 3.5.2, Canopy environment). The specific error I get is when it tries to create an Access.Application object, and the error is "[WinError -2146959355] Server execution failed"
I suspect the issue might be due to the multiple versions of Access now available, as I currently have two "Open with" options for an Access database. The first appears to be "Office15" Access, from the Runtime Environment installer. The later is "Office16" Access, which is fully featured.
I suspect that either by editing my registry or the "Access.Application" string I could get this to work. Any ideas?
Here's the minimum code I am working with
from comtypes.client import CreateObject
access = CreateObject('Access.Application') #Error occurs here
from comtypes.gen import Access
DBEngine = access.DBEngine
db = DBEngine.CreateDatabase('test234.mdb', Access.DB_LANG_GENERAL)
db.Close()
You can't use com to create new Access.Application instances based on the runtime variant of Access. Using the runtime environment and the normal environment together on one computer is not supported, afaik. You can use the /runtime switch if you need to test things in runtime mode.
However, if you're looking to work with the DAO database engine, you can do that:
DBEngine = CreateObject('DAO.DBEngine.120')
db = DBEngine.CreateDatabase('test234.mdb', Access.DB_LANG_GENERAL)
db.Close()

Excel does not work when ssis package deployed on server

I have SSIS package that imports excel data . When I ran the package locally it works but when I deploy it to server I get the following error.
''The requested OLE DB provider Microsoft OLEDB.4.0 is not registered. If the 64 bit driver is not installed run the package in 32 bit mode .''
To solve the problem , I have installed a 64 bit driver access database Engin. I have also changed run 64 bit to false under solution property.
does anyone has a suggestions?
Run64BitRuntime(Default true) under project property is a Visual Studio environment setting, and doesn't apply to packages run outside of BIDS.
If at all you need to run the package with 32 bits outside BIDS, then enable 32 bit runtime under SQL server jobs -> General tab

SSIS 64 bit vs 32 bit

I am developing an SSIS package in VS 2012 that is being deployed to SQL Server 2012. The package is pulling data from an external database with a 32 bit driver and loading it into SQL Server 2012. I have the package set up so that it is using project parameters to store the connection strings.
I can run the package from VS and I can also run the package via 32 bit dtexec. I cannot run the package from the SQL agent. I have the job set up so that it is using a ssis proxy account.
I have also tried to run a package with an execute process task that runs the package in 32 bit dtexec.
I get the following error in all cases. It seems to be either a 32/64 bit issue or a permissions issue although I cannot figure out what it is. Any help would be greatly appreciated!
Data Flow Task:Error: The AcquireConnection method call to the connection manager MyDataBaseConMgr failed with error code 0xC0014009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
Unlike SSDT, SQL Server agent runs on 64 bit mode. You can configure SQL job to run on 32 bit mode by traversing to
Steps > Edit > Configuration > Advance

Resources