Xp_Cmdshell
- Spawns a Windows command shell and passes in a string for execution.
The Windows process spawned by xp_cmdshell has the same security rights as the SQL Server service account.xp_cmdshell operates synchronously. Control is not returned to the caller until the command-shell command is completed.xp_cmdshell can be enabled and disabled by using the Policy-Based Management or by executing sp_configureTo check whether xp_cmdshell is disabled or not. Run the following Query.SELECT CONVERT(INT, ISNULL(value, value_in_use)) AS config_value
FROM sys.configurations
WHERE name = 'xp_cmdshell' ;
To enable the xp_cmdshell, you can refer the following msdn doc.
Reference : http://technet.microsoft.com/en-us/library/ms175046(v=sql.105).aspx
http://technet.microsoft.com/en-us/library/ms190693(v=sql.105).aspx