Examining Role Table Privileges in Oracle SQL Code 1select owner || '.' || table_name "TABLE" 2, column_name 3, privilege 4, grantable 5from role_tab_privs 6where role like '&role' 7/ Sample Oracle Output: 1 2no rows selected 3SQL> Purpose: This code retrieves detailed information about …
Read MoreFind an Oracle role SQL Code 1select * 2from dba_roles 3where role like '&role' 4/ Sample Oracle Output: 1 2no rows selected 3SQL> Purpose: This code retrieves information about a specific database role, based on a partial or complete role name provided by the user. Breakdown:
select *
:** This clause …
Read MoreRetrieving User Role Privileges in Oracle SQL Code 1select grantee 2, granted_role 3, admin_option 4from dba_role_privs 5where grantee like upper('&username') 6/ Sample Oracle Output: 1 2no rows selected 3SQL> Purpose: This code retrieves the roles granted to a specific user, indicating whether each role …
Read MoreLock or Unlock an Oracle User in the Database Lock User SQL Code 1alter user <username> account lock; 2/ Unlock User SQL Code 1alter user <username> account unlock; 2/ Sample Oracle Output: 1 2no rows selected 3SQL> Purpose: To lock a specific user account in the Oracle database, preventing any further …
Read MoreList all the Oracle Users Account Information for the Oracle Database SQL Code 1set pages 999 lines 100 2col username format a20 3col status format a8 4col tablespace format a20 5col temp_ts format a20 6select username 7, account_status status 8, created 9, default_tablespace tablespace 10, temporary_tablespace temp_ts …
Read More