• h.schlais (12/15/2008)


    Hi Lynn, I get the following error:

    Cannot add rows to sys.sql_dependencies for the stored procedure because it depends on the missing table 'dbo.sp_start_job'. The stored procedure will still be created; however, it cannot be successfully executed until the table exists.

    my call is:

    IF (DATEPART(WEEKDAY,GETDATE())=1 OR DATEPART(WEEKDAY,GETDATE())=7)

    BEGIN

    EXEC dbo.sp_start_job @job_name='ManualSync',@server_name='SQL_01, @step_name='Update_1'

    END

    You're missing something very important, see below:

    IF (DATEPART(WEEKDAY,GETDATE())=1 OR DATEPART(WEEKDAY,GETDATE())=7)

    BEGIN

    EXEC msdb.dbo.sp_start_job @job_name='ManualSync',@server_name='SQL_01, @step_name='Update_1'

    END