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?

2
  • 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. Aug 25, 2017 at 17:51
  • @KrisGruttemeyer - This gets me close enough. If you want to create this as an answer, I'll accept it. Aug 25, 2017 at 17:56

1 Answer 1

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 and acknowledge that you have read and understand our privacy policy and code of conduct.

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