1

I'm running a script like below on a SQL Server box and, even though it finishes correctly, then when, on SQL Mgmt UI, I right click on that job's properties, go to Schedules, I cannot see the schedule just added... what am I missing? (I'm using the right job_name param, etc) thanks!

BEGIN TRY 
BEGIN TRAN 
  EXEC msdb.dbo.sp_add_jobschedule
  @job_name = 'Job name',
  @name=N'Job schedule name',
  @enabled = 0,
  @freq_type=1,  
  @active_start_date=20100525,  
  @active_start_time=60000 
COMMIT TRAN 
END TRY 
BEGIN CATCH 
    SELECT ERROR_Message(), ERROR_Line(); 
    ROLLBACK TRAN 
END CATCH

1 Answer 1

0

Syntax looks fine, I tried it on a test server and it worked; there were some bugs in the agent jobs handling in SSMS, make sure your client tools are service packed up to the latest. Try scripting the job out in SSMS and see if the schedule shows up in the script.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .