Hi, I have created a sql job. It is getting executed successfully. But stored procedure is not getting executed in the job. If I run stored procedure seperately values are getting updated accordingly. Any idea about the job behaviour?
Is there more than one step in the job? If so you may have it exiting before it gets to your step. Check the second page of properties of each step to ensure that it goes on to the next step on successful completion. It could also be a question of permissions. Your SQL Agent service runs under an account that is different than yours, so it may not be able to modify the database. Also, you can adjust the output of the job steps to write to a file so you can see all the information from the job. That's a good way to understand how things run. As @Magnus says in the comment, you can also use trace events or extended events to observe the system as the job runs.