Error executing SSIS package using xp_cmdshell

  • When I am runing my packaGe in Command prompt using the DTEXEC it is executing the pakage when I am trying the run the below code:

    EXEC xp_cmdshell 'dtexec /f "C:\Preensheen\SSIS\DynamicFlatFileDestinations\DynamicFlatFileDestinations\DynamicNaming.dtsx"'

    I get the following error:

    Started: 9:17:39 AM

    Error: 2010-11-22 09:17:39.84

    Code: 0xC0011007

    Source: {B708843A-2E7F-4709-96A5-1FE5F4392933}

    Description: Unable to load the package as XML because of package does not have a valid XML format. A specific XML parser error will be posted.

    End Error

    Error: 2010-11-22 09:17:39.84

    Code: 0xC0011002

    Source: {B708843A-2E7F-4709-96A5-1FE5F4392933}

    Description: Failed to open package file "C:\Preensheen\SSIS\DynamicFlatFileDestinations\DynamicFlatFileDestinations\DynamicNaming.dtsx" due to error 0x80070003 "The system cannot find the path specified.". This happens when loading a package and the fil

    e cannot be opened or loaded correctly into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.

    End Error

    Could not load package "C:\Preensheen\SSIS\DynamicFlatFileDestinations\DynamicFlatFileDestinations\DynamicNaming.dtsx" because of error 0xC0011002.

    Description: Failed to open package file "C:\Preensheen\SSIS\DynamicFlatFileDestinations\DynamicFlatFileDestinations\DynamicNaming.dtsx" due to error 0x80070003 "The system cannot find the path specified.". This happens when loading a package and the file c

    annot be opened or loaded correctly into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.

    Source: {B708843A-2E7F-4709-96A5-1FE5F4392933}

    Started: 9:17:39 AM

    Finished: 9:17:39 AM

    Elapsed: 0.031 seconds

    NULL

    I am not able to identify why i am getting this. Please Advise.

    Thank you,

    Preensheen

  • preensheen (11/22/2010)


    I am not able to identify why i am getting this. Please Advise.

    I have enlighted the important pieces for you:

    Started: 9:17:39 AM

    Error: 2010-11-22 09:17:39.84

    Code: 0xC0011007

    Source: {B708843A-2E7F-4709-96A5-1FE5F4392933}

    Description: Unable to load the package as XML because of package does not have a valid XML format. A specific XML parser error will be posted.

    End Error

    Error: 2010-11-22 09:17:39.84

    Code: 0xC0011002

    Source: {B708843A-2E7F-4709-96A5-1FE5F4392933}

    Description: Failed to open package file "C:\Preensheen\SSIS\DynamicFlatFileDestinations\DynamicFlatFileDestinations\DynamicNaming.dtsx" due to error 0x80070003 "The system cannot find the path specified.". This happens when loading a package and the fil

    e cannot be opened or loaded correctly into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.

    End Error

    Could not load package "C:\Preensheen\SSIS\DynamicFlatFileDestinations\DynamicFlatFileDestinations\DynamicNaming.dtsx" because of error 0xC0011002.

    Description: Failed to open package file "C:\Preensheen\SSIS\DynamicFlatFileDestinations\DynamicFlatFileDestinations\DynamicNaming.dtsx" due to error 0x80070003 "The system cannot find the path specified.". This happens when loading a package and the file c

    annot be opened or loaded correctly into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.

    Source: {B708843A-2E7F-4709-96A5-1FE5F4392933}

    Started: 9:17:39 AM

    Finished: 9:17:39 AM

    Elapsed: 0.031 seconds

    NULL

    Now, there can be several reasons for this.

    * the XML file of the package has become corrupt. To check this, try opening the package BIDS. If it opens, then it is not this error.

    * you specified an invalid location. Double check that the location provided is indeed the right location.

    * SSIS doesn't have permissions to open the location.

    You can always try the following:

    go to the specified location and double-click on the package. Dtexecui will open (the same dtexec but with a user interface). Try running it from here. If it works, you can find the command that dtexecui used in the Command Line pane.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • da-zero (11/22/2010)


    preensheen (11/22/2010)


    I am not able to identify why i am getting this. Please Advise.

    I have enlighted the important pieces for you:

    Started: 9:17:39 AM

    Error: 2010-11-22 09:17:39.84

    Code: 0xC0011007

    Source: {B708843A-2E7F-4709-96A5-1FE5F4392933}

    Description: Unable to load the package as XML because of package does not have a valid XML format. A specific XML parser error will be posted.

    End Error

    Error: 2010-11-22 09:17:39.84

    Code: 0xC0011002

    Source: {B708843A-2E7F-4709-96A5-1FE5F4392933}

    Description: Failed to open package file "C:\Preensheen\SSIS\DynamicFlatFileDestinations\DynamicFlatFileDestinations\DynamicNaming.dtsx" due to error 0x80070003 "The system cannot find the path specified.". This happens when loading a package and the fil

    e cannot be opened or loaded correctly into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.

    End Error

    Could not load package "C:\Preensheen\SSIS\DynamicFlatFileDestinations\DynamicFlatFileDestinations\DynamicNaming.dtsx" because of error 0xC0011002.

    Description: Failed to open package file "C:\Preensheen\SSIS\DynamicFlatFileDestinations\DynamicFlatFileDestinations\DynamicNaming.dtsx" due to error 0x80070003 "The system cannot find the path specified.". This happens when loading a package and the file c

    annot be opened or loaded correctly into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.

    Source: {B708843A-2E7F-4709-96A5-1FE5F4392933}

    Started: 9:17:39 AM

    Finished: 9:17:39 AM

    Elapsed: 0.031 seconds

    NULL

    Now, there can be several reasons for this.

    * the XML file of the package has become corrupt. To check this, try opening the package BIDS. If it opens, then it is not this error.

    * you specified an invalid location. Double check that the location provided is indeed the right location.

    * SSIS doesn't have permissions to open the location.

    You can always try the following:

    go to the specified location and double-click on the package. Dtexecui will open (the same dtexec but with a user interface). Try running it from here. If it works, you can find the command that dtexecui used in the Command Line pane.

    I did try executing it with userInterace. It did execute over there. But when I take the same CMD and run it over in SSMS, i get same errors. please Advise

    Thanks,

    preensheen

  • I am able to execute the package in the command prompt...i want to execute the same in SSMS.

    Please advice

    Thanks,

    Preensheen

  • Quoting BOL:

    The Windows process spawned by xp_cmdshell has the same security rights as the SQL Server service account.

    Does this service account has the necessary priviliges to the specified location?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • da-zero (11/23/2010)


    Quoting BOL:

    The Windows process spawned by xp_cmdshell has the same security rights as the SQL Server service account.

    Does this service account has the necessary priviliges to the specified location?

    yes, I do have all the previlages

  • preensheen (11/23/2010)


    yes, I do have all the previlages

    Do you mean that you have the necessary priviliges or that the SQL Service Account has the necessary priviliges? (just to avoid any confusion)

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Thanks all for the Help.

    I really didn't know where it went wrong..but I redid all the work and it worked.

  • preensheen (11/24/2010)


    Thanks all for the Help.

    I really didn't know where it went wrong..but I redid all the work and it worked.

    :rolleyes: Typically Microsoft I guess.

    But I'm glad it worked out in the end.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Hi All,

    I got a very weird problem now.

    My etxract is running in bids, it is running is command prompt, it is running in dtexeui, but my package fails when I run the same in SSMS...fails in the sense..I have execute sql task which returns a value...it fails at that task and returns error saying that the execute sql task is not returning a value.

    I am trying to figure out what really went worng but was help less.

    Could anyone please direct me what and where could be the error.

    Thanks,preensheen

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply