Skip to content

Instantly share code, notes, and snippets.

@tdmitch
Created December 22, 2016 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tdmitch/20b7fba5b158b4a29521fb45930e65b1 to your computer and use it in GitHub Desktop.
Save tdmitch/20b7fba5b158b4a29521fb45930e65b1 to your computer and use it in GitHub Desktop.
-- Set up the execution instance
DECLARE @execution_id BIGINT
EXEC [SSISDB].[catalog].[create_execution]
@package_name = N'30 Parameterized Package.dtsx'
, @execution_id = @execution_id OUTPUT
, @folder_name = N'Making the Most of the SSIS Catalog'
, @project_name = N'Making the Most of the Catalog'
, @use32bitruntime = False
, @reference_id = 2
/*
Set logging level 100 to indicate a custom log level
*/
DECLARE @logLevel SMALLINT = 100
EXEC [SSISDB].[catalog].[set_execution_parameter_value]
@execution_id
, @object_type = 50
, @parameter_name = N'LOGGING_LEVEL'
, @parameter_value = @logLevel
/*
Set CUSTOMIZED_LOGGING_LEVEL to the name of the
custom log level for this execution
*/
DECLARE @logLevelName SQL_VARIANT = N'New Custom Logging Level'
EXEC [SSISDB].[catalog].[set_execution_parameter_value]
@execution_id
, @object_type = 50
, @parameter_name = N'CUSTOMIZED_LOGGING_LEVEL'
, @parameter_value = @logLevelName
-- Execute the package
EXEC [SSISDB].[catalog].[start_execution] @execution_id
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment