Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Override SQL Agent Service Account ?

Author  Topic 

Analyzer
Posting Yak Master

115 Posts

Posted - 2010-07-29 : 11:22:16
Need to backup prod DB from UAT system. Setup Linked Server, dedicated SQL Login and run remote server command to complete backup. All works successfully from query window.

However when run though Agent job obtain an error message saying Agent Service Account has insufficient permissions. I'm not allowed to provide perms for this account in prod or change the service account in UAT.

Any ideas how to work around this?



kenchee
Starting Member

49 Posts

Posted - 2010-08-03 : 22:44:31
look at your linked server. What type of security have you set it to? you can impersonate a user that has permissions in PROD to backup your db in your linked server.
Go to Top of Page

Analyzer
Posting Yak Master

115 Posts

Posted - 2010-08-04 : 10:03:54
Linked Server configured login works. The issue is when the backup job is executed via a SQL Agent job and this takes on the attributes of SQL Agent service account it runs under, ... which does not have perms on production.
Go to Top of Page

Peter99
Constraint Violating Yak Guru

498 Posts

Posted - 2010-08-04 : 13:36:58
run the job under account which have permission on linked server
Go to Top of Page

kenchee
Starting Member

49 Posts

Posted - 2010-08-04 : 23:19:04
Yes, hence you need to add an entry into "Local server login to remore server login mappings:" section. Add the sql agent service account in there as the "local Login" and add a remote user name and password that has permissions to backup databases on you PROD server. Also check the impersonate check box.
Go to Top of Page

Analyzer
Posting Yak Master

115 Posts

Posted - 2010-08-05 : 06:50:14
I take my orginal response back. Mapping the local service account to the remote account via the Linked Server worked perfectly.

Many thanks for your help
Go to Top of Page
   

- Advertisement -