2

I have a stored procedure that starts a job. When I go to [Databases] -> [System Databses] -> [msdb] -> [Tables] -> [System Tables] I can see the job in [dbo].[sysjobs] and everything related to this job is there in the msdb tables, and I've tested that calling the stored procedure does run the job and the job does what its supposed to.

But for some reason I don't see the job when I go to [SQL Server Agent] -> [Jobs] There is no job there that matches the same name of the job I have in [msdb]. Just wondering if anyone has any insight as to why this might be.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Parth K.
  • 21
  • 2

1 Answers1

0

First thing to try:

Check if the permissions are interfering somehow:

https://learn.microsoft.com/en-us/sql/ssms/agent/sql-server-agent-fixed-database-roles

Is the account executing the stored procedure the same as the one you're logging into SQL Server Management Studio with? If not, there could be a difference in permissions between the accounts.

Another option:

It may be painful, but another option is to try recreating the job.

Otherwise, you could try the following:

This may be more of a means to an answer than the answer itself, and it assumes you have high enough access to create a trace.

  1. Create a Trace
  2. Add a new job, capturing the activity using the trace
  3. Go through each activity and compare it to the job in question

This might help you determine what is different or missing from your job in question.

Soukai
  • 463
  • 5
  • 8