SQL Server blocking Component xp_cmdshell

Source: Internet
Author: User
Tags sql server books

Error message Description

Msg 15281, Level 16, State 1, procedure xp_cmdshell, line 1th
SQL Server blocked access to the process ' Sys.xp_cmdshell ' of component ' xp_cmdshell ' because this component was shut down as part of this server's security configuration. System administrators can enable ' xp_cmdshell ' by using sp_configure. For more information about enabling ' xp_cmdshell ', see "surface area Configurator" in SQL Server Books Online.

Component xp_cmdshell Introduction

xp_cmdshell allows the system administrator to execute a given command string as an operating system command-line interpreter and return any output as a text line, which is a very powerful extended storage process. In general, xp_cmdshell is also unnecessary for administrators, and the removal of xp_cmdshell does not have any impact on the server.

Workaround:

1. Open With SQL statement

Through Query Analyzer, select the master database and execute the following SQL content:

' Show advanced Options ',1reconfigurego'xp_cmdshell',1  reconfigurego

Results after execution:

Configuration options ' show advanced options ' has changed from 0 to 1. Please run the RECONFIGURE statement to install.
Configuration option ' xp_cmdshell ' has changed from 0 to 1. Please run the RECONFIGURE statement to install.

Note: If you need to close just "sp_configure ' xp_cmdshell ', 1" to "sp_configure ' xp_cmdshell ', 0" can be.

2.SQL SERVER "surface area Configurator" turned on

SQL SERVER 2005

SQL SERVER 2008

On the server node, right-click, select Facets, and you can see a lot of settings, one of which is the surface area Configurator

SQL Server blocking Component xp_cmdshell

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.