适用对象:是SQL Server,包含 Linux 版 是Azure SQL 数据库 是Azure Synapse Analytics (SQL DW) 否并行数据仓库 APPLIES TO: yesSQL Server, including on Linux yesAzure SQL Database yesAzure Synapse Analytics (SQL DW) noParallel Data Warehouse

适用对象: 是SQL Server 否Azure SQL 数据库 否Azure Synapse Analytics (SQL DW) 否并行数据仓库 APPLIES TO: yesSQL Server noAzure SQL Database noAzure Synapse Analytics (SQL DW) noParallel Data Warehouse

显示数据流组件在每个执行阶段中所花的时间。Displays the time spent by a data flow component in each execution phase.

列名Column name 数据类型Data type 描述Description
phase_stats_idphase_stats_id bigintbigint 阶段的唯一标识符 (ID)。Unique identifier (ID) of the phase.
execution_idexecution_id bigintbigint 执行实例的唯一 ID。Unique ID for the instance of execution.
package_namepackage_name nvarchar(260) nvarchar(260) 在执行过程中启动的第一个包的名称。The name of the first package that was started during execution.
task_nametask_name nvarchar(4000)nvarchar(4000) 数据流任务的名称。The name of the data flow task.
subcomponent_namesubcomponent_name nvarchar(4000)nvarchar(4000) 数据流组件的名称。The name of the data flow component.
phasephase nvarchar(128)nvarchar(128) 执行阶段的名称。The name of the execution phase.
start_timestart_time datetimeoffset(7)datetimeoffset(7) 阶段开始的时间。The time when the phase started.
end_timeend_time datetimeoffset(7)datetimeoffset(7) 阶段结束的时间。The time when the phase ended.
execution_pathexecution_path nvarchar(max)nvarchar(max) 数据流任务的执行路径。The execution path of the data flow task.


此视图显示数据流组件的每个执行阶段(如 Validate、Pre-Execute、Post-Execute、PrimeOutput 和 ProcessInput)对应的行。This view displays a row for each execution phase of a data flow component, such as Validate, Pre-Execute, Post-Execute, PrimeOutput, and ProcessInput. 每行显示特定执行阶段的开始时间和结束时间。Each row displays the start and end time for a specific execution phase.


下面的示例使用 catalog.execution_component_phases 视图查看特定包在所有阶段花在执行上的总时间 (active_time) 以及包的总运行时间 (total_time)。The following example uses the catalog.execution_component_phases view to find the total amount of time that a specific package has spent executing in all phases (active_time), and the total elapsed time for the package (total_time).


如果包执行的日志记录级别设置为“性能”或“详细”,则 catalog.execution_component_phases 视图将提供此信息。The catalog.execution_component_phases view provides this information when the logging level of the package execution is set to Performance or Verbose. 有关详细信息,请参阅 在 SSIS 服务器上启用包执行的日志记录For more information, see Enable Logging for Package Execution on the SSIS Server.

use SSISDB  
select package_name, task_name, subcomponent_name, execution_path,  
    SUM(DATEDIFF(ms,start_time,end_time)) as active_time,  
    DATEDIFF(ms,min(start_time), max(end_time)) as total_time  
from catalog.execution_component_phases  
where execution_id = 1841  
group by package_name, task_name, subcomponent_name, execution_path  
order by package_name, task_name, subcomponent_name, execution_path  


此视图需要下列权限之一:This view requires one of the following permissions:

  • 针对执行实例的 READ 权限READ permission on the instance of execution

  • ssis_admin 数据库角色的成员资格Membership to the ssis_admin database role

  • sysadmin 服务器角色的成员资格Membership to the sysadmin server role


当您具有在服务器上执行操作的权限时,您还具有查看有关此操作的信息的权限。When you have permission to perform an operation on the server, you also have permission to view information about the operation. 将实施行级安全性;只显示您有权查看的行。Row-level security is enforced; only rows that you have permission to view are displayed.