0

I have an existing job where every time I use it, I must go to the job's properties, edit the step (only one step exists), go to Configuration, click on the Advanced tab, edit the Property Override all just to manually edit the Property value. I'd like to be able to do this using T-SQL, but after a lot of research, I'm still having a hard time figuring out how. It looks like I might need to use sp_update_jobstep but that doesn't seem to have an argument that allows me to do what I need. Any help would be greatly appreciated!

Theway
  • 45
  • 6
  • This is one of the rare questions where a picture would help a lot. Or at least a more detailed explanation of just what it is you're doing when you edit that job. – Eric Brandt Mar 19 '20 at 21:20
  • 1
    Have you tried attaching Profiler while you change the job step in SSMS? Or having SSMS script out the change instead of applying it directly? – David Browne - Microsoft Mar 19 '20 at 21:21
  • 1
    In SSMS, have you tried scripting the job to a file or a new window? You might see the value you're looking for in one of the stored proc parameters that you could then supply to sp_update_jobstep. – AlwaysLearning Mar 19 '20 at 21:31

1 Answers1

0

Per the second and third comment on my original post, I was able to solve the issue by scripting the job to set the step's Property value via sp_update_jobstep (using the @command argument).

Dharman
  • 30,962
  • 25
  • 85
  • 135
Theway
  • 45
  • 6