Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 为所有表执行sql脚本以在ssis中并行运行_Sql Server_Ssis - Fatal编程技术网

Sql server 为所有表执行sql脚本以在ssis中并行运行

Sql server 为所有表执行sql脚本以在ssis中并行运行,sql-server,ssis,Sql Server,Ssis,我有一个索引重建和重新组织脚本,可以根据SQL Server中的碎片更改重建或重新组织 目前,我们正在SSIS包中为所有表运行该脚本,以更改以顺序方式重建或重新组织所需的索引 例如,考虑有2个表 表1有index1,index2 表2有index1、index2、index3 剧本开始改变了 表1-index1,表1-index2然后开始改变表2-index1。这个过程需要很长时间 现在我们要并行地执行所有表的脚本 像这样的 表1-index1、表2-index1等 表中的索引应按顺序执行,但脚

我有一个索引重建和重新组织脚本,可以根据SQL Server中的碎片更改重建或重新组织

目前,我们正在SSIS包中为所有表运行该脚本,以更改以顺序方式重建或重新组织所需的索引

例如,考虑有2个表

表1有index1,index2 表2有index1、index2、index3

剧本开始改变了 表1-index1,表1-index2然后开始改变表2-index1。这个过程需要很长时间

现在我们要并行地执行所有表的脚本

像这样的 表1-index1、表2-index1等
表中的索引应按顺序执行,但脚本应开始并行执行所有表


在SSIS包中可以这样做吗?

您可以为每个表使用序列容器,并分别执行每个序列容器,如下所示:


但你真的需要这样做吗?