A single catalog query can list every grant, deny, and role membership in a database, and the result is the starting point for an access review. The script below returns one flat result set that covers permissions granted directly to a user, permissions a user holds through a database role, and permissions granted to …
Read MoreSQL Server Object Permissions: Generate GRANT Statements
Giving an application role read, write and execute rights on a database usually means one GRANT per table per permission plus one per stored procedure, which runs to hundreds of statements on a mid-sized schema. The script below writes those statements for you from sys.objects, schema-qualified and bracket-quoted, so …
Read More