After creating roles and granting privileges to them, I want to grant the privileges of a specified role to a user, how to do with it? I tried grant to , but failed.
EXEC sp_addrolemember 'db_owner', 'JohnJacobs'
Because BOL shows sp_addrolemember has been deprecated, if you are using SQL Server 2012 you may want to use:
ALTER ROLE <role_name> ADD MEMBER <user_name>