Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Backup and Recovery Scenarios Oracle
  • currwaitobj.sql SQl_ID and SQL statement you can get from currwaitobj.sql Oracle
  • cif crons Linux/Unix
  • Formatter Explain plan Output 1 Oracle
  • Jai Shree Ram Oracle
  • Privilege to describe the table. Oracle
  • Is It Recommended To Apply Patch Bundles When PSU Is Available? -ID 743554.1 Oracle
  • oracle Dba site Oracle
  • Removing Ctrl-M from end of line using vi Linux/Unix
  • cold backup scripts to copy locally Linux/Unix
  • database trigger failing Oracle
  • Example of How To Resize the Online Redo Logfiles Note:1035935.6 Oracle
  • Parallel DML Oracle
  • Optimizer SORT Operations Oracle
  • Create type and Grant on it. Oracle

Find all users who have DML privileges

Posted on 05-Sep-202305-Sep-2023 By Admin No Comments on Find all users who have DML privileges

Run following query as sysdba.

alter session set nls_date_format=’DD-MON-RRRR:HH24:MI:SS’;

alter session set nls_date_format='DD-MON-RRRR:HH24:MI:SS';


select username, created, account_status   /* Users who granted role with DML privs */ 
  from dba_users 
 where oracle_maintained = 'N' 
   and username in 
         (select grantee from dba_role_privs 
           where granted_role in 
                (select role 
                  from dba_roles 
                 where role in (select GRANTEE from dba_tab_privs where privilege in ('INSERT','UPDATE', 'DELETE') ) ) )
 Union
 select username, created, account_status   /* Users who granted direct DML privs */ 
  from dba_users 
 where oracle_maintained = 'N' 
  and username in (select GRANTEE from dba_tab_privs where privilege in ('INSERT','UPDATE', 'DELETE') );
 
Oracle, SQL scripts

Post navigation

Previous Post: Oracle GoldenGate lag monitoring shell script
Next Post: Convert multiple rows to single column

Related Posts

  • Find average Row Length and other table size calculation. metalink notes Oracle
  • fkwoindex.sql /* Find FK without Index */ Oracle
  • v$event_name Oracle
  • Jai Shree Ram Oracle
  • Reclaim temp tablespace for oracle 8, 8i Oracle
  • CPU Core related projections AWS

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Does DBMS_JOB recompute the NEXT_DATE interval after or before Oracle
  • Mutating Table Error while using database trigger Oracle
  • Oracle Connections expire_time and firewall Oracle
  • SYSOPER Mystery Oracle
  • Jai Shree Ram Linux/Unix
  • Search and Replace vi editor command. Linux/Unix
  • compile_inv.sql Oracle
  • copying/removing directory with all its subdirectory Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme