I want to add new custom SQL Server Role and assign the new users to these appropriate roles respectively. I try to find how to create role, but I could not find the place to add that. Could you please guide me how to achieve my requirement?
In Object Explorer, expand the server where you want to create the new server role. Expand the Security folder. Right-click the Server Roles folder and select New Server Role.... In the New Server Role -server_role_name dialog box, on the General page, enter a name for the new server role in the Server role name box.
Use the CREATE ROLE statement to create a role, which is a set of privileges that can be granted to users or to other roles. You can use roles to administer database privileges. You can add privileges to a role and then grant the role to a user.
In the Login screen from the menu on the left, select Select a Page > Server Roles. Select dbcreator and click OK.
Right-click the role you want to edit and select Properties. In the Server Role Properties -server_role_name dialog box, on the Members page, click Add. In the Select Server Login or Role dialog box, under Enter the object names to select (examples), enter the login or server role to add to this server role.
You cannot do this in the 2008 version just yet - this is a new feature that you'll get with SQL Server 2011 (a.k.a. "Denali") sometime in 2011/2012.
See some resources:
You'd simply GRANT the rights you want to a login rather than a role pre SQL Server 2011. Not ideal of course but it works.
We use this to enable app teams to see what is going on without hassling the DBAs.
For example,
CREATE LOGIN [MyDOmain\FolkITrustGroup] FROM WINDOWS;
GO
GRANT VIEW SERVER STATE TO [MyDOmain\FolkITrustGroup]
GRANT VIEW ANY DEFINITION TO [MyDOmain\FolkITrustGroup]
GO
Edit: This achieves your requirement without using server roles which don't exist yet...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With