July 11, 2013 at 3:47 am
Hi,
I am having an issue with a scheduled job (which just executes an SP) returning different results to when I run the exact same code myself manually.
When I run the code manually (using a sysadmin account) the results are correct, running the code via the job returns incorrect results. SQL Server Agent runs using the \.SQL Agent account and I have never noticed any problems before.
The SP uses new 2012 windowing functions but I don't think that should be an issue? I have tried searching for similar issues but not found anything directly relevant.
Help please it is driving me nuts!
Regards,
Craig
July 11, 2013 at 3:52 am
Craig
Here's two possibilities:
(1) Your account has a different default schema from the SQL Server Agent account
(2) The environment settings are different when it runs as a job, for example SET CONCAT_NULL_YIELDS_NULL ON/OFF.
John
July 11, 2013 at 3:56 am
Thanks John I will look into those and get back to you either way.
July 11, 2013 at 4:02 am
OK, that set me on the right track. I noticed the SQL Agent account was using English as opposed to British English. I changed that and it is now working OK.
Thanks very much for your help!
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply