Solved

xp_cmdshell

Posted on 2006-11-08
3
5,640 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
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…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now