Roles Node

This section covers the following topics:

About Roles

A role is a set of privileges that you can grant to users or to other roles.

Users (generally administrators) create roles to group together privileges or other roles. Roles provide a means to facilitate the granting of multiple privileges or roles to users.

There are two types of roles: predefined roles and user-defined roles.

Roles are not part of any schema: Therefore, a user who creates a role can be dropped with no effect on the role.

When you are logged into Server Explorer, in schema view, as SYSDBA, you view all roles in the database. If you are a non-SYSDBA user, or a SYSDBA user viewing Server Explorer in object view, you view the roles that are assigned to you.

See Also

Object View and Schema View

How Roles Work

To perform actions on the Roles node: right-click this node and from the menu choose the appropriate command. To view the node's properties, select the node and/or click Properties in the node's menu.

If this collection node is filtered, the icon changes to include a funnel symbol. For more information about filtering, see Filtering Collection Nodes.

Menu Options

Menu Option Description

New Role

Launches the designer to create a new role.

Query Window

Opens the query window for the connection.

Generate Create Script

Writes the role definitions to a .sql file..

Generate Create Script to Project

Generates the role definitions to a .sql file and adds the .sql file to an open Oracle Database Project.

If multiple objects in Server Explorer are selected, a master SQL script is created in the Oracle Database Project Scripts folder. This master script contains calls to individual child SQL scripts (one for each schema object) generated into the various schema object folders and this master script is ordered with dependencies taken into consideration.

If there are multiple open Oracle Database projects, Visual Studio prompts you to select the project to add the script to.

This operation can also be performed by dragging and dropping the Server Explorer node(s) directly onto a database project folder.

See Managing Oracle Script Files for more information.

Note: Oracle Database Project Version 2 projects are not supported. To add scripts to this project type, use Import Schema or Add Existing Item menu items on an Oracle Database Project Version 2 project folder, or use the Schema Compare tool.

Filters

Opens the Filters Tab to control which child nodes appear under the collection.

Privileges

Opens the privileges dialog.

Refresh

Refreshes the Roles node.

Properties

Displays the Properties window.