SSIS 2008R2 - odd warnings when creating Excel spreadsheets using Execute SQL task
I have a number of SSIS packages which generate Excel spreadsheets as part of their output. The packages create the spreadsheets through an Execute SQL task with the SQLSource set to a CREATE TABLE script, such as:
CREATE TABLE foo (bar NVARCHAR(20))
In SSIS 2005, this ran cleanly (no errors or warnings). However, I'm now upgrading these to SSIS 2008 R2; every time this task runs, I get two identical warnings: "Warning: Multiple-step OLE DB operation generated errors. Check each OLE DB status value,
if available. No work was done." Adding to my confusion, the Excel file actually is created properly.
Following the adage that "a picture is worth a thousand words," screenshots of a simplified test care are attached. What's the deal with these warnings, and how can I get rid of them?
May 7th, 2012 11:54am
Look in the Output tab - what's shown there?
Talk to me now on
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2012 12:19pm
Look in the Output tab - what's shown there?
Talk to me now on
May 7th, 2012 12:19pm
The Output tab reads:
SSIS package "PackageUsingExecuteSQL.dtsx" starting.
Warning: 0x0 at 3_SQL_CreateTargetFile: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
Warning: 0x0 at 3_SQL_CreateTargetFile: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
SSIS package "PackageUsingExecuteSQL.dtsx" finished: Success.
The program '[7504] PackageUsingExecuteSQL.dtsx: DTS' has exited with code 0 (0x0).
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2012 12:22pm
The Output tab reads:
SSIS package "PackageUsingExecuteSQL.dtsx" starting.
Warning: 0x0 at 3_SQL_CreateTargetFile: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
Warning: 0x0 at 3_SQL_CreateTargetFile: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
SSIS package "PackageUsingExecuteSQL.dtsx" finished: Success.
The program '[7504] PackageUsingExecuteSQL.dtsx: DTS' has exited with code 0 (0x0).
May 7th, 2012 12:22pm
That can't be all the messages in the Output Window... You should see some "Validation phase is beginning" right after the "package is starting" message, and a LOT of others... you can't see those?
Talk to me now on
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2012 3:48pm
That can't be all the messages in the Output Window... You should see some "Validation phase is beginning" right after the "package is starting" message, and a LOT of others... you can't see those?
Talk to me now on
May 7th, 2012 3:48pm
Nope; five lines is all I've got:
(There is more in the Execution Results tab, as pictured in my original post)
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2012 4:10pm
Nope; five lines is all I've got:
(There is more in the Execution Results tab, as pictured in my original post)
May 7th, 2012 4:10pm
I recreated your package based on the screenshots and arrive at the same result.
The warnings seem to be generated during or after the actual file creation... but the file I get created has a very oddly named tab in it...
Talk to me now on
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2012 5:27pm
I recreated your package based on the screenshots and arrive at the same result.
The warnings seem to be generated during or after the actual file creation... but the file I get created has a very oddly named tab in it...
Talk to me now on
May 7th, 2012 5:27pm
Those warnings usually are some warnings of the destination system that somehow don't get all the way back to SSIS.
For example, if you use
SELECT 'Test' FROM DUAL;
in an OLE DB Source connected to Oracle, you get the same warnings.
Try adhering more to the "Excel SQL syntax":
CREATE TABLE `foo` (`bar` NVARCHAR(20))
Try it out and let us know if it helps.MCTS, MCITP - Please mark posts as answered where appropriate.
Free Windows Admin Tool Kit Click here and download it now
May 8th, 2012 1:43am
Those warnings usually are some warnings of the destination system that somehow don't get all the way back to SSIS.
For example, if you use
SELECT 'Test' FROM DUAL;
in an OLE DB Source connected to Oracle, you get the same warnings.
Try adhering more to the "Excel SQL syntax":
CREATE TABLE `foo` (`bar` NVARCHAR(20))
Try it out and let us know if it helps.MCTS, MCITP - Please mark posts as answered where appropriate.
May 8th, 2012 1:43am
Alas, the results are the same:
Free Windows Admin Tool Kit Click here and download it now
May 8th, 2012 9:56am
Alas, the results are the same:
May 8th, 2012 9:56am
hello,
could the cause be the fact that the package is now running on a 64-bit system and it was on a 32-bit with sql 2005? The oledb drivers for excel are probably 32-bit. Try to set an option to run the package as 32-bit.Jan D'Hondt - Database and .NET development
Free Windows Admin Tool Kit Click here and download it now
May 8th, 2012 10:06am
hello,
could the cause be the fact that the package is now running on a 64-bit system and it was on a 32-bit with sql 2005? The oledb drivers for excel are probably 32-bit. Try to set an option to run the package as 32-bit.Jan D'Hondt - Database and .NET development
May 8th, 2012 10:06am
I wish it was that simple, but I'm seeing this issue on both 32-bit (Windows 7 SP1 32bit) and 64-bit (Windows Server 2008 R2 Standard Edition 64-bit) OSs.
Microsoft (R) SQL Server Execute Package Utility
Version 10.50.1600.1 for 32-bit
Copyright (C) Microsoft Corporation 2010. All rights reserved.
Started: 10:54:26 AM
Progress: 2012-05-08 10:54:26.83
Source: 2_FST_DeleteExistingTarget
Operation Complete: 100% complete
End Progress
Warning: 2012-05-08 10:54:26.99
Code: 0x00000000
Source: 3_SQL_CreateTargetFile
Description: Multiple-step OLE DB operation generated errors. Check each OLE
DB status value, if available. No work was done.
End Warning
Warning: 2012-05-08 10:54:27.00
Code: 0x00000000
Source: 3_SQL_CreateTargetFile
Description: Multiple-step OLE DB operation generated errors. Check each OLE
DB status value, if available. No work was done.
End Warning
Progress: 2012-05-08 10:54:27.00
Source: 3_SQL_CreateTargetFile
Executing query "CREATE TABLE `foo` (`bar` NVARCHAR(20))".: 100% complete
End Progress
DTExec: The package execution returned DTSER_SUCCESS (0).
Started: 10:54:26 AM
Finished: 10:54:27 AM
Elapsed: 0.484 seconds
Free Windows Admin Tool Kit Click here and download it now
May 8th, 2012 11:00am
I wish it was that simple, but I'm seeing this issue on both 32-bit (Windows 7 SP1 32bit) and 64-bit (Windows Server 2008 R2 Standard Edition 64-bit) OSs.
Microsoft (R) SQL Server Execute Package Utility
Version 10.50.1600.1 for 32-bit
Copyright (C) Microsoft Corporation 2010. All rights reserved.
Started: 10:54:26 AM
Progress: 2012-05-08 10:54:26.83
Source: 2_FST_DeleteExistingTarget
Operation Complete: 100% complete
End Progress
Warning: 2012-05-08 10:54:26.99
Code: 0x00000000
Source: 3_SQL_CreateTargetFile
Description: Multiple-step OLE DB operation generated errors. Check each OLE
DB status value, if available. No work was done.
End Warning
Warning: 2012-05-08 10:54:27.00
Code: 0x00000000
Source: 3_SQL_CreateTargetFile
Description: Multiple-step OLE DB operation generated errors. Check each OLE
DB status value, if available. No work was done.
End Warning
Progress: 2012-05-08 10:54:27.00
Source: 3_SQL_CreateTargetFile
Executing query "CREATE TABLE `foo` (`bar` NVARCHAR(20))".: 100% complete
End Progress
DTExec: The package execution returned DTSER_SUCCESS (0).
Started: 10:54:26 AM
Finished: 10:54:27 AM
Elapsed: 0.484 seconds
May 8th, 2012 11:00am
I concur - I even tried "CREATE TABLE [foo] ([bar] TEXT)" and got the same result.
Talk to me now on
Free Windows Admin Tool Kit Click here and download it now
May 8th, 2012 12:25pm
I concur - I even tried "CREATE TABLE [foo] ([bar] TEXT)" and got the same result.
Talk to me now on
May 8th, 2012 12:25pm
I'm pretty much stumped at this point. Hopefully somebody from Microsoft with some knowledge of the Execute SQL task innards (or possibly those of the Excel connection manager) will chime in.
Free Windows Admin Tool Kit Click here and download it now
May 9th, 2012 8:39pm
I'm pretty much stumped at this point. Hopefully somebody from Microsoft with some knowledge of the Execute SQL task innards (or possibly those of the Excel connection manager) will chime in.
May 9th, 2012 8:39pm
Hello,
Is there any solution found ?
I'm facing the same problem with a simple request (count * from mytable) on an OLEDB Datasource connected to an Oracle Server...
It's not a big concern since (hopefully) the work is actually done and it doesn't fail. Nevertheless, it is disturbing some users of the package that call me thinking something went wrong :-)
Free Windows Admin Tool Kit Click here and download it now
June 5th, 2012 10:20am
Hello,
Is there any solution found ?
I'm facing the same problem with a simple request (count * from mytable) on an OLEDB Datasource connected to an Oracle Server...
It's not a big concern since (hopefully) the work is actually done and it doesn't fail. Nevertheless, it is disturbing some users of the package that call me thinking something went wrong :-)
June 5th, 2012 10:25am
Hello,
Same issue there.
My query is TRUNCATE TABLE <myschema>.<mytable>
Does this still happen with SQL Server 2012 ?
Any help would be great.
a+, =)
-=Clement=-
Configuration :
Windows XP Professional Service Pack 3 (x86)
SQL Server 2008 r2 Service Pack 1
Free Windows Admin Tool Kit Click here and download it now
August 20th, 2012 6:07am
I have a number of SSIS packages which generate Excel spreadsheets as part of their output. The packages create the spreadsheets through an Execute SQL task with the SQLSource set to a CREATE TABLE script, such as:
CREATE TABLE foo (bar NVARCHAR(20))
In SSIS 2005, this ran cleanly (no errors or warnings). However, I'm now upgrading these to SSIS 2008 R2; every time this task runs, I get two identical warnings: "Warning: Multiple-step OLE DB operation generated errors. Check each OLE DB status value,
if available. No work was done." Adding to my confusion, the Excel file actually is created properly.
Following the adage that "a picture is worth a thousand words," screenshots of a simplified test care are attached. What's the deal with these warnings, and how can I get rid of them?
This error occurs when there is a parameter miss match. check in your queries if you are passing the correct number of parameters in your queries or stored procedure.
Hope this helps-
Please mark the post as answered if it answers your question
August 20th, 2012 1:19pm
Hey Edmund,
You've probably found a workaround for this. But in case you haven't, and for others who run into this issue, here's some more info that should help to resolve this issue.
I ran into this the other day. I have an SSIS package running on SQL Server 2008 R2 that exports the results of a stored procedure out to an Excel XLSX file. My package was also throwing warnings on the Execute SQL task that created the table. But the task
was ultimately completing and the entire SSIS package was working fine (expected data was being output). But the warnings were annoying, and I was concerned that there might be some negative repercussions if I just ignored them.
I contacted Microsoft and after hours of investigation they provided a solution. Apparently it can be caused by a few different factors, including a mismatch in the data types coming from the stored proc and the data types defined in the Excel table (i.e.
worksheet). But if you're encountering this warning when creating the Excel table/worksheet (so before any data is being transferred from the source to the Excel file) that is obviously not the problem.
In my case it was due to a problem with the default EXCEL connection type being used by my SSIS connection. As I understand it the EXCEL type basically uses a straight OLE DB provider. Instead of using this you should use the ADO (note: ADO, not ADO.NET!)
connection type and customize it to use a very specific OLE DB provider. This is basically a hack, but it's one recommended by Microsoft, and it works.
Here are some detailed steps:
1) In your Execute SQL Task, set the ConnectionType to "ADO", and select "<New Connection...>" for the the Connection value.
2) In the Configure OLE DB Connection Manager window that appears click "New...".
3) In the Connection Manager window that appears set the Provider to "ADO\Microsoft Office 12.0 Access Database Engine OLE DB Provider, then (making sure you're on the on the Connection tab) paste the file name (including full path) into the "Server of file
name" field.
4) Click on the "All" tab and enter the following into the Extended Properties field (the very first field under Advanced): Excel 12.0 XML
5) Test the connection. It should come back just fine. Click OK.
6) Click OK again in the Configure OLE DB Connection Manager.
7) Click OK again in the Execute SQL Task Editor window.
Now when you run the Execute SQL task that creates the table/worksheet in the XLSX file, it should run without any warnings.
Note: for step 4 Microsoft actually recommended setting it to Excel 12.0. But I found that made the file unopenable. So setting it to Excel 12.0 XML fixed this.
Cheers,
Andy
Free Windows Admin Tool Kit Click here and download it now
September 6th, 2012 2:20pm