Oracle predefined roles and custom roles

Source: Internet
Author: User
Oracle pre-roles and custom roles, query all oracle roles, and introduce common pre-roles such as connect, resource, dba, and dba.

Oracle pre-roles and custom roles, query all oracle roles, and introduce common pre-roles such as connect, resource, dba, and dba.

Oracle predefined roles and custom roles

[Date: 2012-08-06] Source: Linux community Author: takeme [Font:]

1. query all Oracle roles

Select * from dba_roles;

2. Describes frequently used pre-defined roles, such as connect, resource, and dba.

1. connect has most of the permissions of General developers. In most cases, it is enough to assign the connect and resource roles to a user.

  • The connect role has the following permissions:
  • Alter session
  • Create cluster
  • Create database link
  • Create session
  • Create table
  • Create view
  • Create sequence
  • 2. The resources role uses other permissions selected by developers, such as creating stored procedures, triggers, and resources. The resource role implies the unlimited tablespace system permission and unlimited tablespace permissions.

  • Create cluster
  • Create indextype
  • Create table
  • Create type
  • Create proecdure
  • Create trigger
  • 3. the dba role has all system permissions and the with admin option. The default dba users are sys and system. They can grant any system permissions to other users, however, the dba role does not have the privileges of sysdba and sysoper (starting and disabling databases)

    3. Example: grant the system role of connect resource dba

  • 4. revoke a role

    5. Custom roles-- Generally, it is created by dba, and other users need the system permission to create a role (you can specify the authentication method when creating a role (no verification, database verification, etc)

    6.Grant system permissions to custom roles

  • 7.Grant object permissions to custom roles

    8. Grant user-defined roles

  • Grant role name to user name [with admin option]
  • 9. delete a user's role

  • Revoke role name from user name
  • 10. delete a custom role

  • 11. ViewRoles owned by the current user

  • Select * from user_role_privs
  • 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.