1

The tsql syntax throws an error about "view" in SQL Azure, but functions on SQL Server:

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?

1

Your syntax is incorrect. It should be

GRANT VIEW DEFINITION ON <object/schema> TO <user/role>

Example

GRANT VIEW DEFINITION ON SCHEMA::dbo TO [bar]

GRANT VIEW DEFINITION ON OBJECT::dbo.MyView TO [barRole]

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.