Solved

xp_cmdshell

Posted on 2006-11-08
3
5,647 Views
Last Modified: 2012-11-06
I wanted to run the xp_cmdshell  command and the SQL user id that run this command is not a sys_admin, so as per the micrsoft site. I executed  'sp_xp_cmdshell_proxy_account' sp with a userid and password. I still get the error as below:

Msg 229, Level 14, State 5, Procedure xp_cmdshell, Line 1
EXECUTE permission denied on object 'xp_cmdshell', database 'mssqlsystemresource', schema 'sys'.


for the 'sp_xp_cmdshell_proxy_account'  ps I have tried with a local account in the DB Sever, a network account still the xp_cmdshell is not working.

0
Comment
Question by:Viggee
3 Comments
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
ID: 17903769
xp_CmdShell Requires CONTROL SERVER permission even after it has been enabled through the Surface Area Config tool.
So you can either grant the login(s) in question CONTROL SERVER permissions:

GRANT CONTROL SERVER TO MyLogin;

or alter the permissions of the sys.xp_cmdshell proc:

USE master;
GRANT EXECUTE ON sys.xp_cmdshell TO MyUser;
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question