Summary of object and system permissions in Oracle notes

Source: Internet
Author: User

Object permission and system permission

Table creation and session creation are system permissions;

The system administrator has the permission to access other tables.

Log On As sys
Sqlplus sys/on_change_install as sysdba;

Create user wangwu
Create user wangwu identified by wangwu;

System Permissions
Grant create session to wangwu;
Grant create table to wangwu;
Grant unlimited tablespace to wangwu;

Grant create table to public; // grant the table creation permission to all users;

Revoke system Permissions
Revoke create session from wangwu;
Revoke create table from wangwu;
Revoke unlimited tablespace from wangwu;
View System Permissions
Select * from user_sys_privs;

Log On With wangwu
Sqlplus wangwu/wangwu;
Create a table mytab
Create table mytab (id int, name varchar (20 ));

Object permission

Grant all/select/insert/update/delete on mytab to lisi;
Revoke object permissions
Revoke all/select/insert/update/delete on mytab from lisi;
View object permissions
Select * from user_tab_privs;

Object permissions can be controlled to columns
Grant update (name) on mytab to lisi;
Grant insert (id) on mytab to lisi;
View column Permissions
Select * from user_col_privs;

Note:
Query and deletion cannot be controlled to columns.


Note:
1. Each table belongs to a specific user;
2. If you want to operate tables of other users, you must first grant the corresponding permissions;
3. When accessing tables of other users, you need to add the prefix username, such as wangwu. mytable
4. Insert tables of other users. commit is required for update. Otherwise, the table owner cannot modify the table structure;

Only the table owner can grant table operation permissions to others.

Public users refer to all users.

Oracl permission can be used to control columns,
Note: however, you can only control insertion and update to columns. query and deletion cannot control columns.

Disconnect/connect to the database
Disconn/conn

Alter table mytable add name varchar (10)

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.