July 18, 2011 at 12:32 am
I am using an SSIS package to export more than 300000 rows in excel (.xlsx) from SQL Server.
I am using query with the columns having data type nvarchar and ntext. Only One column is of varchar data type.
I have used data conversion operator as well to convert this varchar to Unicode string (DT_WSTR).
After executing package its giving me following error:
[Write to Excel [409]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21.
[Write to Excel [409]] Error: Cannot create an OLE DB accessor. Verify that the column metadata is valid.
[SSIS.Pipeline] Error: component "Write to Excel" (409) failed the pre-execute phase and returned error code 0xC0202025.
Can anybody please help in resolving the same?
Thanks in advance.
July 18, 2011 at 12:37 pm
This thread may have some leads or answers for you:
http://www.sqlservercentral.com/Forums/Topic349843-148-1.aspx
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
July 18, 2011 at 1:37 pm
viduvs (7/18/2011)
I am using an SSIS package to export more than 300000 rows in excel (.xlsx) from SQL Server.I am using query with the columns having data type nvarchar and ntext. Only One column is of varchar data type.
I have used data conversion operator as well to convert this varchar to Unicode string (DT_WSTR).
After executing package its giving me following error:
[Write to Excel [409]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21.
[Write to Excel [409]] Error: Cannot create an OLE DB accessor. Verify that the column metadata is valid.
[SSIS.Pipeline] Error: component "Write to Excel" (409) failed the pre-execute phase and returned error code 0xC0202025.
Can anybody please help in resolving the same?
Thanks in advance.
I know this sounds elementary by what I would do is make the export simpler and try narrowing the number of records of number of columns.
Narrow the columns down by 50% and if it fails narrow it down again.
It should not take very long using the wizard.
I was not aware that you can have 300,000+ rows in an Excel Worksheet. What version are you using?
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
July 18, 2011 at 1:47 pm
Is your Excel File Template? It not start with a clean sheet for it could possible throw that metadata error.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply