Error at Data Flow Task [OLE DB Source [1]]: No column information was returned by the SQL command." error

I have an .XLSX File that I am trying to Upload into SQL Server.  I use the Source as OLEDB Connection manager and pick OLDEB PROVIDER as MS OFFICE 12.0 ACCESS DATABASE ENGINE. In that I put this query but it gives the foll
error when I run the SSIS Package.
[OLE DB Source [1]] Error: No column information was returned by the SQL command.
Query I use in DATA FLOW TASK  , IS SQL COMMAND:
Select top 1 [Investor #],[Investor Name], CONVERT (VARCHAR(1000),Delegation)AS DELEGATION ,[Date Added],[Date Revised] from [EXCELSHEET1$]
Any suggestion to fix this error? i have to do a convert since the excel datayype is DT_TEXT AND SQL TABLE DATATYPE is VARCHAR(1000)  SO Have to do this Convert.

If the target table's column is not a BLOB/CLOB (e.g. NVARCHAR(MAX)) and you have text longer than the max value it will not fit into the target, if you are allowed you need to trim it and convert, otherwise sure you get the error as the target datatype
is smaller. 
Arthur My Blog

Similar Messages

  • Read from sql task and send to data flow task - [OLE DB Source [1]] Error: A rowset based on the SQL command was not returned by the OLE DB provider.

    I have created a execut sql task -
    In that, i have a created a 'empidvar' variable of string type and put sqlstatement = 'select distinct empid from emp'
    Resultset=resultname=0 and variablename=empidvar
    I have added data flow task of ole db type and I put this sql statement under sql command - exec emp_sp @empidvar=?
    I am getting an error.
    [OLE DB Source [1]] Error: A rowset based on the SQL command was not returned by the OLE DB provider.
    [SSIS.Pipeline] Error: component "OLE DB Source" (1) failed the pre-execute phase and returned error code 0xC02092B4.

    shouldnt setting be Result
    Set=Full Resultset as your query returns a resultset? also i think variable to be mapped should be of object type.
    Then for data flow task also you need to put it inside a ForEachLoop based on ADO.NET recordset and map your earlier variable inside it so as to iterate for every value the sql task returns.
    Also if using SP in oledb source make sure you read this
    http://consultingblogs.emc.com/jamiethomson/archive/2006/12/20/SSIS_3A00_-Using-stored-procedures-inside-an-OLE-DB-Source-component.aspx
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • "Syntax error or access violation" on Data Flow Task OLE DB Data Source

    I am implementing expression parameter for a SQL Server connection string (like this: http://danajaatcse.wordpress.com/2010/05/20/using-an-xml-configuration-file-and-expressions-in-an-ssis-package/)  and it works fine except when it reaches data flow
    task - OLE DB Source task. In this task, I execute a stored procedure like this: 
    exec SelectFromTableA ?,?,?
    The error message is this:
    0xC0202009 at Data Flow Task, OLE DB Source [2]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
    An OLE DB record is available.  Source: "Microsoft OLE DB Provider for SQL Server"  Hresult: 0x80004005  Description: "Syntax error or access violation".
    Error: 0xC004706B at Data Flow Task, SSIS.Pipeline: "OLE DB Source" failed validation and returned validation status "VS_ISBROKEN"
    When I change the SQL command above with reading from table directly it works fine. I should also add that before changing connection string of the SQL data source to use expression, the SSIS package was working fine and I know that the connection string
    is fine because other tasks in the package works fine!
    Any idea why?

    Hi AL.M,
    As per my understanding, I think this problem is due to the mismatching between the source and the destination tables. We can reconfigured every of components of the package to check the table schemas and configuration settings, close the BIDS/SSDT and then
    open and try to see if there are errors.
    Besides, to trouble shoot this issue, we can use the variable window to see the variable's value. For more details, please refer to the following blog:
    http://consultingblogs.emc.com/jamiethomson/archive/2005/12/05/2462.aspx
    The following blog about “SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred: Reasons and troubleshooting” is for your reference:
    http://blogs.msdn.com/b/dataaccesstechnologies/archive/2009/11/10/ssis-error-code-dts-e-oledberror-an-ole-db-error-has-occurred-reasons-and-troubleshooting.aspx
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Error at Data Flow Task [OLE DB Destination [891]]

    I am getting this error message not sure how to resolve this error
    Error at Data Flow Task [OLE DB Destination [891]]: The column "Product Desc" cannot be processed because more than one code page (65001 and 1252) are specified for it.
    Error at Data Flow Task [OLE DB Destination [891]]: The column "Brand Desc" cannot be processed because more than one code page (65001 and 1252) are specified for it.
    Error at Data Flow Task [OLE DB Destination [891]]: The column "Seg Desc" cannot be processed because more than one code page (65001 and 1252) are specified for it.
    Smash126

    Hi Smash126,
    Based on my research, I can reproduce the issue in my environment. The issue is caused by the CodePage of Input Columns "Product Desc", "Brand Desc" and "Seg Desc" are 65001, while the corresponding Destination Columns are 1252.
    The Input Columns use more than one code page than the Destination Columns, so the error occurs.
    To fix this issue, we can use a Derived Column Transformation to add three derived columns to convert the code page of the three columns. For more details, please see:
    Drag a Derived Column Transformation before the OLE DB Destination and connect to it.
    Add three Derived Columns with the same format like below:
    Derived Column Name:  Derived Column 1  
    Derived Column: <add as new column>
    Expression: (DT_STR,50,1252)[Product Desc]
    Double-click the OLE DB Destination, then select the “Derived Column 1” column from Input Column to make it map to the corresponding Destination Column which the original column “Product Desc” maps.
    Use the same method for other two columns.
    The following screenshot is for your reference:
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Capture Transformation error in Data Flow Task

    Hi to all,
    I have a data flow task with one source and one destination.
    Between source and destination I have a "derived column" transformation.
    I want capture a "derived column" executable error and write it in a Log table.
    For example, in the source i have a varchar field which values are integer and i want convert this values in integer before write them in the destinaton field.
    If one of the varchar strings has the following form: "1245c", the transformation from varchar to integer get error.
    How to capture a "derived column" executable error like in the above example?
    thanks in advance.

    Hi visakh16
    probably i do not well explain my problem.
    I'm trying to implement the "multiphase data pump" DTS feature in ssis and i would like know if possible how to realize the TransFailureMain() function.
    When the transformation fail in SSIS how to capture this event and write the error in the log?
    You need to use OnError event handler of data flow task for that. 
    You can also confgure error output in derived column task and choose redirect option. Then link error output to flat file/ oledb destination to capture the records.
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Dynamically pick the table names in data flow task SSIS

    Hi All,
    I want to create a SSIS package which loads the data to a table on the other server every day. I have around 250 tables to load everyday and source and destination table names are available in a metadata table, table names have to read from the metadata
    table and data should be loaded. Is there a way that we can configure the source and destination table names dynamically in Data flow task?
    I am newbie to SSIS can any help with the solution for this problem.

    You can do that, not a big deal. The underlying problem is say suppose you constructed a ETL based on some x source and y destination and have put x(3 columns) as source and y destination(3 columns).. As you said if we have choice of dynamically pick the
    table names.. ETL might fail when you face below situation
    source x(3 columns)   destination y (4 columns) and there will be no mapping as it is dynamic. Sometimes mapping also fails even if the source and destination have same number of columns. If you still want to do... follow below steps:
    Create two variables:
    1.variable1 , datatype string
    2.variable datatype string  
    take one execute sql task, pick your source table names dynamically as you desired from metadata table \
    "SELECT sourcetblname as Res FROM @metadata WHERE ID=1" in sql statement and then go to name the result name as Res (I meant same as table alias) and map it to variablename1
    And in variable2 go to expression and write "Select * from "+@[User::variable].. and this will be your constructed dynamic command for oledb destination.
    And connect that execute sql task to (Data flow task)oledb source and choose data access mode as sql command with variable,and choose variable2. below is the diagram.
    - please mark correct answers

  • Building a data flow task, within a foreach loop for dynamic table name, but ole db source not allowing variable

    In my control flow, I set up a variable for the table name, enumerated by SMO, following the instructions from the link here:
    http://www.bidn.com/blogs/mikedavis/ssis/156/using-a-for-each-loop-on-tables-ssis
    Now, I put a data flow task inside the foreach. I selected the OLE DB connection manger for my database, set the Data access mode to "Table name or view name variable", and selected my variable name from the drop down. So far so good. When I click on OK,
    it gives me an error 0x80040E37, basically saying it can't open the rowset for "my variable", Check that the object exists in the database.
    So, I assume I won't be able to do this "that' easily, and I will need to build a "SQL command from variable" or some such thing. Any advice on how to build this Source editor to dynamically name my columns from the variable?
    Thanks in advance!
    mpleaf

    Hi mpleaf,
    Please try to set "ValidateExternalData" to False in your OLE DB Source Properties and "DelayValidation" property to TRUE, please refer to similar threads:
    http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/620557d9-41bc-4a40-86d5-0a8d2f910d8c/
    http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/456f2201-447c-41b3-bf27-b3ba47e6b737
    Thanks,
    Eileen
    Eileen Zhao
    TechNet Community Support

  • Error: 0xC020902A at Data Flow Task, XML Source [24515]: The "component "XML Source" (24515)" failed because truncation occurred, and the truncation row disposition on "output column "MsgLev1" (26196)" specifies failure on truncation. A truncation error o

    When I was Importing data from XML to SqlServer using SSIS , I am getting this error. The import is working if i use small file and not working if I use large XMl file. Can any one of you guys help me out with the issue?
    Error: 0xC020902A at Data Flow Task, XML Source [24515]: The "component "XML Source" (24515)" failed because truncation occurred, and the truncation row disposition on "output column "MsgLev1" (26196)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
    Error: 0xC02092AF at Data Flow Task, XML Source [24515]: The component "XML Source" (24515) was unable to process the XML data. Pipeline component has returned HRESULT error code 0xC020902A from a method call.
    Error: 0xC0047038 at Data Flow Task: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "XML Source" (24515) returned error code 0xC02092AF.  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.
    Error: 0xC0047021 at Data Flow Task: SSIS Error Code DTS_E_THREADFAILED.  Thread "SourceThread0" has exited with error code 0xC0047038.  There may be error messages posted before this with more information on why the thread has exited.
    Error: 0xC0047039 at Data Flow Task: SSIS Error Code DTS_E_THREADCANCELLED.  Thread "WorkThread0" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.  There may be error messages posted before this with more information on why the thread was cancelled.
    Error: 0xC0047039 at Data Flow Task: SSIS Error Code DTS_E_THREADCANCELLED.  Thread "WorkThread1" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.  There may be error messages posted before this with more information on why the thread was cancelled.
    Error: 0xC0047039 at Data Flow Task: SSIS Error Code DTS_E_THREADCANCELLED.  Thread "WorkThread3" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.  There may be error messages posted before this with more information on why the thread was cancelled.
    Error: 0xC0047039 at Data Flow Task: SSIS Error Code DTS_E_THREADCANCELLED.  Thread "WorkThread4" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.  There may be error messages posted before this with more information on why the thread was cancelled.
    Error: 0xC0047039 at Data Flow Task: SSIS Error Code DTS_E_THREADCANCELLED.  Thread "WorkThread2" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.  There may be error messages posted before this with more information on why the thread was cancelled.
    Error: 0xC0047021 at Data Flow Task: SSIS Error Code DTS_E_THREADFAILED.  Thread "WorkThread0" has exited with error code 0xC0047039.  There may be error messages posted before this with more information on why the thread has exited.
    Error: 0xC0047021 at Data Flow Task: SSIS Error Code DTS_E_THREADFAILED.  Thread "WorkThread1" has exited with error code 0xC0047039.  There may be error messages posted before this with more information on why the thread has exited.
    Error: 0xC0047021 at Data Flow Task: SSIS Error Code DTS_E_THREADFAILED.  Thread "WorkThread2" has exited with error code 0xC0047039.  There may be error messages posted before this with more information on why the thread has exited.
    Error: 0xC0047021 at Data Flow Task: SSIS Error Code DTS_E_THREADFAILED.  Thread "WorkThread3" has exited with error code 0xC0047039.  There may be error messages posted before this with more information on why the thread has exited.
    Error: 0xC0047021 at Data Flow Task: SSIS Error Code DTS_E_THREADFAILED.  Thread "WorkThread4" has exited with error code 0xC0047039.  There may be error messages posted before this with more information on why the thread has exited.

    The reason is in the first line of the error.  It doesn't have anything to do with the size of your XML file - it has to do with the contents of the "MsgLev1" column.  You (or the XSD) has indicated that the values in this column not exceed a certain size - but one of the values in the file that's failing is larger than that.
    In order to fix the problem, you're going to need to increase the allocated space for that column.  In order to do that, you're going to need to find out what the required size of that data is - either from someone who ought to know, or by direct examination of the file.  If you want to know which entity has this overly large data element in it, you need to configure the error handling of the XML Source to "redirect truncation errors".  Then you can hook up the XML Source's error output to another destination where you can see which rows are problematic.
    Talk to me on

  • Error on Data Flow Task MSSQL 2012 Clustered "Description: The version of Lookup is not compatible with this version of the DataFlow. "

    We have an SSIS package that runs on clustered MSSQL 2012 Enterprise Nodes that is failing.  We use a job to executer the package.
    Environmental information:
    Product - Microsoft SQL Server Enterprise: Core-based Licensing (64-bit)
    Operating System - Microsoft Windows NT 6.1 (7601)
    Patform - NT x64
    Version - MSSQL Version 11.0.3349.0
    Package is set to 32 -bit.  All permissions verified.  Runs in lower environments, same MSSQL version.  All environments are clustered.  In the failing environment, all nodes are at the same service pack.  I have not verified if all
    nodes in the failing environment have SSIS installed.  Data access is installed.  We have other simpler packages that run in this environment, just not this one.  Time to ask the community for help!
    Error:
    Source: Data Flow Task - Data Flow Task (SSIS.Pipeline)     Description: The version of Lookup is not compatible with this version of the DataFlow.  End Error  Error:  Code: 0xC0048020    
    Description: Component "Conditional Split, clsid {7F88F654-4E20-4D14-84F4-AF9C925D3087}" could not be created and returned error code 0x80070005 "Access is denied.". Make sure that the component is registered correctly.  End Error 
    Description: The component is missing, not registered, not upgradeable, or missing required interfaces. The contact information for this component is "Conditional Split;Microsoft Corporation; Microsoft SQL Server; (C) Microsoft Corporation; All Rights
    Reserved; http://www.microsoft.com/sql/support;0".  End Error 
    (Left out shop specific information.  This is the first error in the errors returns by the job history for this package. )
    Thanks in advance.

    Hi DeveloperMax,
    According to your description, the error occurs when you execute the package with Agent job on clustered MSSQL 2012 Enterprise Nodes.
    As per my understanding, I think this issue can be caused by you use SQL Server Agent to schedule a SQL Server Integration Services package in a 64-bit environment. And the SSIS package is referencing some 32-Bit DLL or 32-Bit drivers which are available
    only in 32-bit versions, so the job failed.
    To fix this issue, we should use the 32-bit version of the DTExec.exe utility to schedule the 64-bit SQL Server Agent to run a package. To run a package in 32-bit mode from a 64-bit version of SQL Server Agent, we can go to the Job Step dialog box, then
    select “32 bit runtime” in the Advanced tab.
    Besides, we should make sure that SQL Server Integration Services is installed on the failing environment.
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Code: 0xC0208452 Source: Data Flow Task ADO NET Destination [86] Description: ADO NET Destination has failed to acquire the connection {}. The connection may have been corrupted.

    Hi There!
    I have created one package (1) to import data from Flatfile(csv), (2)Clean It  then (3)send clean rows to SQL Database.
    This package was working fine before. Since I have decided to deploy this package to automate this process, I have no clue what went wrong but this doesn't run anymore. Flatfile and Database are on same windows box. We are running SQL 2008.I
    have attached some screenshot to make this conversation more concise.
    Your time and efforts will be appreciated!
    Thanks,
    DAP

    Hi Niraj!
    I recreated connection and I was able to remove that RED DOT next to those connections.
    Still package doesnt run well :(
    I have only one server. I use same server through out the process. I ran that process as job through SSMS and attached is output file(if this explains more)...
    Microsoft (R) SQL Server Execute Package Utility
    Version 10.0.4000.0 for 64-bit
    Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
    Started:  11:34:38 AM
    Error: 2014-07-18 11:34:39.33
       Code: 0xC0208452
       Source: Data Flow Task ADO NET Destination [86]
       Description: ADO NET Destination has failed to acquire the connection {2430******}. The connection may have been corrupted.
    End Error
    Error: 2014-07-18 11:34:39.33
       Code: 0xC0047017
       Source: Data Flow Task SSIS.Pipeline
       Description: component "ADO NET Destination" (86) failed validation and returned error code 0xC0208452.
    End Error
    Error: 2014-07-18 11:34:39.33
       Code: 0xC004700C
       Source: Data Flow Task SSIS.Pipeline
       Description: One or more component failed validation.
    End Error
    Error: 2014-07-18 11:34:39.33
       Code: 0xC0024107
       Source: Data Flow Task 
       Description: There were errors during task validation.
    End Error
    DTExec: The package execution returned DTSER_SUCCESS (0).
    Started:  11:34:38 AM
    Finished: 11:34:39 AM
    Elapsed:  0.531 seconds
    Thanks for your time and efforts!
    DAP

  • Data Flow task with error redirection hangs

    I am migrating an SSIS package from 2005 to 2012.  I have a package that, among other things, contains a data flow task with redirects.  The source is a flat file pipe delimited that we receive from an outside source.  The file contains a
    bunch of bad data including empty lines.  I redirect the bad rows so I can provide an audit back to the list provider.  The file has about 300 k rows.  Since I have completed the migration wizard, the data flow task stalls at 72,173 rows.  I
    can change the number of rows that get loaded by changing the DefaultBufferMaxRows and DefaultBufferSize values but I can't get it anywhere near 300K.  I decided to try rebuilding the data flow task from scratch and found that if I set it to ignore all
    errors, the entire file will load but when I add the redirect it hangs and does not give me any errors.
    I am currently running it in debug mode from Visual Studio.  I have not tried running it from the SS agent yet.
    Any help would be greatly appreciated.  I would like to keep the error redirects if at all possible for audit reasons.
    Thanks in Advance.
    Alan

    The error says it stopped on row 45200 and that the column AgentIdentifier returned status value 4 "Text was truncated..."  This is one of the errors that I have to trap for.  The field preceding AgentIdentifier is a remarks field that typically
    contains embedded pipe characters that throw off the rest of the row.  There are some other errors that I typically find in the data file but that one is the most frequent and is why I have to redirect so I can report back to the client what rows they
    need to fix.
    Thanks for the suggestion.

  • Unable preview the data of oracle source in Data flow task in SSIS

    I am working on a SSIS package DATA FLOW TASK to get the data from Oracle Source.My oracle source query is as belows
    select Employees from EmployeDW WHERE StartDate =('15-MAY-14')
    There is no error in execution of package but there is no data in Destination table.When i am PREVIEW the data source i dont find any data but when i executed above query in Oracle i am getting the values.Do i need to make any chages in oracle data source Side.
    Can you guys help me please.

    What is the source connectoin used and its configuration? Can you please share the screenshots? That will help.
    Happy to help! Thanks. Regards and good Wishes, Deepak. http://deepaksqlmsbusinessintelligence.blogspot.com/

  • SQL Error Data Flow Task 1: The buffer manager detected that the system was low on virtual memory...

    I'm relatively new to SQL and this is the error that appeared when I tried importing my data. Not sure how to deal with this. Help please. Thanks a lot!
    Information 0x4004800c: Data Flow Task 1: The buffer manager detected that the system was low on virtual memory, but was unable to swap out any buffers. 14 buffers were considered and 14 were locked. Either not enough memory is available to the pipeline
    because not enough is installed, other processes are using it, or too many buffers are locked.

    Either reduce the amount of data e.g. by lowering the Data Flow Task records max per batch and buffer size
    or install more RAM, or process on a more capable computer.
    Arthur
    MyBlog
    Twitter

  • Data flow task error failed validation and return validation status "VS_NEEDSNEWMETADATA"

    I have ETL with ~800 tables that I moving from Oracle to SQL Server (Prod Oracle -> Prod SQL)
    Now the Oracle/SQL new version was came from vendor that I need to test, and for that I created new DEV environments for Oracle and SQL , the update includes updated new columns in exists tables and new tables . (DEV Oracle -> DEV SQL)
    So what I tried to do is to take the old ETL(PROD) to change the connection to DEV servers.
    Then I executing the packages from local laptop it's working, and if I trying to execute the packages from job schedule it's giving me errors : "Data flow task error failed validation and return validation status "VS_NEEDSNEWMETADATA"
    I went to each table to check the columns if something different, and I was dropping some of the tables and recreated them in the destination but the error still shows. I also tried to change the package to "DelayValidation" to True but without
    success.

    I do not understand the difference between "... if I going to change the Connection Manager to new connection" and "didn't change the Connection Manager, only changed inside the Server name / user/ pass" 800 tables.
    What I see is some tables your packages sees in Dev (laptop) is not of the same schema once the package is deployed hence the metadata error.
    Arthur
    MyBlog
    Twitter

  • Data flow tasks faills while loading from database to excel

    Hello,
    I am getting error while loading from oledb source to excel and the error as shown below.
    Error: 0xC0202009 at DFT - Company EX, OLE DB Destination [198]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
    Error: 0xC0209029 at DFT - Company EX, OLE DB Destination [198]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "input "OLE DB Destination Input" (211)" failed because error code 0xC020907B occurred, and the error row
    disposition on "input "OLE DB Destination Input" (211)" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the
    failure.
    Error: 0xC0047022 at DFT - Company EX: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "OLE DB Destination" (198) failed with error code 0xC0209029. The identified component returned an error from the ProcessInput
    method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the failure.
    Error: 0xC02020C4 at DFT - Company EX, OLE DB Source 1 [1]: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.
    Error: 0xC0047021 at DFT - Company EX: SSIS Error Code DTS_E_THREADFAILED.  Thread "WorkThread0" has exited with error code 0xC0209029.  There may be error messages posted before this with more information on why the thread has exited.
    Error: 0xC0047038 at DFT - Company EX: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "OLE DB Source 1" (1) returned error code 0xC02020C4.  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.
    Error: 0xC0047021 at DFT - Company EX: SSIS Error Code DTS_E_THREADFAILED.  Thread "SourceThread0" has exited with error code 0xC0047038.  There may be error messages posted before this with more information on why the thread has exited.
    Any help would be appreciated ASAP.
    Thanks,
    Vinay s

    You can use this code to import from SQL Server to Excel . . .
    Sub ADOExcelSQLServer()
    ' Carl SQL Server Connection
    ' FOR THIS CODE TO WORK
    ' In VBE you need to go Tools References and check Microsoft Active X Data Objects 2.x library
    Dim Cn As ADODB.Connection
    Dim Server_Name As String
    Dim Database_Name As String
    Dim User_ID As String
    Dim Password As String
    Dim SQLStr As String
    Dim rs As ADODB.Recordset
    Set rs = New ADODB.Recordset
    Server_Name = "EXCEL-PC\EXCELDEVELOPER" ' Enter your server name here
    Database_Name = "AdventureWorksLT2012" ' Enter your database name here
    User_ID = "" ' enter your user ID here
    Password = "" ' Enter your password here
    SQLStr = "SELECT * FROM [SalesLT].[Customer]" ' Enter your SQL here
    Set Cn = New ADODB.Connection
    Cn.Open "Driver={SQL Server};Server=" & Server_Name & ";Database=" & Database_Name & _
    ";Uid=" & User_ID & ";Pwd=" & Password & ";"
    rs.Open SQLStr, Cn, adOpenStatic
    ' Dump to spreadsheet
    With Worksheets("sheet1").Range("a1:z500") ' Enter your sheet name and range here
    .ClearContents
    .CopyFromRecordset rs
    End With
    ' Tidy up
    rs.Close
    Set rs = Nothing
    Cn.Close
    Set Cn = Nothing
    End Sub
    Also, check this out . . .
    Sub ADOExcelSQLServer()
    Dim Cn As ADODB.Connection
    Dim Server_Name As String
    Dim Database_Name As String
    Dim User_ID As String
    Dim Password As String
    Dim SQLStr As String
    Dim rs As ADODB.Recordset
    Set rs = New ADODB.Recordset
    Server_Name = "LAPTOP\SQL_EXPRESS" ' Enter your server name here
    Database_Name = "Northwind" ' Enter your database name here
    User_ID = "" ' enter your user ID here
    Password = "" ' Enter your password here
    SQLStr = "SELECT * FROM Orders" ' Enter your SQL here
    Set Cn = New ADODB.Connection
    Cn.Open "Driver={SQL Server};Server=" & Server_Name & ";Database=" & Database_Name & _
    ";Uid=" & User_ID & ";Pwd=" & Password & ";"
    rs.Open SQLStr, Cn, adOpenStatic
    With Worksheets("Sheet1").Range("A2:Z500")
    .ClearContents
    .CopyFromRecordset rs
    End With
    rs.Close
    Set rs = Nothing
    Cn.Close
    Set Cn = Nothing
    End Sub
    Finally, if you want to incorporate a Where clause . . .
    Sub ImportFromSQLServer()
    Dim Cn As ADODB.Connection
    Dim Server_Name As String
    Dim Database_Name As String
    Dim User_ID As String
    Dim Password As String
    Dim SQLStr As String
    Dim RS As ADODB.Recordset
    Set RS = New ADODB.Recordset
    Server_Name = "Excel-PC\SQLEXPRESS"
    Database_Name = "Northwind"
    'User_ID = "******"
    'Password = "****"
    SQLStr = "select * from dbo.TBL where EMPID = '2'" 'and PostingDate = '2006-06-08'"
    Set Cn = New ADODB.Connection
    Cn.Open "Driver={SQL Server};Server=" & Server_Name & ";Database=" & Database_Name & ";"
    '& ";Uid=" & User_ID & ";Pwd=" & Password & ";"
    RS.Open SQLStr, Cn, adOpenStatic
    With Worksheets("Sheet1").Range("A1")
    .ClearContents
    .CopyFromRecordset RS
    End With
    RS.Close
    Set RS = Nothing
    Cn.Close
    Set Cn = Nothing
    End Sub
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

Maybe you are looking for