Previous Topic: Define SQL Server Application RolesNext Topic: Define SQL Server Logins


Define SQL Server Database Roles

A role uses Windows security accounts to limit the scope of access and permissions when users access the database. A database role specifies a set of database level permissions that let a user perform specific tasks. Database roles are not fixed and can be created, modified, and removed. Database roles let you collect users into a single unit to which you can apply permissions. You can define a set of roles based on job functions and assign each role the permissions that apply to that job.

Use the SQL Server Database Role Editor to define database role objects in a SQL Server 2008, 2012, 2014 or 2016 physical model.

To define SQL Server database roles

  1. Click Target - SQL Server, Principals, Database Roles on the Model menu.

    The SQL Server Database Role Editor opens.

  2. Select the database role in the Navigation Grid that you want to define and work with the following options:

    Note: Click New New icon in property editors to create a new object on the toolbar to create a new database role. Use the Enter filter text box to filter a very large list of database roles to quickly locate the one that you want to define.

    Name

    Displays the database role name. You can change the database role name in this field.

    Authorization

    Specifies the authorization level for the database role. Select an authorization from the drop-down list.

    Generate

    Generates SQL during forward engineering. Clear the check box if you do not want to generate SQL.

  3. Click the Roles tab to select or remove role usage.
  4. Click the Permission tab and work with the following options:

    Note: Use the options on the toolbar to create a new permission, delete a selected permission, or open the SQL Server Permission Editor to manage permission properties.

    Name

    Displays the permission name. Change the name of the permission in this field.

    Type

    Specifies the permission type. Select the option from the drop-down list.

    Cascade

    Specifies the cascade action for the permission. Indicates that the permission revoked is also revoked from other principals to which it has been granted by this principal.

    With Grant

    Specifies if the user can grant this permission to other users or not.

    Grant As Principal

    Specifies the principal used to acquire the permissions. Select a principal from the drop-down list.

  5. (Optional) Click the Comment tab and enter any comments that you want to associate with the object.
  6. (Optional) Click the UDP tab to work with user-defined properties for the object.
  7. (Optional) Click the Notes tab to view and edit user notes.
  8. Click Close.

    The database role is defined and the SQL Server Database Role Editor closes.

More information:

Define Permissions for an Object in a SQL Server Property Editor

Work With Roles in a Property Editor

Add a Comment in a Property Editor

Add a UDP in a SQL Server Physical Property Editor