Quantcast
Channel: CodeSection,代码区,SQL Server(mssql)数据库 技术分享 - CodeSec
Viewing all articles
Browse latest Browse all 3160

Stop an SSIS Package

$
0
0
There are several ways to stop and executing SSIS package. If the package is executing in the SSIS Catalog, you can use the SSISDB.[catalog].stop_operation stored procedure. Stop_operation has one parameter a bigint named @operation_id. You can execute the stored procedure thus: exec SSISDB.[catalog].stop_operation @operation_id = < operation_id >;

You can obtain the operation_id of an executing SSIS package in several ways.

One way is from the All Executions report built into SSMS:


Stop an SSIS Package

Another way is to use my (free) utility Catalog Reports which is a SQL Server Reporting Solution (SSRS) solution that allows you to view much of the information contained in the Catalog reports built into SQL Server Management Studio (SSMS). It’s shown here running on SSRS 2016 inside the Microsoft Edge browser:


Stop an SSIS Package

Once you have the operation_id value, simply plug it into the stop_operation stored procedure and execute:

exec SSISDB.[catalog].stop_operation @operation_id = 24

The stop_operation stored procedure runs for a few seconds (typically less than 15 seconds) and stops the execution of the SSIS package. SSIS packages that have been stopped are listed with “Canceled” status. You can see operation_id 19 was stopped in the screenshots shown above.

:{>


Viewing all articles
Browse latest Browse all 3160

Trending Articles