Pipeline |
ISOC |
GlastGen |
CrossOverDBs |
Usage |
---|---|---|---|---|
pipelineReadRole |
ISOCReadRole |
GLASTGenReadRole |
ComboReadRole |
used to allow general oracle account(s) READ only access to web database applications |
pipelineReadWriteRole |
ISOCReadWriteRole |
GLASTGenReadWriteRole |
ComboReadWriteRole |
used to allow insert,update,delete statements from web applications |
pipelineDevelopersRole |
ISOCDevelopersRole |
GLASTGenDevelopersRole |
developersRole |
used to allow developers to ** develop applications from their personal oracle account |
Administration of large numbers of objects can be difficult. Roles allow you to localize the administration of objects. Roles are most helpful when large numbers of users will need the same system and object privileges (which we discussed earlier in this chapter).
Think of a role like a database user that nobody uses. You create the role using the create role command. You then grant the role all of the common privileges that users will require to do their work, like the ability to select, insert, update and delete data from various tables.
Once the role is all setup, you only need grant the role to users and all the privileges will be transferred along with that grant. Later, you can add additional privileges to the role if required.
You create a role with the create role command and then grant the role to the user with the grant command as seen in this command:
SQL> Create role select_data_role;
SQL> Grant select on emp, dept, bonus to select_data_role;
You can then grant that role to other users as in this case where we grant the select_data_role to the ROBERT user role. Once this is done, ROBERT will be able to query the EMP, DEPT and BONUS tables in the SCOTT schema:
SQL> GRANT select_data_role TO Robert;
Roles have some limitations. In particular object privilges are granted through roles can not be used when writing PL/SQL code. When writing PL/SQL code, you must have direct grants to the objects in the database that your code is accessing.
If you wish to revoke a role from a user, simply use the revoke command as demonstrated earlier in this chapter:
SQL> REVOKE select_data_role FROM Robert;
excerpt from: Oracle Tips by Burleson Consulting Managing Oracle Roles