Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Good link for LIO in Oracle ( Logical IOs) Oracle
  • How does one overcome the Unix 2 Gig file limit? Linux/Unix
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • Some OS level threshold for performance. Linux/Unix
  • rm_backup_arch_file.ksh Linux/Unix
  • All About Trace Fils Oracle
  • Process Map for CPU and Memory for OS processes Linux/Unix
  • DBMS_SQL for alter session. Oracle
  • v$event_name Oracle
  • DBMS_PROFILER for tuning PLSQL programs. Oracle
  • 10g RAC: Troubleshooting CRS Root.sh Problems Oracle
  • fkwoindex.sql /* Find FK without Index */ Oracle
  • Oracle Metalink useful notes Oracle
  • rm_backup_arch_file.ksh Linux/Unix
  • Find_planinfo.sql 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

  • Rename Tablespace Oracle
  • cur_sql.sql Oracle
  • dbms_job.submit example Oracle
  • Drop tempfiles from database Oracle
  • Oracle Metalink useful notes Oracle
  • block_ident.sql Oracle

Leave a Reply Cancel reply

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

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Django (0)
  • GIT (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (394)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (343)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • tracksqltime.sql05-Mar-2026
  • Complete Git Tutorial for Beginners25-Dec-2025
  • Postgres DB user and OS user.25-Dec-2025
  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Absolute file number and relative file number Oracle
  • oracle_env_10g_CADEV Linux/Unix
  • How to find password change date for user Oracle
  • OPENING A STANDBY DATABASE IN READ-ONLY MODE Oracle
  • Alter procedure auditing Oracle
  • Jai Shree Ram Linux/Unix
  • OEM-troubleshooting on 20-MAY-08 Oracle
  • V$CONTROLFILE_RECORD_SECTION reference notes. Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme