title: Intellisense and context help for sys stored procedures - bugs or by design?
body: <p>SQL Server 2008 R2  Dev</p>
  
  <p>Execution in SSMS of:<br>
  1)  </p>
  
  <blockquote>
    <p>use AdventureWorksDW;<br>
        GO;<br>
        sp_cdc_enable_table<br>
          'dbo', 
          'FactInternetSales',<br>
           @role_name=NULL,<br>
           @supports_net_changes=0</p>
  </blockquote>
  
  <p>succeeds.  </p>
  
  <p><strike>Why does execution of<br>
   2)  </p>
  
  <blockquote>
    <p>sp_cdc_enable_table 'dbo', 'FactInternetSales' --, @role_name=NULL, @supports_net_changes=0  </p>
  </blockquote>
  
  <p>gives error:  </p>
  
  <blockquote>
    <p>Msg 201, Level 16, State 4, Procedure sp_cdc_enable_table, Line 0
    Procedure or function 'sp_cdc_enable_table' expects parameter '@role_name', which was not supplied.</p>
  </blockquote>
  
  <p>while </strike> Intellisense popup on (having mouse cursor on) sp_cdc_enable_table in SSMS shows:  </p>
  
  <blockquote>
    <p>stored procedure AdventureWorksDW.sys.sp_cdc_enable_table<br>
       @source_schema sysname,<br>
       @source_name sysname,<br>
       <strong>@capture_instance sysname = null,</strong><br>
       @supports_net_changes <strong>bit = null</strong>,<br>
       @role_name sysname,<br>
       @index_name sysname =null,<br>
       [continuation truncated by vgv8]
    <img src="https://i.stack.imgur.com/85dk1.jpg" alt="alt text"></p>
  </blockquote>
  
  <p>Does not " = null" imply default value which is used if parameter is omitted?<br>
  Why does not ommission of @index_name sysname give the error?   </p>
  
  <p>Collateral questions:<br>
  How can I copy the text of popup description into buffer (for further pasting)?<br>
  Is not "@role_name bit = null" in popup an error (and should have been "@role_name bit = 0, " instead)?   </p>
  
  <p>Update:<br>
  I corrected the typo in post.<br>
  Really I executed</p>
  
  <blockquote>
    <p>sp_cdc_enable_table 'dbo', 'FactInternetSales'--, @role_name=NULL, @supports_net_changes=0  </p>
  </blockquote>
  
  <p>i.e. both variants are execution of the same script<br>
  1) uncommented<br>
  2) with comments</p>
  
  <p><strong>Update3:</strong><br>
  OK, initially I typed incorrectly the text of popup which I corrected now. 
  So, the question about error is removed, thanks.   </p>
  
  <p>From the context of my successful execution of 1) you are supposed to notice that my questions are about popup (but not how to succeed):  </p>
  
  <ul>
  <li>whether the popup is (in)correct?     
  
  <ul>
  <li>"<strong>@capture_instance sysname = null,</strong> should not it be enclosed in brackets [  ] showing that it can be ommitted?  </li>
  <li>"@supports_net_changes <strong>bit = null</strong>," - should not it be "= 0"?   </li>
  </ul></li>
  <li>how to copy popup (for example, for reporting a bug in Microsoft Connect)?  </li>
  </ul>
  
  <p>Notice that popup also has "@capture_instance = null," which can be completely ommitted but it is not marked this in any way.  </p>
  
  <p><strong>Update4:</strong><br>
  I included the screenshot.<br>
  Well, it is rather context sensitive help.<br>
  Intellisense does not work at all on sys.sp_* and  popup is not shown if there is a syntax error - whatever MS pretended to accomplish by such "help" since it is necessary to insert full correct statement in order to escape syntax errors and have context sensitive "help"...  </p>
  
  <p>Update5:<br>
  Then, what is the sense that parameters with default values cannot be dropped?   </p>