title: The EXECUTE permission is denied on the user-defined table types?
body: <p>I have a question about <a href="http://msdn.microsoft.com/en-us/library/bb522526.aspx">User-Defined Table Types</a> in SQL Server 2008.</p>
  
  <p>For the need of one of the ASP.NET application we defined our own table-types on SQL Server 2008 to use them  as parameters in the stored procedures (when executing sql command in ASP.NET application we pass DataTable object as parameter for stored procedure <a href="http://www.codeproject.com/KB/database/sqlserver2008.aspx">see here for an example</a>)</p>
  
  <p>The problem is that when we run Sql command (execute stored procedure) from ASP.NET we get an error:</p>
  
  <blockquote>
    <p>The EXECUTE permission was denied on the object 'ourTableType',
    database 'ourDatabase', schema 'ourSchema'.</p>
  </blockquote>
  
  <p>Why is that so? Why do we need to set permission on user-defined table types? Why is not enough to have permission set just on stored procedure that uses it? And if we have to set it no matter what, why there is no <code>EXECUTE</code> permission type to set in properties window whatsoever (I can see only <code>Control</code>, <code>References</code>, <code>Take Ownership</code>, <code>View Definition</code>)?</p>
  
  <p>What I also don't understand is that setting permission to <code>Control</code> in properties window solves the problem and the stored procedure runs without problems.</p>