Using dtexec

  • I'm trying to use the dtexec utility to insert data from an excel file into a sql table.

    Here is the command I'm running:

    dtexec /f "H:\FedExTracking.xls"

    I'm using this through a bat file.

    When executed I get the following error:

    Microsoft Windows XP [Version 5.1.2600]

    (C) Copyright 1985-2001 Microsoft Corp.

    H:\>fedexph

    H:\>dtexec /f "H:\FedExTracking.xls"

    Microsoft (R) SQL Server Execute Package Utility

    Version 9.00.1399.06 for 32-bit

    Copyright (C) Microsoft Corp 1984-2005. All rights reserved.

    Started: 4:27:51 PM

    Error: 2008-10-06 16:27:51.08

    Code: 0xC0011007

    Source: {8F1D5B4D-D8FF-4805-BE8F-0C8F89A705E4}

    Description: Unable to load the package as XML because of package does not ha

    ve a valid XML format. A specific XML parser error will be posted.

    End Error

    Error: 2008-10-06 16:27:51.08

    Code: 0xC0011002

    Source: {8F1D5B4D-D8FF-4805-BE8F-0C8F89A705E4}

    Description: Failed to open package file "H:\FedExTracking.xls" due to error

    0x800C0006 "The system cannot locate the object specified.". This happens when

    loading a package and the file 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 inc

    orrect format.

    End Error

    Could not load package "H:\FedExTracking.xls" because of error 0xC0011002.

    Description: Failed to open package file "H:\FedExTracking.xls" due to error 0x8

    00C0006 "The system cannot locate the object specified.". This happens when loa

    ding a package and the file cannot be opened or loaded correctly into the XML do

    cument. This can be the result of either providing an incorrect file name was sp

    ecified when calling LoadPackage or the XML file was specified and has an incorr

    ect format.

    Source: {8F1D5B4D-D8FF-4805-BE8F-0C8F89A705E4}

    Started: 4:27:51 PM

    Finished: 4:27:51 PM

    Elapsed: 0.093 seconds

    H:\>

    Any Ideas would be apprecated..

    Jason

  • You didn't specify the SSIS package that you want to execute. The /F parameter of dtexec is for specifying the location of the package, not the file you want to import.

    Greg

  • OK...I modified the script to call:

    dtexec /f "H:\FedExPH.dtsx"

    And I receive the following error:

    Microsoft Windows XP [Version 5.1.2600]

    (C) Copyright 1985-2001 Microsoft Corp.

    H:\>FedExPH

    H:\>dtexec /f "H:\FedEx.dtsx"

    Microsoft (R) SQL Server Execute Package Utility

    Version 9.00.1399.06 for 32-bit

    Copyright (C) Microsoft Corp 1984-2005. All rights reserved.

    Started: 8:31:58 AM

    Error: 2008-10-07 08:32:00.23

    Code: 0xC0016016

    Source:

    Description: Failed to decrypt protected XML node "DTS:Password" with error 0

    x8009000B "Key not valid for use in specified state.". You may not be authorized

    to access this information. This error occurs when there is a cryptographic err

    or. Verify that the correct key is available.

    End Error

    Progress: 2008-10-07 08:32:03.21

    Source: Data Flow Task

    Validating: 0% complete

    End Progress

    Error: 2008-10-07 08:32:04.13

    Code: 0xC0202009

    Source: Package Connection manager "Excel Connection Manager"

    Description: An OLE DB error has occurred. Error code: 0x80004005.

    An OLE DB record is available. Source: "Microsoft JET Database Engine" Hresult

    : 0x80004005 Description: "External table is not in the expected format.".

    End Error

    Error: 2008-10-07 08:32:04.15

    Code: 0xC020801C

    Source: Data Flow Task Excel Source [27]

    Description: The AcquireConnection method call to the connection manager "Exc

    el Connection Manager" failed with error code 0xC0202009.

    End Error

    Error: 2008-10-07 08:32:04.16

    Code: 0xC0047017

    Source: Data Flow Task DTS.Pipeline

    Description: component "Excel Source" (27) failed validation and returned err

    or code 0xC020801C.

    End Error

    Progress: 2008-10-07 08:32:04.18

    Source: Data Flow Task

    Validating: 50% complete

    End Progress

    Error: 2008-10-07 08:32:04.20

    Code: 0xC004700C

    Source: Data Flow Task DTS.Pipeline

    Description: One or more component failed validation.

    End Error

    Error: 2008-10-07 08:32:04.20

    Code: 0xC0024107

    Source: Data Flow Task

    Description: There were errors during task validation.

    End Error

    DTExec: The package execution returned DTSER_FAILURE (1).

    Started: 8:31:58 AM

    Finished: 8:32:04 AM

    Elapsed: 5.984 seconds

    H:\>

  • The two errors that I'm able to interpret are:

    Error: 2008-10-07 08:32:00.23

    Code: 0xC0016016

    Source:

    Description: Failed to decrypt protected XML node "DTSassword" with error 0

    x8009000B "Key not valid for use in specified state.". You may not be authorized

    to access this information. This error occurs when there is a cryptographic err

    or. Verify that the correct key is available.

    End Error

    I think this means the package was saved with a password i.e. protection level = EncryptAllWithPassword or EncryptSensitiveWithPassword, which must be supplied in the dtexec command.

    Error: 2008-10-07 08:32:04.13

    Code: 0xC0202009

    Source: Package Connection manager "Excel Connection Manager"

    Description: An OLE DB error has occurred. Error code: 0x80004005.

    An OLE DB record is available. Source: "Microsoft JET Database Engine" Hresult

    : 0x80004005 Description: "External table is not in the expected format.".

    End Error

    This seems to say that the input file isn't in the Excel format that the package expects.

    Greg

  • You need to chance the propertie ProtectionLevel to DontSaveSensite for example.

Viewing 5 posts - 1 through 4 (of 4 total)

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