Summary of object permissions and system permissions for Oracle Notes

Source: Internet
Author: User

Object permissions and System permissions


Creating a table and creating a session is a system privilege;

The system administrator has access to the other tables.

Log in with 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;//the permissions to create the tables 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 in as Wangwu
Sqlplus Wangwu/wangwu;
Create a table Mytab
CREATE TABLE Mytab (ID int,name varchar (20));

Object permissions

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:
Queries and deletions cannot be controlled to columns


Note the point:
1, each table belongs to a specific user;
2, if you want to operate the table of other users, you need to grant the corresponding permissions;
3, when visiting other users ' tables, prefix username, such as wangwu.mytable, should be added.
4, the other user's table to insert, the update operation, the need to commit (commit), otherwise the table owner can not change the table structure;

who owns who authorized, which means that only the owner of the table can grant permissions to the table operation to other people

Public user refers to all users

The ORACL permission can control the column,
Note: However, you can only control insertions and updates to columns, and queries and deletions cannot be controlled to columns.

disconnecting/connecting to a database
Disconn/conn

ALTER TABLE MyTable add name varchar (10)
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.