create role db_exector;
grant exec,view definition to db_exector;
GRANT SELECT, INSERT, UPDATE on SCHEMA::dbo to db_exector
EXEC sp_addrolemember 'db_exector', 'loginuser'
create role db_readonly;
grant exec,view definition to db_readonly;
GRANT SELECT on SCHEMA::dbo to db_readonly
EXEC sp_addrolemember 'db_readonly', 'loginuser'