title: Enable 'xp_cmdshell' SQL Server
body: <p>I want to execute <code>EXEC master..xp_cmdshell @bcpquery</code> </p>
  
  <p>But I am getting the following error:</p>
  
  <blockquote>
    <p>SQL Server blocked access to procedure 'sys.xp_cmdshell' of component 'xp_cmdshell' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'xp_cmdshell' by using sp_configure. For more information about enabling 'xp_cmdshell', see "Surface Area Configuration" in SQL Server Books Online.</p>
  </blockquote>
  
  <p>Is there any way to activate this, or execute something before enabling the feature? </p>
  
  <p>How to solve it?</p>