Starting Job on Another Server

This is MSSQL 2008 R2
On both servers, the job agent runs as local System.
When I run sp_start_job I'm getting account errors and I suspect it is because we don't use a domain account for the agent.

What are my options? Can I avoid using a proxy account?
Thanks.

A proxy account is recommended and can you post the error messages?

Thanks gbritton.

Server A is attempting to start a job on Server B

Agent on Server A runs under a domain acct which has sysadmin role.

Agent on Server B runs as Local System.

My login has sysadmin role.

When I run EXEC ServerB.msdb.dbo.sp_start_job N'Started From ServerA';

Msg 229, Level 14, State 5, Procedure sp_start_job, Line 1
The EXECUTE permission was denied on the object 'sp_start_job', database 'msdb', schema 'dbo'.

Does this have anything to do with job owner?

Thanks,

It's more fundamental than that. the Local System does not have access to the msdb database (why would it?). it's not the job owner that's the problem, but the job executor. If no have no proxy defined that defaults to the account running SQL Server Agent, IIRC. Set up a proxy for running jobs on System B

1 Like

Actually - this has nothing to do with SQL Server Agent. You have a linked server between ServerA and ServerB - and that linked server has been configured for some type of authentication. However it has been configured - the user does not have the required permissions on ServerB to execute that stored procedure.

Either grant permissions to the user defined in the linked server configuration - or map the user running the agent job to a user on the other server that has the appropriate permissions.