Creating database roles

Use the Data Object editor to create roles.
Before you create and modify database roles, you must create a connection to a database in the Data Source Explorer.

To create a database role:

  1. Expand a database connection object in the Data Source Explorer.
  2. Browse to the Roles folder.
  3. Right-click the Roles folder, and select Create. The Data Object editor opens.
  4. Modify the privileges for the new role in the Data Object Properties section of the editor.
  5. Expand the DDL section of the editor, and click Preview DDL .

    If you make additional changes in the Data Object Properties or Impacted Objects sections, click Preview DDL again to refresh the generated script.

    You cannot type directly in the DDL section of the editor. If you want to modify the generated DDL script, you can click Open with SQL editor to open the script in the SQL editor, where you can make changes and save the script to an existing data project. You can also use this option to save your changes to an SQL script that you can run later.

  6. After you are satisfied with the generated DDL script, click Run DDL in the Data Object Management section.
The generated DDL script is run on the database, and the new role is displayed in the Data Source Explorer in the Roles folder. The Data Output view displays the results, including any errors that occurred.

Feedback