title: sql server default procedure permissions
body: <p>I want to know what are the default permissions for sql server stored procedures.
  For example, I created a user in database but no role or no permissions granted except execute permission like:</p>
  
  <pre><code>GRANT EXECUTE ON SCHEMA :: [dbo] TO [newUser]
  </code></pre>
  
  <p>later on me (as a <strong>sa</strong> login) created a stored procedure that makes just a select from a table like:</p>
  
  <pre><code>CREATE PROCEDURE dbo.selectX AS
  BEGIN
   SELECT ID, NAME FROM MyTable
  END
  </code></pre>
  
  <p>and my user [<strong>newUser</strong>] can execute and see the result of select statement like:</p>
  
  <pre><code>EXEC dbo.selectX
  </code></pre>
  
  <p>up until now, I can assume that stored procedures have default permissions that my user don't have.
  I tried other dmls like <strong>UPDATE</strong>, <strong>INSERT</strong>, <strong>DELETE</strong> and user managed to execute procedures successfully.
  But! when I created a proceure with ddl as create table .. such as:</p>
  
  <pre><code>CREATE PROCEDURE dbo.crtNT AS
  BEGIN
  
      CREATE TABLE del(id int) --for test
  END
  </code></pre>
  
  <p>and when the newUser executes this procedure error occurs like:</p>
  
  <pre><code>CREATE TABLE permission denied in database 'MyDb'
  </code></pre>
  
  <p>And here is my question: <strong>By default, do stored procedures have permission with DML(select, insert, update vs.) but not with DDL(create, drop table vs.)</strong>? Because I didn't see any explanation about this situation in Books Online or anywhere else.
  Any comments will be welcomed.</p>