简体   繁体   English

DTExec.exe CheckFile和Validate失败

[英]DTExec.exe CheckFile and Validate fails

I'm trying to execute a dtsx script using DTExec.exe as part of the batch process. 我正在尝试使用DTExec.exe执行dtsx脚本作为批处理过程的一部分。 The following command line script works: 以下命令行脚本有效:

"C:\Program Files\Microsoft SQL Server\130\DTS\Binn\DTExec.exe" -File "\\\\vm-to-somewhere\d$\Projects\test.dtsx"

However, if I try to run a check/validation on the test.dtsx file before actually running the script, it fails with an exit code of 6 (which translates to: The utility encountered an internal error of syntactic or semantic errors in the command line). 但是,如果我在实际运行脚本之前尝试在test.dtsx文件上运行检查/验证,则它会以退出代码6失败(转换为:实用程序在命令中遇到语法或语义错误的内部错误线)。

$ "C:\Program Files\Microsoft SQL Server\130\DTS\Binn\DTExec.exe" -CheckFile "\\\\vm-to-somewhere\d$\Projects\test.dtsx"
$ "C:\Program Files\Microsoft SQL Server\130\DTS\Binn\DTExec.exe" -Validate "\\\\vm-to-somewhere\d$\Projects\test.dtsx"

Returns: Option "\\\\vm-to-somewhere\d$\Projects\test.dtsx" is not valid.

It's probably just a simple mistake I'm overlooking, and I was wondering if it was something with the backslashes but the first command runs fine so it doesn't make sense. 这可能只是我忽略的一个简单的错误,我想知道它是否是反斜杠的东西,但第一个命令运行正常所以它没有意义。

Also, if someone could point out to me the differences between -CheckFile and -Validate, that might help me decide which to use in my script. 此外,如果有人可以向我指出-CheckFile和-Validate之间的差异,这可能有助于我决定在我的脚本中使用哪些。 I just need to know if the dtsx works fine before executing it because it takes 3hrs to run and I prefer to find out sooner rather than later. 我只需要知道dtsx在执行之前是否正常工作,因为它需要3小时才能运行,我更愿意早点发现而不是更晚。

References: https://msdn.microsoft.com/en-us/library/hh231187(v=sql.110).aspx 参考文献: https//msdn.microsoft.com/en-us/library/hh231187(v = sql.110).aspx

You missed "-File" (or "-f") option just in front of your package name 您在包名前面错过了“-File”(或“-f”)选项

It should be like 应该是这样的

DTExec.exe -f "<package name with path>" -Validate

Note that the package may have a configured delayed validation, so -Validate option won't validate the items with delayed validation. 请注意,程序包可能具有已配置的延迟验证,因此-Validate选项不会验证具有延迟验证的项目。 There are options to enforce a validation of items with delayed validation, but this is a separate topic. 有一些选项可以强制验证延迟验证的项目,但这是一个单独的主题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM