xp_sqlagent_proxy_account: Specified user cannot login

From: Roberto Kohler (rkohler_at_intranetslab.com)
Date: 07/13/05


Date: Tue, 12 Jul 2005 22:09:26 -0400

I am trying to configure SQL so that a user without admin privileges can
execute xp_cmdshell.
I understand I needed to do the following:
---------------
use master
EXEC msdb..sp_set_sqlagent_properties @sysadmin_only = 0
EXEC master..xp_sqlagent_proxy_account N'SET'
, N'domain'
, N'proxyuser'
, N'password'
exec sp_grantdbaccess 'domain\testUSR', 'testUSR'
grant exec on xp_cmdshell to testUSR
---------------

but EXEC master..xp_sqlagent_proxy_account
gives me the following error:
"Error executing extended stored procedure: Specified user can not login"

- The SQL Server Agent Service Startup account is domain\Administrator
- I've tried configuring a proxyuser with admin privileges as well as one
without admin privileges and I get the same result.
- I unselected the checkbox 'Only users with sysadmin privileges under SQL
Enterprise Manager - SQL Server Agent - Properties - Job System
- I am running SQL SP3a
- @@VERSION is
Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)

Any ideas would be appreciated



Relevant Pages

  • Re: Application role to access xp_cmdshell
    ... This necessitates that your user procs be owned ... See Cross-database chaining in the SQL 2000 ... You will also need to allow non-sysadmin users to execute xp_cmdshell. ... EXEC sp_dboption 'MyDatabase', 'db chaining', true ...
    (microsoft.public.sqlserver.security)
  • Re: Need to make Sort ORDER in SP defined by Input variable
    ... If I enter 'ISBN' when I execute the SP below, it executes, ... SET NOCOUNT ON ... DECLARE @SQL nvarchar ... > exec sp_executesql @SQL ...
    (microsoft.public.sqlserver.programming)
  • Re: use of INSERT with Dynamic SQL
    ... > I supose the only way is to use dynamic SQL. ... > Is there a way to execute an INSERT statemente with dynamic SQL? ... > EXEC spInsertMyTable ...
    (microsoft.public.sqlserver.programming)
  • RE: Function writting challange!!
    ... You can not execute sp_executesql from inside a function (may be there is ... back door), but the question here is why a function and not a stored ... > SQL 2000 ... > exec sp_executesql @qq ...
    (microsoft.public.sqlserver.programming)
  • set @sql = Ncreate table #tmp_table(guarid int)
    ... When I execute: ... exec sp_executesql @sql ... if I change the temp table to a global table it runs ...
    (microsoft.public.sqlserver.programming)