Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Import and export statements Oracle
  • find_du.ksh to find # of files, their sizes in current folder and its subdolder Linux/Unix
  • useful dg links Oracle
  • perf_today.sql Oracle
  • Rman Notes -1 Oracle
  • Settting up get_vmstat.sh for colletinf CPU Usage. Oracle
  • How to Decide upto what level you can decrement your datafile size. ( Shrink Datafile) Oracle
  • Rman Notes -1 Oracle
  • scp with ssh2 Linux/Unix
  • Test Case for Inserting Multiple (2.3 Million rows in 26 Seconds) Oracle
  • Drop database in Oracle 10g Oracle
  • DBMS_UTILITY.ANALYZE_SCHEMA Oracle
  • eplan9i.sql Oracle
  • findinfo.sql (SQL for getting CPU and Active session info) Oracle
  • V$CONTROLFILE_RECORD_SECTION reference notes. 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

  • Reclaim temp tablespace for oracle 8, 8i Oracle
  • v$backup.status information Oracle
  • Roles and Stored Object behaviour Oracle
  • get_aix_vmstat.ksh Oracle
  • GSQ.sql Oracle
  • before_trunc.sql Before Truncate table needs to execute following: Oracle

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
  • note id 373303.1 Linux/Unix
  • Find All internal Parameters Oracle
  • xargs use Linux/Unix
  • Rename Tablespace Oracle
  • logminer and my_lbu Oracle
  • Single character replacement in Unix Linux/Unix
  • upload.html PHP/MYSQL/Wordpress
  • For Perl DBI installation and testing program PHP/MYSQL/Wordpress

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme