Why isn't it possible to run a stored procedure via a job in SQL Server Agent which references a table whose name includes ampersand (&) but it works if you perform exactly the same operation in query analyzer?
'sa' might have excute permissions but sql server agent either runs as the administrator account on the actual server or as a domain account eg. SERVER01\Administrator or FINANCE\User1.
The job schedules are handled and executed by SQL Server Agent, now if that account can't execute the sp that could be the cause.
It would always work in analyser since you are logged on have the necessary rights. The same things affect DTS since the sql server agent often does not have rights to the servers it fetches or passes data to.
Therefore the only logical explanation is that SQL Server Agent can't exec the sp.
I suggest that you make sure that the local administrator has 'sa' rights and if you use a domain account for the sql server agent that that account exists in sql server as a login and also has 'sa' rights.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.