【问题标题】:Failed to open package file due to error 0x800070035由于错误 0x800070035,无法打开包文件
【发布时间】:2016-03-16 16:10:41
【问题描述】:

完整的错误信息:

Could not load package "\\File.dtsx" because of error 0xC0011002.
Description: Failed to open package file "\\File" due to error 0x80070035 "The network path was not found.".  This occurs when loading a package and the file cannot be opened or loaded correctly into the XML document. This can be the result of specifying an incorrect file name when calling LoadPackage or the specified XML file has an incorrect format.

这是一个非常奇怪的问题。我们有一个 SSIS 包,它在批处理文件中通过 dtexec 调用。 SSIS 包以 64 位运行,我们还使用 64 位版本的 dtexec。

我们有一个任务调度程序,它调用调用包的批处理文件。看起来是这样的:

cd C:\Program Files\Microsoft SQL Server\120\DTS\Binn

dtexec.exe /f "\\local\it$\Development\.NET Projects\Reporting\DailyUpload_DEV\DailyUpload\File.dtsx"

但是,有时包运行时完全没有问题,有时它会抛出您可以在上面看到的错误。

为什么会这样?

我们不更改帐户,我们也使用管理员,所以我知道这不是安全问题。

【问题讨论】:

    标签: batch-file ssis dtexec


    【解决方案1】:

    尝试在运行命令之前添加 net use 以便在拉取文件之前建立初始连接

    Net use \\local\it$ "passwordhere" /USER:domain.username
    cd C:\Program Files\Microsoft SQL Server\120\DTS\Binn
    dtexec.exe /f "\\local\it$\Development\.NET Projects\Reporting\DailyUpload_DEV\DailyUpload\File.dtsx"
    

    【讨论】:

    • 这会完成什么?
    • 我以前有过它,它没有机会正确地建立与远程资源的连接,所以它失败了,因此为什么它偶尔会起作用,所以在它尝试命令之前建立初始连接会确保它始终准备好拉取文件的连接。
    猜你喜欢
    • 2017-04-06
    • 1970-01-01
    • 2017-04-24
    • 2014-12-07
    • 2011-02-07
    • 2015-11-08
    • 1970-01-01
    相关资源
    最近更新 更多