error while exporting data in an ssis package to an excel destination - excel

I just moved my ssis package from my desktop to my server.The package exports data from sqlserver to an excel sheet. I see the following error when I try to run the package. The error occurs in the excel destination of the dataflow task.
Error at Package [Connection manager "Excel Connection Manager"]: SSIS Error Code DTS_E_OLEDB_NOPROVIDER_ERROR. The requested OLE DB provider Microsoft.ACE.OLEDB.12.0 is not registered. Error code: 0x00000000.
An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered".
Error at Data Flow Task [Excel Destination [16]]: SSIS Error Code
[Excel Destination [16]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC020 9302. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
I also made the following changes as I had errors before and the package wouldnt even run .
Set the delay validation to false on the data flow task.
set the Run64bitruntime under the project properties to true
Can anyone tell me what I need to do ?
PS : I am running the package on the server and MS excel is not installed on it . Could that be causing the error ?

PS : I am running the package on the server and MS excel is not
installed on it . Could that be causing the error ?
Yes
I did also find another thread describing a solution:
HOW TO: FIX ERROR - "the 'microsoft.ace.oledb.12.0' provider is not registered on the local machine
Which does not involve installing the full version of Office:
NOTE: this DOES work for office 2010 even though it is for 2007
office, dont ask me why it just does :)
download and install this: http://www.microsoft.com/download/en/confirmation.aspx?id=23734
in VS click add data source, follow the wizard and enjoy! :)
They are using Visual Studio but I imagine you should be able to run your SSIS package without having to "add a data source" as it's looking for the COM componetmicrosoft.ace.oledb.12.0 which should now be registered.

I ran into this once and had to save the excel sheets as .csv and use a flat file connection manager:
http://msdn.microsoft.com/en-us/library/ms140266.aspx

an alternative is using 32bit option in SSIS project.
Right Click on Solution and select Properties > Select Debugging and specify FALSE for option Run64Bitruntime

Related

failed to connect to excel connection manager

Good day guys, i have been struggling for days to connect to excel as a data source, i kept getting this error message while trying to select sheet name. At first i found a solution that told me to install the 32bit ace oledb drive which i did and it worked, but then i tried running another project and it started to give the same error message, i have tried almost every fix i have come across on the internet but still yet it keeps failing, i even uninstalled my ssdt to see if it would help but still same error message, i have changed run64bitruntime to false still not working. i need help guys, thanks.
"TITLE: Microsoft Visual Studio
Could not retrieve the table information for the connection manager 'Excel Connection Manager'.
Object reference not set to an instance of an object.
BUTTONS:
OK
error message

Excel file on network share - It is already opened exclusively by another user, or you need permission to view and write its data

I am developing an SSIS package that uses a data flow task that has an Excel source. The provider for the connection is Microsoft.ACE.OLEDB.12.0.
If I point the connection manager to a local file on my computer and run the package in Visual Studio, it completes successfully.
However, if I point the connection manager to a UNC network share on my local domain, and run the package from Visual Studio, it fails with the following messages:
Error: 0xC0202009 at MyPackage, Connection manager "Excel Connection Manager": SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft Access Database Engine" Hresult: 0x80004005 Description: "The Microsoft Access database engine cannot open or write to the file ''. It is already opened exclusively by another user, or you need permission to view and write its data.".
Error: 0xC020801C at Data Flow Task, Excel Source [2]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
More info:
The file from the UNC share is identical to my local file.
The file from the UNC share is not open before running the package.
My domain user (which I use to run Visual Studio) has Owner permission level for the UNC share. Also, Everyone has Read permission level for the UNC share.
Run64BitRuntime is set to False (probably not relevant).
I am runing Visual Studio locally.
Solved it by using a variable for the file path and then using that variable as an expression for the ConnectionString property of the connection.
I also doubled the backslashes in the variable that contains the pash, so instead of \computer\share\ I used \\computer\share\.
My guess is that the slashes solved the problem, but I've yet to test and find out for sure.

How can I update an Excel workbook from a scheduled SSIS package?

I have an SSIS package that imports data, then needs to update an Excel workbook for emailing. The Excel workbook contains a number of data connections set to auto refresh on open.
I have tried a number of ways to open the Excel workbook to force a refresh before emailing, and they all work when I run the package from Visual Studio, but don't work when invoked by the SQL Server agent.
Using this code from Jessica Moss, I get this error
DTExec: The package execution returned DTSER_FAILURE (1)
Using the SSIS Excel Refresh Task package from codeplex I get this error
The Execute method on the task returned error code 0x800A03EC
(Microsoft Excel cannot access the file '[my filename]')
Using a powershell update script I get this error.
DTExec: The package execution returned DTSER_FAILURE (1)
The agent is executing via proxy account with all the necessary permissions.
Excel is installed on the server.
How can I get the workbook to update when running from the SQL server agent?
Go to the system profile directory
%windir%\System32\config\systemprofile
Create a folder called desktop
Now the Excel workbook will update using any of the above methods.

Calling MS Ace Database Engine V12 or V14 to open an Excel XLSX or XLS file From VB6

I am aware of one thread on this forum about opening ACE database engine 12 for XLSX - But it is not clear whether that is called from VB6, so I am still posting my issue which I believe to be different.
As part of my app that I am writing, one section has functionality to open XLS /XLSX files in VB6. I am using MS ACE Database engine. I have tried both ACE DB engine 12 and 14 on different PCs. I downloaded the installer from here: http://www.microsoft.com/en-us/download/details.aspx?id=13255
In my VB6 project, I tried but can't seem to set a reference to ACEOLEB.dll as this COM object can't be referenced - I get an error (and don't know what this error is : "UNEXPECTED ERROR OCCURRED IN GO FNF. ERROR IN LOADING DLL." Furthermore, I tried registering the DLL and it does not succeed as this DLL can't be registered. When I run my application and pick an XLSX file (or even an XLS file) I write the connection string as follows:
Provider=Microsoft.ACE.OLEDB.12.0; DATA SOURCE=C:\DB solution\EmailAssignments.XLSX;Extended Properties=\"Excel 12.0;HDR=YES\";
When I try to CONNECT, I get an error:
ERRORCODE DB1004
Error -2147467259 : Could not find installable ISAM
Finally I searched Google for this type of error, and found this article on Microsoft support forum : http://support.microsoft.com/kb/283881 , which talks of a DLL MSEXCL40.DLL which has to be registered as the registration may be missing or not registered; but this file applies to Office 2003. I tried their suggestion nonetheless to no avail. My Users will be using Office 2007 or 2010 and my application is in VB6 - all of which doesn't seem to be compatible and I can't seem to open ANY Excel files.
Can anyone help me -
- Does the ACE DB engine work at all with VB6?
- if this ACE DB engine works with VB6, then can someone assist me to get it going? OR
- can someone suggest how I could find the appropriate XLSX driver in a user system and write a DSN "on thE fly" once they picked the XLSX file to use?
I would really appreciate your help. Many Thanks in advance.
Regards
Mark

Run Excel Macro using SSIS throught SQL Jobs failed

I have a task to create Excel VBA and run that macro on SSIS. I can successfully run the Excel Macro from the SSIS Package, but I have a problem when I run that SSIS on SQL Jobs. I have created Credential, Proxy SSIS, and set SSIS unprotected, but it always fails.
Error Message
Executed as user: HARNANDA7-PC\HARNANDA7.
Microsoft (R) SQL Server Execute Package Utility
Version 11.0.2100.60 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved.
Started: 11:56:14
Error: 2014-05-28 11:56:17.61 Code: 0x00000001
Source: Script
Task
Description: Exception has been thrown by the target of an
invocation. End Error
DTExec: The package execution returned
DTSER_FAILURE (1).
Started: 11:56:14 Finished: 11:56:17 Elapsed:
2.652 seconds.
The package execution failed. The step failed.
but if i create Folder named "Desktop" on C:/Windows/System32/config/systemprofile/ or C:/Windows/SysWOW64/config/systemprofile/
then the SSIS package runs successfully through SQL Jobs.
I'm confused as to what the problem is here. Can anyone help?
Big thanks
For whatever reason (no one seems to know from what I can gather), Excel requires that the desktop folder be present on your machine. It must use it as a global setting or possibly a default setting for creating files or temporary files. If that folder doesn't exists then (and this is just a guess) excel either has issues creating these temporary files or requires that the Desktop directory exists and, in both cases, throws an error if the Desktop directory does not exist.
I doubt that they would want to make something like this an explicit feature, so it is most likely a bug with Excel.

Resources