Oracle 9i role management

Source: Internet
Author: User
Http://www.ddvip.net/database/oracle/index/56.htm

Oracle 9i role management
  Author: unknown author: Finishing Source: ddvip.net updated: 2004.09.09 contributed mailbox: tg * ddvip.com


Oracle 9i predefined roles

Table 8.2 Oracle 9i predefined roles

Role name Description
Connect Database connection role, used to connect to the database, with the right to create clusters, database links, sequences, synonyms, tables and views, and modify sessions
DBA The database administrator role has all system permissions created using the admin option. You can grant system permissions to other users or roles.
Delete_catalog_role Deletes a directory role. You can delete or recreate a data dictionary.
Execute_catalog_role Execute directory role to execute all system packages
Exp_full_database Ability to use exportProgramPerform full and incremental export of the database
Imp_full_database Ability to use the import program to execute full Database Import
Resource You can create clusters, tables, sequences, and PL/SQL programming program objects, including processes, packages, and triggers.
Select_catalog_role Query a data dictionary table or view

Create a role in Enterprise Manager

(1) 8.16.


(2) The general information tab for creating a role appears, as shown in Figure 8.17.

(3) Figure 8.18 shows the role creation tab. It is used to assign subroles to multiple roles.


(4) Figure 8.19 shows the system permissions tab for creating a role.

(5) 8.20 shows the object permission tab for creating a role.


(6) Figure 8.21 shows the user group tab for creating a role.

(7) after the role is successfully created, the page shown in Figure 8.22 is displayed.


(8) The SQL code for creating a role in the above process is as follows.

―――――――――――――――――――――――――――――――――――――

Create role "temprole"

Identified by "temprole ";

Grant alter any 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 the CD file]: Chapter 8th \ createrole. SQL.

Create a role in sqlplus Worksheet

(1) directly execute the createrole. SQL file in [sqlplus worksheet] to create the role, as shown in result 8.23.

(2) The role temprole is successfully created.

Role Modification

(1) 8.24.


(2) On the tabs that appear, you can modify the configuration parameters of the role. The SQL statement for modifying the role is "alter role" or "revoke ".

Instance 1: change the role authentication method to "external" SQLCodeAs follows.

―――――――――――――――――――――――――――――――――――――

Alter role "temprole" identified externally;

―――――――――――――――――――――――――――――――――――――

[See the CD file]: Chapter 8th \ alterrole. SQL.

Example 2: the SQL code used to delete the role's system permission "dba" is as follows.

―――――――――――――――――――――――――――――――――――――

Revoke "dba" from "temprole ";

―――――――――――――――――――――――――――――――――――――

[See the CD file]: Chapter 8th \ revokerole. SQL.

Delete a role

(1) See the "Confirm role deletion" page in 8.25.
(2) the SQL code for the above process is as follows.
―――――――――――――――――――――――――――――――――― --
drop role temprole;
―――――――――――――――――――――――――――――――――― --
[see the CD file ]: chapter 2 \ 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.