SQL Server 8
Hello,
I have a stored proc (below) which starts a job. What I'd like to do is add a second parameter (e-mail name) so whomever starts this job will be e-mailed when it completes. Currently someone else starts the job and I get notified when it's done.
Problem is I can't seem to reference this job property in the help files when I look up sp_update_jobstep.
Could it possibly be be under the @additional_parameters? Or does anyone know where I could look to find out?
Thanks,
Jason
Hello,
I have a stored proc (below) which starts a job. What I'd like to do is add a second parameter (e-mail name) so whomever starts this job will be e-mailed when it completes. Currently someone else starts the job and I get notified when it's done.
Problem is I can't seem to reference this job property in the help files when I look up sp_update_jobstep.
Could it possibly be be under the @additional_parameters? Or does anyone know where I could look to find out?
Thanks,
Jason
Code:
CREATE procedure s_UnconsolidatedIncome_YardiGenerate_Run
@Year varchar(4)
as
Declare @LoadYear varchar(4)
Declare @StepCommand varchar(255)
Declare @JobName varchar(255)
Select @LoadYear = @Year
Select @StepCommand = 's_UnconsolidatedIncome_YardiGenerate ''' + @LoadYear + ''''
Select @JobName = 'Unconsolidated Income'
Exec msdb.dbo.sp_update_jobstep @job_name = @JobName, @step_id = 1,
@command = @StepCommand
Exec msdb.dbo.sp_start_job @job_name = @JobName