Hi all,
I have given task to write the stored procedure with following requirments.

Please create the a role on each database in SQL Server RPDPRD02 and grant
it select, update, delete, insert and execute on all objects in each
database including the following specific extended stored procedure:
xp_sendmail.

Name the role SeniorDev. Then create a role with the same permissions
named JrDev. The JrDev role should not have the ability to delete or
update or insert. Thanks.

Please create a script to accomplish this and name it sp_MassSecurity. It
should accept 2 parameters: rolename and security level. Role name should
just be the name of the role to grant permissions to and security level
should be either Senior or Jr.

any reply is highly appriciated.