title: Enable xp_cmdshell does not work
body: <p>I try to enable <code>xp_cmdshell</code> in SQL Server. So I ran:</p>
  
  <pre><code>EXEC master.dbo.sp_configure 'show advanced options', 1
  RECONFIGURE
  EXEC master.dbo.sp_configure 'xp_cmdshell', 1
  RECONFIGURE 
  </code></pre>
  
  <p>The returned message says:</p>
  
  <blockquote>
    <p>Configuration option 'show advanced options' changed from 1 to 1. Run the RECONFIGURE statement to install.</p>
    
    <p>Configuration option 'xp_cmdshell' changed from 0 to 1. Run the RECONFIGURE statement to install.</p>
  </blockquote>
  
  <p>The facet properties shows "XPCmdShellEnabled"</p>
  
  <p>However, when I execute </p>
  
  <pre><code>EXEC master..xp_cmdshell 'dir c:'
  </code></pre>
  
  <p>I got the error message </p>
  
  <blockquote>
    <p>Msg 15281, Level 16, State 1, Procedure xp_cmdshell, Line 1<br>
    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>What I did is from Microsoft documentation. Why does it not work?</p>