View system permissions owned by the current user
Copy Code code as follows:
SELECT * from User_sys_privs;
System permissions system administrator granted-----SYS user
Copy Code code as follows:
Create user Lisi identified by 123456//creating users
Grant create session to Lisi//grant permission to have sessions
Grant CREATE TABLE to Lisi//grant permission to create table
Grant Create unlimited tablespace to Lisi//grant no space-restricted permissions
Revoke create session from LISI//revoke permissions
Revoke CREATE TABLE from Lisi
Revoke create unlimited tablespace from Lisi
The current user has permission on an object
Copy Code code as follows:
SELECT * from User_tab_privs;
Object Permission Object Creator grant or revoke permission
Such as: Lisi User to create Table tab
Copy Code code as follows:
Grant Select on tab to WANGWU//the Query Criteria for Table tab are granted to WANGWU users
Grant all on tab to WANGWU///For all Operations of Table tab to WANGWU users
Revoke Select on tab from WANGWU
Revoke all on tab from WANGWU
Permission passing
SYS-> a user-> B user
System permissions
Copy Code code as follows:
Grant ceate any table to Lisi with admin option; Dick users can pass this permission to other users
Object permissions
Copy Code code as follows:
Grant SELECT on TabA to Lisi with GRANT option;
Role
Copy Code code as follows:
Create (drop) role Myrole
Grant Create session to Myrole
Grant CREATE TABLE to Myrole
Grant Myrole to Lisi