Cannot loop through Excel 2003 files in SSIS 2008 - ssis

I am trying to execute a SSIS 2008 package on a 64-bit OS and import Excel 2003 files to SQL Server 2008.
I have created an OLEDB Connection to the Excel file with a Connection String that retrieves the Excel file from a variable, inside the ForEach Loop Container.
The Run64BitRunTime is set to false.
I am not able to edit the SQL Command on the OLEDB Source in the Data Flow task. It returns an error :
Error 2 Validation error. Load List Staged Table: Load List Staged Table: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "List OLEDB to Excel" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. 0 0
Appreciate any help.

Check this out:
http://dougbert.com/blogs/dougbert/archive/2008/06/16/excel-in-integration-services-part-1-of-3-connections-and-components.aspx
I've had problems with excel on 64 bit systems - You'll have to run the 32 bit dtexec for the job. Why you are getting errors inside BIDS, I don't know.

Yes, I am running BIDS on a 64-bit OS.
I resolved the issue by using an Excel Connection Manager in the Control Flow and an Excel source in the Data Flow Task instead of the OLEDB source and assigning a default workbook name to the variable. I also made changes to the data access mode in the Source editor.
Thanks for the response.

Related

SSIS Package Works in VS but not in SSIS because of ODBC Data Flow Task Error

We have a test package that was designed using VS2017 that has one "Data Flow Task" object with "ODBC Source" and "ODBC Destination" objects within it. The package is simply trying to move records from table 'Table_1' to table 'Table_2' in the same SQL Server 2014 database named 'Test'.
When we execute the package from VS2017, it runs successfully.
However, when we import that package into SSIS, and then run the package directly from there, we get the following error messages (see screen shots below):
The version of ODBC Destination, clsid {51B271F1-3B7E-4875-870E-62A0456FE2AD} is not compatible with this version of the DataFlow.
The version of ODBC Source, clsid {F8600F4A-E321-42F4-AA59-DA00FA374EA5} is not compatible with this version of the DataFlow.
The component is missing, not registered, not upgradeable, or missing required interfaces. The contact information for this component is "ODBC Destination;Connector for Open Database Connectivity (ODBC) by Attunity; Attunity Ltd.; All Rights Reserved; http://www.attunity.com;7".
Any ideas as to what is causing these errors?
Couple side questions / interesting notes:
Why is it referencing Attunity? We are not using the Attunity connectors. We are using ODBC. I don't even have Attunity installed on this machine (I did at one point but uninstalled it).
If you don't use the DataFlow task with the OBDC driver and just use a simple 'Execute SQL Task' object in the package that runs a simple 'INSERT INTO Table_2...' statement, the package runs in SSIS. There is something wrong with using the Data Flow Task.
Screen shots:
Here you can see the package is running successfully in VS2017:
The package was imported into SSIS:
When you run it in SSIS, it fails with the following errors:
Found the answer from other posts.
First, change the TargetServerVersion property for the project to the version of SQL Server you are using for SSIS as explained by the links below and the screen shot shows.
The version of ODBC source is not compatible with this version of the dataflow
SSIS: version of ODBC source is not compatible with this version of the dataflow
After you do that, you may run into an error that states something like the following:
[ODBC Destination [2]] Error: The AcquireConnection method call to the connection manager MyConnectionManager failed with error code 0xC0014009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
If you get that error, change the Run64BitRuntime property to 'True' for the project as explained by the link below and the screen shot shows.
‌https://social.msdn.microsoft.com/Forums/sqlserver/en-US/eb9e6826-b650-433b-bab9-16da214efd99/the-acquireconnection-method-call-to-the-connection-manager-mydatabaseodbc-failed-with-error-code?forum=sqlintegrationservices

SSIS Package fails - Unable to retrieve column information from the data source

I am getting the following messages when writeing data in a dataflow to an updates table, that had been truncated in a previous SSIS step in the same package.
Error: 0xC0202009 at DF - Main, OLE DB Dest - Dim Customer Temp [345]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x8007000E.
Error: 0xC020204A at DF - Main, OLE DB Dest - Dim Customer Temp [345]: Unable to retrieve column information from the data source. Make sure your target table in the database is available.
Error: 0xC004701A at DF - Main, SSIS.Pipeline: OLE DB Dest - Dim Customer Temp failed the pre-execute phase and returned error code 0xC020204A.
The table does exist, (I created it a few days ago) the package is running in Visual Studio 2010 against a SQL Server 2012 database. The database is up and running and I can access the table bot before and after running the package.
The SSIS connection is running under windows authorisation, using my userid/session.
I've been writing SSIS packages since DTS days and have never seen a case where the package could not retrieve meta data, while running, for a table before. Any thoughts.
Note I can go into the OLEDB DB Destination and bring up the columns and prieview the data before running the package in debug mode, where it fails.
Any thoughts?
I have changed the OLE DB provider and issue was resolved.
Problem statement
Using Sql Server Data tool 2015, when package run the following errors appears.
Resolution:
Follow below steps to resolve this problem.
Open Sql server management studio.
Connect server.
Go to Security>>Login.
Select user, go to properties by right click on it.
a. Go to user mapping tab.
b. Select the destination database and assign db_owner and db_reader. Click OK.
Run package and it will work, hopefully mentioned steps helps you in your scenario as well.

SSIS error 'object not exist'while executing the package

I have created some packages which is take the data from the sql server and load the data into the excel files.i have mapped the excel sheets dynamically.sometimes my packages work fine without any error but some times it gives error that "Object is not exist".i have set the expression for excel connection manager with excel file path property,but sometimes still getting error.please help me on this to sort out this problem.thanks in advance....
If you're setting ConnectionString in Connection Manager as expression, you also need to set DelayValidation property of Connection Manager to True, if the files that ConnectionString references will be created during execution of the package.

SSIS MySQL Copying Table to SQL Server

I want to copy tables from MySQL to SQL Server.
ADO.NET source using the MySQL connection.
OLE DB destination, SQL Server.
The statement is a full copy so no big deal there. When I hit the play button, after a while an error pops up. I set a DataViewer and started all over again, running it from inside the DataFlow while checking the DataViewer. After a while (this time it took longer) the error.
Error: 0xC02090F5 at Data Flow Task, ADO NET Source 1: The component
"ADO NET Source" (1) was unable to process the data. Fatal error
encountered during data read.
Error: 0xC0047038 at Data Flow Task,
SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The
PrimeOutput method on component "ADO NET Source" (1) returned error
code 0xC02090F5. The component returned a failure code when the
pipeline engine called PrimeOutput(). The meaning of the failure code
is defined by the component, but the error is fatal and the pipeline
stopped executing. There may be error messages posted before this
with more information about the failure.
Any idea on this error?
this took me few days to figure out...so I thought I would share my notes
How to connect and load data from MySQL to SQL Server
1 - Download the 32 bit ODBC driver.
go to the MySQL website and download: “mysql-connector-odbc-5.2.4-ansi-win32.msi” NOTE: Do not use the 64 bit driver on BIDS 2008. BIDS 2008 is 32 bit. You will get a mismatch error when creating SSIS’s connection manager: “The specified DSN contains an architecture mismatch between the Driver and Application”
2 - Create a User DSN You need to open the using windows 32 ODBC admin tool. DO NOT open the regular ODBC admin, in control panel. Open the ODBC admin located here: c:\Windows\SysWOW64\odbcad32.exe. If you use the default ODBC admin…it will not work. Additionally you must create a “User DSN” - NOT a System DSN. Otherwise it will not show up in SSIS NOTE: the screens look the same so you will have no way of knowing whether you are in 32 BIT ODBC Admin tool or not.
3 – Create a new SSIS package and create an ADO.NET connection manager AND ADO.NET SQL Server destination.
4 – Change the Source ADO.NET properties. You will get validation errors and your package will not run. You need to change the “ValidateExternalMetadata” to FALSE (in the “Advanced Editor” dialog box) of the ADO.NET source It will also give you metadata error…that’s ok…just click ok. It will still pull the metadata (column names/data types). You cannot select the tables as you would in SQL server. You need to type the SQL select statement.
5 - Run the package and should run and load normally.

"Unspecified Error" when clicking on 'Name of Excel Sheet' for a Excel Source Task

I've created an Excel connection. When I create a data flow with an Excel destination and click 'Name of Excel Sheet' I get an "Unspecified Error". When I look under 'Show Advanced Editor' of the destination I see the following error:
Error at blah [Connection manager "DestinationConnectionExcel"]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft JET Database Engine" Hresult: 0x80004005 Description: "Unspecified error".
Error at Insert blah [Destination - blah [199]]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "DestinationConnectionExcel" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
Exception from HRESULT: 0xC020801C (Microsoft.SqlServer.DTSPipelineWrap)
I've read through a tons of other post and nothing seems to help. I've tried setting the 'DelayValidation=True' on all the Jet Engine related task. While this allows me to run the package without any errors, I can't edit or change anything. I also can't create new tasks with Excel.
I've already tried to set 'Run64BitRuntime = false" and that also isn't helping.
Another note, The problem is intermittent. I've been able to work with Excel tasks fine one time after a reboot, then another time its all failing as I described.
Any help would be appreciated. Thanks all
I encountered a similar issue, and the resolution was two-fold for me. First, make sure certain dlls are properly registered on your dev machine:
Paraphrased from SSIS 2005: Using Execute SQL Task to work with Excel Connection Manager
Please check whether the following files exist:
C:\windows\system32\odbcjt32.dll
C:\windows\system32\msjet40.dll
C:\windows\system32\msexcl40.dll
C:\Program Files\Common Files\System\Ole DB\oledb32.dll
C:\Program Files\Common Files\System\ado\msado15.dll
If they are, please manually register them. Run each of the following commands from command prompt:
Regsvr32 "C:\Program Files\Common Files\system\Ole DB\oledb32.dll"
Regsvr32 "C:\Program Files\Common Files\system\ado\msado15.dll"
Regsvr32 "C:\windows\system32\msjet40.dll"
Regsvr32 "C:\windows\system32\msexcl40.dll"
Then, update any folder/file paths referenced in the SSIS package. I kept changing the Excel Connection Manager object to point to the correct file, but the change would never "stick." Another developer directed me to look at the list of Variables in the SSIS package. Right-click anywhere in the package designer and choose "Variables" (based on the 2008 version). In the list of variables, check if there are any paths that are being used. If you find any, verify that they exist on your machine or change them to use your own local paths.
After following these two suggestions, I was able to open the Excel file and choose the target sheet in the Excel Connection Manager window. And, the SSIS package runs successfully in my local environment.
I take it the path to the excel workbook is correct? I also had problems when I had opened and saved the excel workbook I was using as my destination in excel. I think if you create the workbook from within SSIS it might use office web tools. Perhaps you could try to recreate the workbook within SSIS.
I got similar problem,make sure connection manager is connected to MicrosoftExcel-64 bit which is same as SQL SSIS version.
Otherwise add Microsoft.ACE.OLEDB.12.0 provider in your linked server, not in your local machine.
And also check if you have Microsoft excel present in your server again not on your local machine
If local machine and SQL Server installed on the same machine then its fine.