Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Global Unique Identifier Generation in Oracle 9.2 SYS_GUID() Oracle
  • reset Sequence Oracle
  • Important Solaris Commands Linux/Unix
  • All About Trace Fils Oracle
  • Process Map for CPU and Memory for OS processes Linux/Unix
  • Good notes for shared pool Oracle
  • DBA_HIST_SQLSTAT contents Oracle
  • Implementing Listener Security Oracle
  • db_status.sql Oracle
  • PLSQL Table Syntax 1 Oracle
  • useful dg links Oracle
  • In Addition to previous note, following grants needed on PERFSTAT user. Oracle
  • initUOCIOTTO.ora Oracle
  • Privileges Required to Create Procedures and Functions that uses objects from other schema. Oracle
  • Zip and unzip with tar Linux/Unix

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

  • This is from Temi Oracle
  • crtgr.sql /* For creating trigger from data dictionary */ Oracle
  • proc.sql Oracle
  • Finding locked objects Oracle
  • Sending SQLPLUS output in HTML format Oracle
  • Is It Recommended To Apply Patch Bundles When PSU Is Available? -ID 743554.1 Oracle

Leave a Reply Cancel reply

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

Categories

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

Recent Posts

  • 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
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • proper cpu stats Linux/Unix
  • oracle 10g on linux Linux/Unix
  • Guide to Linux System Command Mastery Linux/Unix
  • How to change hostname in Linux Linux/Unix
  • sid_wise_sql.sql Oracle
  • Oracle Connections expire_time and firewall Oracle
  • 556976.1 Oracle Clusterware: Components installed Oracle
  • Good Doc 28-JUN-2006 Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme