snippetMinor
How To Grant View Definition of Object in SQL Azure
Viewed 0 times
definitionsqlgrantviewazurehowobject
Problem
The tsql syntax throws an error about "view" in SQL Azure, but functions on SQL Server:
Can access be granted in SQL Azure to view the definition of an object outside of db_owner?
GRANT VIEW ON OBJECT dbo::foo TO [bar]Can access be granted in SQL Azure to view the definition of an object outside of db_owner?
Solution
Your syntax is incorrect. It should be
Example
GRANT VIEW DEFINITION ON TO Example
GRANT VIEW DEFINITION ON SCHEMA::dbo TO [bar]
GRANT VIEW DEFINITION ON OBJECT::dbo.MyView TO [barRole]Code Snippets
GRANT VIEW DEFINITION ON <object/schema> TO <user/role>GRANT VIEW DEFINITION ON SCHEMA::dbo TO [bar]
GRANT VIEW DEFINITION ON OBJECT::dbo.MyView TO [barRole]Context
StackExchange Database Administrators Q#244867, answer score: 4
Revisions (0)
No revisions yet.