Orcale permission, role view Creation Method

Source: Internet
Author: User

View the system permissions of the current user
Copy codeThe Code is as follows:
Select * from user_sys_privs;

System permission granted by the system administrator ----- sys user
Copy codeThe Code is as follows:
Create user lisi identified by 123456 // create a user
Grant create session to lisi // grant the session permission
Grant create table to lisi // grant the table creation permission
Grant create unlimited tablespace to lisi // grant unlimited permissions
Revoke create session from lisi // revoke permissions
Revoke create table from lisi
Revoke create unlimited tablespace from lisi

The current user has permissions on objects.
Copy codeThe Code is as follows:
Select * from user_tab_privs;

Object permission the Object Creator grants or revokes the permission
For example, the lisi user creates a table tab.
Copy codeThe Code is as follows:
Grant select on tab to wangwu // grant the query condition of the table tab to the wangwu user
Grant all on tab to wangwu // grant all operations on the table tab to the wangwu user
Revoke select on tab from wangwu
Revoke all on tab from wangwu

Transfer Permissions
Sys-> User A-> User B
System Permissions
Copy codeThe Code is as follows:
Grant ceate any table to lisi with admin option; // you can grant this permission to other users.

Object permission
Copy codeThe Code is as follows:
Grant select on tabA to lisi with grant option;

Role
Copy codeThe Code is as follows:
Create (drop) role myrole
Grant create session to myrole
Grant create table to myrole
Grant myrole to lisi

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.