— these commands execute against a single database…
— …not a whole server\instance
USE MyDatabase
GO

–create a role that will have one permission (execute) granted
CREATE ROLE db_exec
GO

–grant execute permissions to our newly created role
GRANT EXECUTE TO db_exec
GO

–add a single user (MySqlUser) to the role
EXEC sp_addrolemember ‘db_exec’, ‘MySqlUser’
GO

Advertisements