标签:
在项目部署模型中,使用TSQL 和 SSIS project进行交互。
1,Script
declare @Execution_ID bigint exec catalog.create_execution @package_name=N‘Test.dtsx‘, @Execution_ID=@Execution_ID output, @folder_name=N‘MyProjectFloder‘, @project_name=N‘MyProject‘, @use32bitruntime=FALSE, @reference_id=null exec catalog.start_execution @Execution_ID=@Execution_ID
调用 catalog.create_execution ,创建Package的ExecutionID 和 OperationID,调用 catalog.start_execution 执行package。
2,Script,使用参数
declare @Execution_ID bigint exec catalog.create_execution @package_name=N‘Test.dtsx‘, @Execution_ID=@Execution_ID output, @folder_name=N‘MyProjectFloder‘, @project_name=N‘MyProject‘, @use32bitruntime=FALSE, @reference_id=null declare @var0 sql_variant=N‘Package_Parameter_value‘; exec catalog.set_execution_parameter_value @Execution_ID=@Execution_ID, @object_type=30, --Package @parameter_name=N‘Package_Parameter_Name‘, @parameter_value=@var0 exec catalog.start_execution @Execution_ID=@Execution_ID
参考文档:
Stored Procedures (Integration Services Catalog)
标签:
原文地址:http://www.cnblogs.com/ljhdo/p/5160329.html