[英]Execute remote ssis package using dtexec
有沒有辦法讓dtexec工具在指向遠程SSIS包時直到包完成運行才退出?
我的包運行成功,但dtexec報告的運行時間比SQL Server上“All Executions”報告中報告的實際持續時間短得多。 它打印消息:
To view the details for the execution, right-click on the Integration Services Catalog, and open the [All Executions] report
我的目標是在命令行上啟動dtexec,然后運行依賴於包完成的其他代碼。 理想情況下,我希望dtexec在程序包完成運行之前不要退出。
這可能嗎?
您正在尋找SYNCHRONIZED參數
為了使我的鏈接只回答鏈接和代碼回答,這里是Phil的代碼用於TSQL
DECLARE @execution_id BIGINT = 0;
-- Create a package execution
EXEC [SSISDB].[catalog].[create_execution]
@package_name=N'Package.dtsx',
@execution_id=@execution_id OUTPUT,
@folder_name=N'PhilsTest',
@project_name=N'Demo',
@use32bitruntime=False;
EXEC [SSISDB].[catalog].[set_execution_parameter_value]
@execution_id,
@object_type=50,
@parameter_name=N'SYNCHRONIZED',
@parameter_value=1; -- true
-- Start the package
EXEC [SSISDB].[catalog].[start_execution]
@execution_id;
要從dtexec獲得相同的行為,您可以指定參數
DTExec
/ISSERVER "\SSISDB\folderB\Integration Services Project17\Package.dtsx"
/SERVER "." /Envreference 2
/Par "$Project::ProjectParameter(Int32)";1 /Par "Parameter(Int32)";21
/Par "CM.sqlcldb2.SSIS_repro.InitialCatalog";ssisdb
/Par "$ServerOption::SYNCHRONIZED(Boolean)";True
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.