"Error description":
SQL Server blocked access to the process ' Sys.xp_cmdshell ' of the component ' xp_cmdshell '. Because this component has been shut down as part of this service's security configuration. System administrators can enable ' xp_cmdshell ' by using sp_configure. For more information about enabling ' xp_cmdshell ', see the SQL Help file.
"Cause analysis":
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. [This method is recommended because it is available in any version of SQL Server.] ]
Through Query Analyzer, select the master database and execute the following SQL content:
' Show advanced Options ',1reconfigurego'xp_cmdshell',1 reconfigurego
Execution Result:
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.
To close, simply change "sp_configure ' xp_cmdshell ', 1" to "sp_configure ' xp_cmdshell ', 0".
If you see this text, you are using RSS to read or turn to "a Tree-blog park," The original address: http://www.cnblogs.com/atree/p/SQL_SERVER_xp_cmdshell.html
2. Open with SQL Server Surface area configurator. [If it's difficult to write code, use this method.] ]
Locate the start-to-SQL installation directory--Configure the SQL Server Managerment surface Area configuration.
After opening. Locate and tap the feature's surface area configurator.
Click on the bottom xp_cmdshell in the window that opens and click Enable on the right.
After opening, find "xp_cmdshell" click Enable. With the tablets from SQL SERVER 2005, other versions of the SQL interface may be different, please look for them according to your own version.