Create Grant Statement for All Custom Views in Microsoft SQL

Microsoft SQL ServerOn a recent project, I needed to create a new database role for some new SQL views which had been created.

Creating the role is easy enough, but to make sure all the relevant views (and there were quite a few) looked like a bigger job until I realised I could select from sys.views and generate the grant script at the same time.

In the below script, the first highlighted section is the database…

Continue Reading azurecurve’s Article on their blog

Create Grant Statement for All Custom Views in Microsoft SQL

On a recent project, I needed to create a new database role for some new SQL views which had been created. Creating the role is easy enough, but to make sure all the relevant views (and there were quite a few) looked like a bigger job until I realised I could select from and generate the grant script at the same time.

Blog Syndicated with azurecurve’s Permission

Author: Ian Grieve

Share This Post On