Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xp_cmdshell calls exe - exe runs under different profile

Status
Not open for further replies.

SQLWilts

Programmer
Feb 12, 2001
651
GB
Hi,
I am using xp_cmdshell to call robocopy.exe to copy a backuop from another server in a different domain. All was working fine until a restart - methinks security pixies have been out!
The process fails and robocopy logs that it failed to access a share. OK - I looked deeper.
I found that robocopy.exe wasn't running under the sql agent account - in the event log it was running under a local admins account - that would explain why it doesn't have access to the shares, whereas the SQL agent does.
I thought (nieve me) that exes called from sql agent ran under the agent profile. Can someone tell me the following please:
Should exes called from the SQL agent run under SQL agents profile - if so, what could have changed (I can't see any proxy accounts there) and what steps should I take to put it right?
If the exe should run under a different profile, how can I tell SQL to call it using the SQL agent profile?

Windows 2003, SQL 2000 SP3a

Many thanks
 
I might have sussed it.

Looks like someone has been fiddling.

The SQL server service is actually running under a different account than the one that the service has been set to run under. I suspect that someone started it using the local admin account (you can see the user running the process under task manager) and then changed the service settings - without restarting the service. Someone, somewhere needs their fingers rapped - but I suspect I will never know who did it. Damn security pixies - I need to gentically build a nasty virus that stops them from doing this!!!
Thanks to all who looked
 
take away other people's rights to get into the server...

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top