-- Select * From dba_users; queryDatabaseAll users in
-- Alter user test_select account lock; lock the user
-- Alter user test_select account unlock; unlock the user
-- Create user xujin identified by xujin; create a user
-- Grant create tablespace to xujin; Authorize
-- Grant select on tabel1 to xujin; Authorize Query
-- Grant update on Table1 to xujin;
-- Grant execute on procedure1 to xujin authorized Stored Procedure
-- Grant update on Table1 to xujin with grant option; grant the update permission to the xujin user, and the user can continue to grant permissions;
-- Revoke permissions
-- Revoke select on Table1 from xujin1; revoke the Select Table query permission;
-- Revoke all on Table1 from xujin;
/* Grant connect to xujin;
Revoke connect from xujin
Grant select on xezf. pai_alarm to xujin;
Revoke select on xezf. wash_alarm from xujin ;*/
-- Select table_name, privilege from dba_tab_privs where grantee = 'xujin' query object permissions of a user
-- Select * From dba_sys_privs where grantee = 'xujin' query system permissions of a user
-- Select * From session_privs -- System Permissions Valid for money sessions
-- Role
-- Create role xujin1; -- create an xujin1 role
-- Grant insert on xezf. Into _alarm to xujin1; insert table Information
-- Revoke insert on xezf. Revoke _alarm from xujin1; revoke the permission of the xujin1 role
-- Grant xujin1 to xujin; grant the role permission to xujin;
-- Create role xujin2;
-- Grant xujin1 to xujin2; Authorize xujin1 to xujin2;
-- Alter user xujin default xujin1, xujin2; modify user default roles
-- Drop role xujin1; Delete role 1;
-- Select * From role_sys_privs where role = xujin1;
-- View the system permissions under the role Xu Jin 1;
-- Select granted_role, admin_option from role_role_privs where role = 'xujin2 ';
-- View the role permissions under the xujin1 role
-- Select * From role_sys_privs where role = 'xujin2 ';
-- Select table_name, privilege from role_tab_privs where role = 'xujin1 ';
-- Select * From dba_role_privs where grantee = 'xujin' -- check the number of roles under a user;