SQL Server 2012 User Defined Server Roles

Hi Friends,

Today, I want to focus on a very helpful feature SQL Server 2012 User Defined Server Roles (Denali).

In SQL Server 2005 and SQL Server 2008, there are only nine fixed server roles to grant the permissions. These nine fixed server roles are shown below in figure:


Now with SQL Server 2012 we can create user defined Server Roles using TSQL as well as SSMS.

Creating Server role using TSQL:

Here for testing purpose, I am creating a new role TestRole and granting Trace Event Notification permission.

USE [master]

Here, I have already created a login SQLGEEK. Now I am just adding this login as a member to newly created server role:


Creating Server role using SSMS:

1- Open the SQL Server instance in SSMS.

2- Expand the object explorer.

3- Expand the security node.

4- Now Right Click on Server Roles under security node and click on properties


5- This will open new server role window. Here on general page fill all the details like role name, check on servers option under securable and assign permissions under explicit.


6- Now go to Members page on this window and add the login under this Server Role. Here, I have already created a new login SQLGEEK. So, I am just adding this login:


7- If you want to assign any existing server Role Membership for this user defined  server role, then go to Memberships page and select the existing server role.


8- Click OK.



Prince Rastogi

Like us on FaceBook Follow us on Twitter | Join the fastest growing SQL Server group on FaceBook

Follow me on TwitterFollow me on FaceBook

Data Platform Virtual Summit 2020

Subscribe to SQLServerGeeks YouTube channel. If you want more learning content in your inbox, subscribe to SQLServerGeeks Bulletin.

SQLServerGeeks YouTube | SQLServerGeeks Bulletin | SQLServerGeeks Twitter


About Prince Rastogi

Prince Rastogi is working as Database Administrator at Elephant Insurance, Richmond. He is having more than 8 years of experience and worked in ERP Domain, Wealth Management Domain. Currently he is working in Insurance domain. In the starting of his career he was working on SQL Server, Internet Information Server and Visual Source Safe. He is post graduate in Computer Science. Prince is ITIL certified professional. Prince likes to explore technical things for Database World and Writing Blogs. He is Technical Editor and Blogger at SQLServerGeeks.com. He is a regular speaker at DataPlatformDay events in Delhi NCR. He has also presented some in depth sessions about SQL Server in SQL Server Conferences in Bangalore.

View all posts by Prince Rastogi →

Leave a Reply

Your email address will not be published. Required fields are marked *