Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SQLS SP3 xp_cmdshell error

30 views
Skip to first unread message

Paul Brown

unread,
Jan 29, 2003, 7:49:43 PM1/29/03
to

Since installing SP3 this error shows up running
xp_cmdshell.

master..xp_cmdshell 'echo hello'

Msg 50001, Level 1, State 50001
xpsql.cpp: Error 87 from GetProxyAccount on line 604


But under sysadmin account it runs with no error.

Paul Brown

unread,
Jan 29, 2003, 7:59:39 PM1/29/03
to
By the way... here's the version info from:
select @@version

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 3)

>.
>

Tony Ting [MS]

unread,
Jan 29, 2003, 8:41:39 PM1/29/03
to
You may not have permission option to use the Proxy Account context to run
xp_cmdshell.
If you really want to allow non sysadmin to do that, you may try to reset
the sqlagent proxy account.
Please refer to Book Online topic "How to reset SQLAgentCmdExec permissions
(Enterprise Manager)" on how to do this.

If you do not want to give everyone permission to use the proxy account in
lieu of their non-sysadmin account, make that one login a member of
sysadmin. Do that with caution though, as this will elevate the user to run
under the security context in which the SQL Server service run.


Thanks,
Tony Ting

This posting is provided "AS IS" with no warranties, and confers no rights.


"Paul Brown" <paul....@endwave.com> wrote in message
news:0baa01c2c7fa$dd833470$8df82ecf@TK2MSFTNGXA02...

Kevin Boske - [MSFT]

unread,
Jan 29, 2003, 8:03:29 PM1/29/03
to
This error usually indicates that you are not running the SQL Server Service
from a Windows Administrator account. Check the permissions on the service
login.

--
Kevin Boske
SQL Server CE Team
Microsoft
----------------------------------------------------------------------------
----------------------------------------
Everything you need to know about SQL Server CE:

http://www.microsoft.com/sql/ce/techinfo/default.asp
----------------------------------------------------------------------------
----------------------------------------


This posting is provided "AS IS" with no warranties, and confers no rights.

Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
----------------------------------------------------------------------------
----------------------------------------

"Paul Brown" <paul....@endwave.com> wrote in message

news:0b1c01c2c7f9$7a8536d0$8af82ecf@TK2MSFTNGXA03...

SQL Server Development Team [MSFT]

unread,
Jan 29, 2003, 8:42:36 PM1/29/03
to
By default, only members of the sysadmin fixed server role can execute this
extended stored procedure. You may, however, grant other users permission to
execute this stored procedure. You can find more information about
xp_cmdshell at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_
xp_aa-sz_4jxo.asp

Hope this helps.

Thanks,
Rama Raman
--
SQL Server Development Team


This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.

"Paul Brown" <paul....@endwave.com> wrote in message

news:0baa01c2c7fa$dd833470$8df82ecf@TK2MSFTNGXA02...

Paul Brown

unread,
Jan 30, 2003, 2:12:03 PM1/30/03
to
Tony Ting Wrote:
You may not have permission option to use the Proxy
Account context to run xp_cmdshell.

Paul Brown writes:
I had sa reset SQLAgentCmdExec permissions and enter my
account info as you suggested. Now I can use xp_cmdshell
again.

Notes in retrospect:
We never did this before installing SP3. Instead, in the
past I used xp_sqlagent_proxy_account and 'SET' the proxy
account to my own account information. After SP3 this
operation still succeeded, but I could no longer use
xp_cmdshell. Things are back to normal now.

Thanks for your help.
- Paul -

Gert E.R. Drapers

unread,
Jan 31, 2003, 11:11:30 AM1/31/03
to
Make sure that the proxy account is there and can be used

The flag for usage should be set in the Registry, execute the following SQL
Agent SP

exec msdb.dbo.sp_get_sqlagent_properties
-- sysadmin_only == 0

If you want to use the proxy account it should be 0

Then check if you actually have a proxy account defined using:

exec master.dbo.xp_sqlagent_proxy_account N'GET'

This should return the user and domain name of the proxy account


Ge...@SQLDev.Net
Please reply only to the newsgroups.


This posting is provided "AS IS" with no warranties, and confers no rights.

You assume all risk for your use.
Copyright © SQLDev.Net 1991-2003 All rights reserved.

"Kevin Boske - [MSFT]" <kbo...@online.microsoft.com> wrote in message
news:ehl2fCAyCHA.2584@TK2MSFTNGP11...

0 new messages