SQL Server Import and Export Wizard - Deferred prepare could not be completed. Query timeout expired

Answered SQL Server Import and Export Wizard - Deferred prepare could not be completed. Query timeout expired

  • Thursday, February 07, 2013 1:58 AM
     
     

    Hello,

      I am pulling data from a remote server that has a lot of demands put on it.  I am running a complicated query that takes about 8hrs to run and pulls a couple Tb of data.  I would like to put this query into an SSIS package, but when I run through the wizard it quickly times out with this error:

    TITLE: SQL Server Import and Export Wizard
    ------------------------------

    The statement could not be parsed.

    ------------------------------
    ADDITIONAL INFORMATION:

    Deferred prepare could not be completed.
    Query timeout expired (Microsoft SQL Server Native Client 10.0)

    ------------------------------
    BUTTONS:

    OK
    ------------------------------

    I have looked through many posts with similar questions and none of them have provided any answer beyond "rewrite your query" - what I would really rather know is - how do I increase that timeout?  This query runs just fine in Management Studio - it just takes a while to complete - and the 8hrs is fine because it is ranking month end data for reports.  I have ownership access to my local SQL instance, but I have only read access to the remote SQL server.  Any help/input would be appreciated (again, all I am looking for is how to increase the timeout for the SQL Import/Export wizard).


    Shane

All Replies

  • Friday, February 08, 2013 9:30 AM
     
     Answered

    Hi Ghallo,

    I suggest you create a SSIS package to run the query using Execute SQL Task, then you can configure the value of TimeOut in Execute SQL Task Editor, for more details about Execute SQL Task , please see: http://technet.microsoft.com/en-us/library/ms141003.aspx

    Thanks,
    Eileen

    If you have any feedback on our support, please click here


    Eileen Zhao
    TechNet Community Support