Nethence Newdoc Olddoc Lab Your IP BBDock  


Warning: those guides are mostly obsolete, please have a look at the new documentation.

UnixWindowsOracleObsoleteHardwareDIYMechanicsScriptsConfigs

User/schema and roles
 
 
User/schema
View users/schemas,
select * from all_users order by created;
 
View some user's roles,
select * from dba_role_privs where grantee='USERNAME';
 
View some user's system privileges,
select * from dba_sys_privs where grantee='USERNAME';
 
View some user's table or object privileges,
select * from dba_tab_privs where grantee='USERNAME';
 
View some user's tables,
select table_name from all_tables where owner='USERNAME';
--select * from USERNAME.table1 order by id;
 
Change some user's password,
alter user USERNAME identified by PASSWORD;
 
Drop some user,
drop user USERNAME;
note. add "cascade" to force user deletion eventhough it has tables types triggers and indexes.
 
 
Roles
View system privileges assigned to a role e.g.,
select * from role_sys_privs where role='CONNECT';
select * from role_sys_privs where role='RESOURCE';
 
View object privileges assigned to a role e.g.,
select * from role_tab_privs where role='CONNECT';
select * from role_tab_privs where role='RESOURCE';
 
View roles' dependencies,
select * from role_role_privs;
 

(obsolete, see the new doc)