Management of Oracle 9i roles

Source: Internet
Author: User
Tags dba interface modify connect sqlplus
Oracle 9i Predefined roles

Table 8.2 Oracle 9i Predefined roles
Role name Description
CONNECT Database connection role, used to connect to a database, with the right to create clusters, database links, sequences, synonyms, tables, and views, and modify sessions
Dba The database administrator role, with all system permissions created with the admin option, you can grant system permissions to other users or roles
Delete_catalog_role Delete a directory role to delete or reconstruct a data dictionary
Execute_catalog_role Performs directory roles and can execute all system packs
Exp_full_database Ability to use an exporter to perform a full and incremental export of a database
Imp_full_database Ability to use an importer to perform a full import of a database
RESOURCE You can create clusters, tables, sequences, and pl/sql programmatic objects, including procedures, packages, triggers, and so on
Select_catalog_role Query a data dictionary table or view

To create a role in Enterprise Manager

(1) as shown in Figure 8.16.

(2) The General Information tab of the Create role appears as shown in Figure 8.17.
(3) Figure 8.18 shows the Roles tab for creating roles. Used to assign child roles to multiple roles.

(4) Figure 8.19 shows the System Permissions tab for creating roles.
(5) as shown in Figure 8.20, the Object Permissions tab of the Create role.

(6) Figure 8.21 shows the "Consumer groups" tab of the Create role.
(7) When the role is successfully created, the interface shown in Figure 8.22 appears.

(8) The SQL code for the above process to create the role is as follows.
―――――――――――――――――――――――――――――――――――――
CREATE role "Temprole"
Identified by "Temprole";
GRANT ALTER any of INDEX to "Temprole" with ADMIN OPTION;
GRANT SELECT any TABLE to "Temprole" with ADMIN OPTION;
GRANT "CONNECT" to "Temprole" with ADMIN OPTION;
GRANT "DBA" to "Temprole" with ADMIN OPTION;
BEGIN
Dbms_resource_manager_privs.grant_switch_consumer_group (
Grantee_name => ' Temprole ',
Consumer_group => ' Default_consumer_group ',
Grant_option => FALSE
);
End;
―――――――――――――――――――――――――――――――――――――
"See CD-ROM File": 8th Chapter \createrole.sql.

To create a role in "Sqlplus Worksheet"

(1) Executing the Createrole.sql file directly in "Sqlplus Worksheet" will complete the creation of the role, as shown in Figure 8.23.
(2) indicates that the role Temprole has been successfully created.


Changes to Roles

(1) as shown in Figure 8.24.

(2) in the various tabs that appear, you can modify the various configuration parameters of the role, and the SQL statement of the corresponding roles is "ALTER role" or "REVOKE".
Example 1: The SQL code that changes the role's authentication mode to "external" is as follows.
―――――――――――――――――――――――――――――――――――――
ALTER role "temprole" identified externally;
―――――――――――――――――――――――――――――――――――――
"See CD-ROM File": 8th Chapter \alterrole.sql.
Example 2: The SQL code that deletes the system permission "DBA" for the role is as follows.
―――――――――――――――――――――――――――――――――――――
REVOKE "DBA" from "Temprole";
―――――――――――――――――――――――――――――――――――――
"See CD-ROM File": 8th Chapter \revokerole.sql.

Deletion of roles

(1) The "Role deletion confirmation" interface as shown in Figure 8.25.

(2) The corresponding SQL code for the above process is as follows.
―――――――――――――――――――――――――――――――――――――
DROP role Temprole;
―――――――――――――――――――――――――――――――――――――
"See CD-ROM File": 8th Chapter \droprole.sql.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.