What permissions do I need?

Leave a comment

March 16, 2016 by Kenneth Fisher

Ever wondered how to tell what permissions are required to run a statement or perform a task? Well, sometimes it can be a little confusing to be honest. Most of the time though it’s all there in front of you in black and white.

Where you might ask? Books on line! I’ve talked before about the importance of being familiar with BOL, and here we are again. The pages about commands, and system objects (views, functions, stored procedures etc) are broken into multiple different sections.

  1. Syntax – Where appropriate the format of the command or parameters of the stored procedure/function.
  2. Arguments – A detailed description of the different pieces of the command.
  3. Columns – Where appropriate the columns of the output.
  4. Remarks – Various information. Discussions about related tasks etc. For example the Remarks section of CREATE TABLES has information on constraints, partitioned tables, foreign keys etc.
  5. Permissions – Ding! Ding! Ding! The permissions required for a command!
  6. Examples – Examples of different applications of the command.

 
Down near the bottom of the majority of these pages is a Permissions section. This section will tell you what permissions are required to perform the command/task. Sometimes you’ll find additional permissions information in other sections. For example if there are permissions implications of the command itself. The EXECUTE AS page is mostly about permissions, for obvious reasons.

So if you need to figure out what permissions are needed, step one is to find the Books on Line page for the command or object. Then look at the Permissions section and if needed skim the rest the page. This isn’t always going to get your answer, but it will the vast majority of the time.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 3,753 other subscribers

Follow me on Twitter

ToadWorld Pro of the Month November 2013
%d bloggers like this: