Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

xp_cmdshell

Posted on 2006-11-08
3
Medium Priority
?
5,656 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 2000 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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

598 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