catalog.create_execution (SSISDB Database)
Creates an instance of execution in the Integration Services catalog.
This stored procedure uses the default server logging level.
An execution is used to specify the parameter values that are a package uses during a single instance of package execution.
If an environment reference is specified with the reference_id parameter, the stored procedure populates the project and package parameters with literal values or referenced values from the corresponding environment variables. If environment reference is specified, default parameter values are used during package execution. To determine exactly which values are used for a particular instance of execution, use the execution_id output parameter value from this stored procedure and query the execution_parameter_values view.
Only packages that are marked as entry point packages can be specified in an execution. If a package that is not an entry point is specified, the execution fails.
The following example calls catalog.create_execution to create an instance of execution for the Child1.dtsx package. Integration Services Project1 contains the package. The example calls catalog.set_execution_parameter_value to set values for the Parameter1, Parameter2, and LOGGING_LEVEL parameters. The example calls catalog.start_execution to start an instance of execution.
Declare @execution_id bigint EXEC [SSISDB].[catalog].[create_execution] @package_name=N'Child1.dtsx', @execution_id=@execution_id OUTPUT, @folder_name=N'TestDeply4', @project_name=N'Integration Services Project1', @use32bitruntime=False, @reference_id=Null Select @execution_id DECLARE @var0 sql_variant = N'Child1.dtsx' EXEC [SSISDB].[catalog].[set_execution_parameter_value] @execution_id, @object_type=20, @parameter_name=N'Parameter1', @parameter_value=@var0 DECLARE @var1 sql_variant = N'Child2.dtsx' EXEC [SSISDB].[catalog].[set_execution_parameter_value] @execution_id, @object_type=20, @parameter_name=N'Parameter2', @parameter_value=@var1 DECLARE @var2 smallint = 1 EXEC [SSISDB].[catalog].[set_execution_parameter_value] @execution_id, @object_type=50, @parameter_name=N'LOGGING_LEVEL', @parameter_value=@var2 EXEC [SSISDB].[catalog].[start_execution] @execution_id GO
The following list describes some conditions that can raise an error or warning:
-
The package does not exist.
-
The user does not have the appropriate permissions.
-
The environment reference, reference_id, is not valid.
-
The package that is specified is not an entry point package.
-
The data type of the referenced environment variable is different from the data type of the project or package parameter.
-
The project or package contains parameters that require values, but no values have been assigned.
-
The referenced environment variables cannot be found in the environment that the environment reference, reference_id, specifies.