Re: How can I grant user run cmdexec

From: Hari Prasad (hari_prasad_k_at_hotmail.com)
Date: 08/11/04


Date: Wed, 11 Aug 2004 09:18:10 +0530

Hi,

First you can give grant execute on xp_cmdshell (gtrant execute on
xp_cmdshell to user) to the user in master database.

If they are not a member of the sysadmin role then they execute it under the
prefix of the SQL Agent Proxy Account.
sysadmin users would execute it as the account under which MSSQL Server
service starts.

How to set the proxy account:

1. Open enterprise manager and select management options
2. Right click abouve the sql Agent and select properties
3. Select the "job system" option
4. Set the "Non sysadmin job step proxy account
5. There you have give the valid OS level user with previlage.

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:
80/support/kb/articles/Q264/1/55.ASP&NoWebContent=1

Thanks
Hari
MCDBA

"Cora" <anonymous@discussions.microsoft.com> wrote in message
news:3a2801c47f53$0d7a2ba0$a301280a@phx.gbl...
> I have a DTS task that needs to run cmdexec, how can I
> grant the user have the rights to run this DTS but not
> giving him Admin rights?



Relevant Pages

  • Re: xp_cmdshell
    ... When xp_cmdshell is invoked by a user who is a member of the sysadmin fixed ... which the SQL Server service is running. ... Set the "Non sysadmin job step proxy account ... > I have a user and I want to to give persmission of that user to execute ...
    (microsoft.public.sqlserver.clients)
  • Re: SQL Server Agent Proxy Account / XP_CMDSHELL
    ... The proxy account is unrelated to SQL Server object permissions. ... must have xp_cmdshell execute permissions when xp_cmdshell executed ... execute permissions on xp_cmdshell. ...
    (microsoft.public.sqlserver.security)
  • Re: xp_cmdshell default path (system32) problem
    ... I've used the proxy account several times before. ... SQL script that contains the xp_cmdShell is executed while logged in as 'sa' ... - specify the full path in the del command ... I'm use xp_cmdShell to execute "erase" command like ...
    (microsoft.public.sqlserver.programming)
  • Re: How can I grant user run cmdexec
    ... Unable to set the SQL Agent proxy account because of the reason listed ... > First you can give grant execute on xp_cmdshell (gtrant execute on ... >> grant the user have the rights to run this DTS but not ...
    (microsoft.public.sqlserver.security)
  • Re: xp_cmdshell default path (system32) problem
    ... I mentioned in one of my earlier posts on this thread that the proxy account will not be used by sysadmins. ... in my experience if the SQL script that contains the xp_cmdShell is executed while logged in as 'sa' then the proxy account is not used. ... I believe I had the samething happen if the sql was execute from SQL agent when SQL agent is running under the system service account. ... technically if you specify the whole path with the del command you dont if need the if exist part, ...
    (microsoft.public.sqlserver.programming)