Synonyms and Roles

Synonyms

For objects, you can create an alternative name - synonyms:

CREATE SYNONYM synonym name
FOR [owner.] Objectname;

Synonyms are removed with DROP SYNONYM:

DROP [PUBLIC] SYNONYM synonym_name;

Roles

The role is a set of permissions that can be granted to database users. The role may include both system privileges and object. With roles easier to administer the database. If, for example, for managers is defined role OFFICERS, and you want to give all managers a privilege just add them to the role of the steering wheel.

Creating a role

The role is created with CREATE ROLE:

CREATE ROLE role

[IDENTIFIED BY password];

IDENTIFIED BY clause to specify the password with which you identify with the role.

Defining the role

Manage permissions for a role GRANT and REVOKE commands, as we have done for you. Any change in the role of the powers once the effect of altering the rights of people who have the role given.

Delete a role

To delete a role, use the command DROP ROLE:

DROP ROLE role;

No comments: