--View all users under the database:
Select from Dba_users;
--View the user roles for the current connected database
SELECT * from User_role_privs;
--Create User
CREATE User by test;
--Assigning authorization
Grant to -- assign permissions to allow only connections to view Grant to -- assign to normal permissions development operations basically has met Grantto-- assigning administrator Permissions
--Query What system permissions are in a role:
SelectPrivilege fromRole_sys_privswhereRole='RESOURCE'; PRIVILEGE----------------------------------------CREATESEQUENCECREATE TRIGGERCREATECLUSTERCREATE PROCEDURECREATETYPECREATEOPERATORCREATE TABLECREATEIndextype8Rows selected.
--Query What role is included in a role--if no other roles are included, the query result is empty.
Select from where role='dba';
--If the user locks the user to unlock
Alter user test account unlock;
--View the permissions of a user--note: 11g user names are case-sensitive by default
Select from where grantee='test'; GRANTEE granted_role------------------------------------------------------------ Test imp_full_databasetest exp_full_databasetest connecttest RESOURCE
--View system permissions for a specified user
SELECT * fromDba_sys_privsWHEREGRANTEE= 'Test'UNION AllSELECT * fromDba_sys_privsWHEREGRANTEEinch(SELECTGranted_role fromDba_role_privsWHEREGRANTEE= 'Test');
--View object permissions for the currently connected database user
SELECT * fromDba_tab_privsWHEREGRANTEE= 'Test'UNION AllSELECT * fromDba_tab_privsWHEREGRANTEEinch(SELECTGranted_role fromDba_role_privsWHEREGRANTEE= 'Test');
Oracle User Rights related