Created
March 12, 2014 19:45
-
-
Save billinkc/9514816 to your computer and use it in GitHub Desktop.
UNC is fine with an SSIS job as parameter for package or project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [msdb] | |
GO | |
DECLARE @jobId binary(16) | |
EXEC msdb.dbo.sp_add_job | |
@job_name = N'MarkV' | |
, @enabled = 1 | |
, @notify_level_eventlog = 0 | |
, @notify_level_email = 2 | |
, @notify_level_netsend = 2 | |
, @notify_level_page = 2 | |
, @delete_level = 0 | |
, @category_name = N'[Uncategorized (Local)]' | |
, @job_id = @jobId OUTPUT | |
SELECT | |
@jobId | |
GO | |
EXEC msdb.dbo.sp_add_jobserver | |
@job_name = N'MarkV' | |
, @server_name = N'localhost\DEV2012' | |
GO | |
USE [msdb] | |
GO | |
EXEC msdb.dbo.sp_add_jobstep | |
@job_name = N'MarkV' | |
, @step_name = N'Test' | |
, @step_id = 1 | |
, @cmdexec_success_code = 0 | |
, @on_success_action = 1 | |
, @on_fail_action = 2 | |
, @retry_attempts = 0 | |
, @retry_interval = 0 | |
, @os_run_priority = 0 | |
, @subsystem = N'SSIS' | |
, @command = N'/ISSERVER "\"\SSISDB\SO\VarigenceForums\markvsqlishandsomeandwitty.dtsx\"" /SERVER "\"localhost\dev2012\"" /Par "\"$Project::PkgUNC\"";"\"\\localhost\ssisdata\"" /Par ParamUNC;"\"\\localhost\ssisdata\"" /Par "\"$ServerOption::LOGGING_LEVEL(Int16)\"";1 /Par "\"$ServerOption::SYNCHRONIZED(Boolean)\"";True /CALLERINFO SQLAGENT /REPORTING E' | |
, @database_name = N'master' | |
, @flags = 0 | |
GO | |
USE [msdb] | |
GO | |
EXEC msdb.dbo.sp_update_job | |
@job_name = N'MarkV' | |
, @enabled = 1 | |
, @start_step_id = 1 | |
, @notify_level_eventlog = 0 | |
, @notify_level_email = 2 | |
, @notify_level_netsend = 2 | |
, @notify_level_page = 2 | |
, @delete_level = 0 | |
, @description = N'' | |
, @category_name = N'[Uncategorized (Local)]' | |
, @notify_email_operator_name = N'' | |
, @notify_netsend_operator_name = N'' | |
, @notify_page_operator_name = N'' | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment