Hi James, Thanks for your contribution. Unfortunately this script cannot script out explicit permissions like ALTER/EXECUTE/VIEW DEFINITION, etc on db level.
Example: GRANT ALTER TO [user_name@mydomain.com] or GRANT EXECUTE TO [user_name@mydomain.com]
Can you help modifying the script.
Thanks!