1

I'm attempting to create a role in Azure SQL such that the user can perform Select operations, view all schema (but not modify schema) but not perform any writes or execute stored procs. Granting a user Select permission gets me close. However, the user cannot see any stored procs or scalar functions.

So, I want to allow the user to see all schema definitions, not modify any schema objects and perform Selects. Is this possible?

  • I'm not 100% sure about AzureDB, but on local installs, granting VIEW ANY DEFINITION securable will allow them to view the definitions of SPs and views. – Kris Gruttemeyer Aug 25 '17 at 17:51
  • @KrisGruttemeyer - This gets me close enough. If you want to create this as an answer, I'll accept it. – Randy Minder Aug 25 '17 at 17:56
2

Assign the VIEW ANY DEFINITION securable to the user.

That will allow them to see SP and view definitions but not allow them to change it.

https://technet.microsoft.com/en-us/library/ms175808(v=sql.105).aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.