I want to create a stored proc in SQL Server 2008 to create database roles and grant permissions to them, that takes one parameter, an nvarchar
that represents a role name that is to be created, but im not sure how to write this.
I am able to create the role with this
EXEC sp_addrole @RoleName
but when I try to grant permissions to the role with this
Grant select on dbo.someTable to @RoleName
it won't accept the @RoleName, how do I go about doing this?
thanks