{"id":10231,"date":"2017-06-04T16:03:04","date_gmt":"2017-06-04T14:03:04","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/12cr2-auditing-all-users-with-a-role-granted\/"},"modified":"2017-06-04T16:03:04","modified_gmt":"2017-06-04T14:03:04","slug":"12cr2-auditing-all-users-with-a-role-granted","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/12cr2-auditing-all-users-with-a-role-granted\/","title":{"rendered":"12cR2 auditing all users with a role granted"},"content":{"rendered":"<h2>By Franck Pachot<\/h2>\n<p>.<br \/>\n12.1 introduced Unified Auditing where you define policies and then enable them. As with the traditional audit, you enable them for all users or for specific users. The unified auditing adds a syntax to audit all users except some listed ones. 12.2 adds a syntax to audit a group of users, defined by the role granted. This is the best way to enable a policy for a group of users, including those created later.<\/p>\n<p>I create a simple policy, to audit logon and DBA role usage:<\/p>\n<pre><code>\nSQL&gt; create audit policy DEMO_POLICY actions logon, roles DBA;\nAudit POLICY created.\n<\/code><\/pre>\n<p>I create a new DBA user, USER1<\/p>\n<pre><code>\nSQL&gt; create user USER1 identified by covfefe quota unlimited on USERS;\nUser USER1 created.\nSQL&gt; grant DBA to USER1;\nGrant succeeded.\n<\/code><\/pre>\n<p>I want to enable the policy for this user because I want to audit all DBAs<\/p>\n<pre><code>\nSQL&gt; audit policy DEMO_POLICY by USER1;\nAudit succeeded.\n<\/code><\/pre>\n<p>I remove Audit records for this demo<\/p>\n<pre><code>\nSQL&gt; exec dbms_audit_mgmt.clean_audit_trail(audit_trail_type=&gt;dbms_audit_mgmt.audit_trail_unified,use_last_arch_timestamp=&gt;false);\nPL\/SQL procedure successfully completed.\n<\/code><\/pre>\n<p>Let&#8217;s connect with this user and see what is audited:<\/p>\n<pre><code>\nSQL&gt; connect USER1\/covfefe@\/\/localhost\/PDB1\nConnected.\n&nbsp;\nSQL&gt; select audit_type,os_username,userhost,terminal,dbusername,action_name,unified_audit_policies,system_privilege_used,event_timestamp\n  2   from unified_audit_trail where unified_audit_policies='DEMO_POLICY' order by event_timestamp;\n&nbsp;\nAUDIT_TYPE  OS_USERNAME  USERHOST  TERMINAL  DBUSERNAME  ACTION_NAME  UNIFIED_AUDIT_POLICIES  SYSTEM_PRIVILEGE_USED  EVENT_TIMESTAMP\n----------  -----------  --------  --------  ----------  -----------  ----------------------  ---------------------  ---------------\nStandard    oracle       VM104     pts\/0     USER1       LOGON        DEMO_POLICY             CREATE SESSION         04-JUN-17 04.22.51.865094000 PM\nStandard    oracle       VM104     pts\/0     USER1       SELECT       DEMO_POLICY             SELECT ANY DICTIONARY  04-JUN-17 04.22.51.948187000 PM\n<\/code><\/pre>\n<p>The logon and the select on dictionary table (possible here thanks to the DBA role) has been audited because the policy is enabled for this user.<\/p>\n<p>We have a new DBA and we create a new user for him:<\/p>\n<pre><code>\nSQL&gt; create user USER2 identified by covfefe quota unlimited on USERS;\nUser USER2 created.\nSQL&gt; grant DBA to USER2;\nGrant succeeded.\n<\/code><\/pre>\n<p>He connects and check what is audited:<\/p>\n<pre><code>\nSQL&gt; connect USER2\/covfefe@\/\/localhost\/PDB1\nConnected.\nSQL&gt; select audit_type,os_username,userhost,terminal,dbusername,action_name,unified_audit_policies,system_privilege_used,event_timestamp\n  2   from unified_audit_trail where unified_audit_policies='DEMO_POLICY' order by event_timestamp;\n&nbsp;\nAUDIT_TYPE  OS_USERNAME  USERHOST  TERMINAL  DBUSERNAME  ACTION_NAME  UNIFIED_AUDIT_POLICIES  SYSTEM_PRIVILEGE_USED  EVENT_TIMESTAMP\n----------  -----------  --------  --------  ----------  -----------  ----------------------  ---------------------  ---------------\nStandard    oracle       VM104     pts\/0     USER1       LOGON        DEMO_POLICY             CREATE SESSION         04-JUN-17 04.22.51.865094000 PM\nStandard    oracle       VM104     pts\/0     USER1       SELECT       DEMO_POLICY             SELECT ANY DICTIONARY  04-JUN-17 04.22.51.948187000 PM\nStandard    oracle       VM104     pts\/0     USER1       SELECT       DEMO_POLICY             SELECT ANY DICTIONARY  04-JUN-17 04.22.52.132814000 PM\n<\/code><\/pre>\n<p>Nothing is audited for this user. The DBA role usage is audited, but only for USER1.<\/p>\n<p>Of course, we can add an audit statement for each user created for a DBA:<\/p>\n<pre><code>\nSQL&gt; audit policy DEMO_POLICY by USER2;\nAudit succeeded.\n<\/code><\/pre>\n<p>Then his new activity is audited:<\/p>\n<pre><code>\nSQL&gt; connect USER2\/covfefe@\/\/localhost\/PDB1\nConnected.\nSQL&gt; select audit_type,os_username,userhost,terminal,dbusername,action_name,unified_audit_policies,system_privilege_used,event_timestamp\n  2   from unified_audit_trail where unified_audit_policies='DEMO_POLICY' order by event_timestamp;\n&nbsp;\nAUDIT_TYPE  OS_USERNAME  USERHOST  TERMINAL  DBUSERNAME  ACTION_NAME  UNIFIED_AUDIT_POLICIES  SYSTEM_PRIVILEGE_USED  EVENT_TIMESTAMP\n----------  -----------  --------  --------  ----------  -----------  ----------------------  ---------------------  ---------------\nStandard    oracle       VM104     pts\/0     USER1       LOGON        DEMO_POLICY             CREATE SESSION         04-JUN-17 04.22.51.865094000 PM\nStandard    oracle       VM104     pts\/0     USER1       SELECT       DEMO_POLICY             SELECT ANY DICTIONARY  04-JUN-17 04.22.51.948187000 PM\nStandard    oracle       VM104     pts\/0     USER1       SELECT       DEMO_POLICY             SELECT ANY DICTIONARY  04-JUN-17 04.22.52.132814000 PM\nStandard    oracle       VM104     pts\/0     USER2       LOGON        DEMO_POLICY             CREATE SESSION         04-JUN-17 04.22.52.338928000 PM\n<\/code><\/pre>\n<p>But for security reason, we would like to be sure that any new user having the DBA role granted is audited.<br \/>\nLet&#8217;s try something else<\/p>\n<pre><code>\nSQL&gt; noaudit policy DEMO_POLICY by USER1,USER2;\nNoaudit succeeded.\n<\/code><\/pre>\n<p>We can simply audit all users:<\/p>\n<pre><code>\nSQL&gt; audit policy DEMO_POLICY;\nAudit succeeded.\n<\/code><\/pre>\n<p>But this is too much. Some applications constantly logon and logoff and we don&#8217;t want to have that in the audit trail.<\/p>\n<pre><code>\nSQL&gt; noaudit policy DEMO_POLICY;\nNoaudit succeeded.\n<\/code><\/pre>\n<p>We can still enable the policy for all users, and exempt those users we don&#8217;t want:<\/p>\n<pre><code>\nSQL&gt; audit policy DEMO_POLICY except DEMO;\nAudit succeeded.\n<\/code><\/pre>\n<p>Here is what is enabled, and this will audot all new users:<\/p>\n<pre><code>\nSQL&gt; select * from audit_unified_enabled_policies;\n&nbsp;\nUSER_NAME  POLICY_NAME         ENABLED_OPT  ENABLED_OPTION  ENTITY_NAME  ENTITY_TYPE  SUCCESS  FAILURE\n---------  -----------         -----------  --------------  -----------  -----------  -------  -------\nDEMO       DEMO_POLICY         EXCEPT       EXCEPT USER     DEMO         USER         YES      YES\nALL USERS  ORA_SECURECONFIG    BY           BY USER         ALL USERS    USER         YES      YES\nALL USERS  ORA_LOGON_FAILURES  BY           BY USER         ALL USERS    USER         NO       YES\n<\/code><\/pre>\n<p>But once again, this is not what we want.<\/p>\n<pre><code>\nSQL&gt; noaudit policy DEMO_POLICY by DEMO;\nNoaudit succeeded.\n&nbsp;\nSQL&gt; select * from audit_unified_enabled_policies;\n&nbsp;\nUSER_NAME  POLICY_NAME         ENABLED_OPT  ENABLED_OPTION  ENTITY_NAME  ENTITY_TYPE  SUCCESS  FAILURE\n---------  -----------         -----------  --------------  -----------  -----------  -------  -------\nALL USERS  ORA_SECURECONFIG    BY           BY USER         ALL USERS    USER         YES      YES\nALL USERS  ORA_LOGON_FAILURES  BY           BY USER         ALL USERS    USER         NO       YES\n<\/code><\/pre>\n<h3>Audit all users to whom roles are granted directly<\/h3>\n<p>In 12<i>c<\/i>R2 we have the possibility to do exactly what we want: audit all users having the DBA role granted:<\/p>\n<pre><code>\nSQL&gt; audit policy DEMO_POLICY by users with granted roles DBA;\nAudit succeeded.\n<\/code><\/pre>\n<p>This enables the audit for all users for whom the DBA role has been directly granted:<\/p>\n<pre><code>\nSQL&gt; select * from audit_unified_enabled_policies;\n&nbsp;\nUSER_NAME  POLICY_NAME         ENABLED_OPT  ENABLED_OPTION   ENTITY_NAME  ENTITY_TYPE  SUCCESS  FAILURE\n---------  -----------         -----------  --------------   -----------  -----------  -------  -------\n           DEMO_POLICY         INVALID      BY GRANTED ROLE  DBA          ROLE         YES      YES\nALL USERS  ORA_SECURECONFIG    BY           BY USER          ALL USERS    USER         YES      YES\nALL USERS  ORA_LOGON_FAILURES  BY           BY USER          ALL USERS    USER         NO       YES\n<\/code><\/pre>\n<p>The important thing is that a newly created user will be audited as long as he has the DBA role directly granted:<\/p>\n<pre><code>\nSQL&gt; create user USER3 identified by covfefe quota unlimited on USERS;\nUser USER3 created.\nSQL&gt; grant DBA to USER3;\nGrant succeeded.\n&nbsp;\nSQL&gt; connect USER3\/covfefe@\/\/localhost\/PDB1\nConnected.\nSQL&gt; select audit_type,os_username,userhost,terminal,dbusername,action_name,unified_audit_policies,system_privilege_used,event_timestamp\n  2   from unified_audit_trail where unified_audit_policies='DEMO_POLICY' order by event_timestamp;\n&nbsp;\nAUDIT_TYPE  OS_USERNAME  USERHOST  TERMINAL  DBUSERNAME  ACTION_NAME  UNIFIED_AUDIT_POLICIES  SYSTEM_PRIVILEGE_USED  EVENT_TIMESTAMP\n----------  -----------  --------  --------  ----------  -----------  ----------------------  ---------------------  ---------------\nStandard    oracle       VM104     pts\/0     USER1       LOGON        DEMO_POLICY             CREATE SESSION         04-JUN-17 04.29.17.915217000 PM\nStandard    oracle       VM104     pts\/0     USER1       SELECT       DEMO_POLICY             SELECT ANY DICTIONARY  04-JUN-17 04.29.17.988151000 PM\nStandard    oracle       VM104     pts\/0     USER1       SELECT       DEMO_POLICY             SELECT ANY DICTIONARY  04-JUN-17 04.29.18.117258000 PM\nStandard    oracle       VM104     pts\/0     USER2       LOGON        DEMO_POLICY             CREATE SESSION         04-JUN-17 04.29.18.322716000 PM\nStandard    oracle       VM104     pts\/0     USER2       SELECT       DEMO_POLICY             SELECT ANY DICTIONARY  04-JUN-17 04.29.18.345351000 PM\nStandard    oracle       VM104     pts\/0     USER2       SELECT       DEMO_POLICY             SELECT ANY DICTIONARY  04-JUN-17 04.29.18.415117000 PM\nStandard    oracle       VM104     pts\/0     USER2       SELECT       DEMO_POLICY             SELECT ANY DICTIONARY  04-JUN-17 04.29.18.439656000 PM\nStandard    oracle       VM104     pts\/0     USER2       SELECT       DEMO_POLICY             SELECT ANY DICTIONARY  04-JUN-17 04.29.18.455274000 PM\nStandard    oracle       VM104     pts\/0     USER3       LOGON        DEMO_POLICY             CREATE SESSION         04-JUN-17 04.29.18.507496000 PM\n<\/code><\/pre>\n<p>This policy applies to all users having the DBA role, and gives the possibility to audit more than their DBA role usage: here I audit all login from users having the DBA role. <\/p>\n<h3>So what?<\/h3>\n<p>We don&#8217;t use roles only to group privileges to grant. A role is usually granted to define groups of users: DBAs, Application user, Read-only application users, etc. The Unified Auditing can define complex policies, combining the audit of actions, privileges, and roles. The 12.2 syntax allows enabling the policy to a specific group of users.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Franck Pachot . 12.1 introduced Unified Auditing where you define policies and then enable them. As with the traditional audit, you enable them for all users or for specific users. The unified auditing adds a syntax to audit all users except some listed ones. 12.2 adds a syntax to audit a group of users,&hellip;&nbsp;<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[4133],"tags":[667,209,1025],"class_list":["post-10231","post","type-post","status-publish","format-standard","category-database","tag-audit","tag-oracle-12c","tag-oracle-12cr2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.9 (Yoast SEO v28.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>12cR2 auditing all users with a role granted - dbi services Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/12cr2-auditing-all-users-with-a-role-granted\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"12cR2 auditing all users with a role granted\" \/>\n<meta property=\"og:description\" content=\"By Franck Pachot . 12.1 introduced Unified Auditing where you define policies and then enable them. As with the traditional audit, you enable them for all users or for specific users. The unified auditing adds a syntax to audit all users except some listed ones. 12.2 adds a syntax to audit a group of users,&hellip;&nbsp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/12cr2-auditing-all-users-with-a-role-granted\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi services Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dbiservices\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-06-04T14:03:04+00:00\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:site\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/12cr2-auditing-all-users-with-a-role-granted\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/12cr2-auditing-all-users-with-a-role-granted\\\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/bf7c7eb0bec165183207237c9d0ee1d5\"},\"headline\":\"12cR2 auditing all users with a role granted\",\"datePublished\":\"2017-06-04T14:03:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/12cr2-auditing-all-users-with-a-role-granted\\\/\"},\"wordCount\":469,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"keywords\":[\"audit\",\"Oracle 12c\",\"Oracle 12cR2\"],\"articleSection\":[\"Database\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/12cr2-auditing-all-users-with-a-role-granted\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/12cr2-auditing-all-users-with-a-role-granted\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/12cr2-auditing-all-users-with-a-role-granted\\\/\",\"name\":\"12cR2 auditing all users with a role granted - dbi services Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2017-06-04T14:03:04+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/12cr2-auditing-all-users-with-a-role-granted\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/12cr2-auditing-all-users-with-a-role-granted\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/12cr2-auditing-all-users-with-a-role-granted\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"12cR2 auditing all users with a role granted\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi services Blog\",\"description\":\"#BeSharing\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\",\"name\":\"dbi services\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"width\":512,\"height\":512,\"caption\":\"dbi services\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dbiservices\\\/\",\"https:\\\/\\\/x.com\\\/dbiservices\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dbi-services\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/dbiservices\"],\"description\":\"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.\",\"email\":\"info@dbi-services.com\",\"telephone\":\"+41 32 422 96 00\",\"legalName\":\"dbi services SA\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/bf7c7eb0bec165183207237c9d0ee1d5\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/oracle-square.png\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/oracle-square.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/oracle-square.png\",\"caption\":\"Oracle Team\"},\"description\":\"Posts published under the Oracle Team account are collective contributions by the dbi services Oracle consultants. The practice covers the full Oracle Database lifecycle: architecture, migration and upgrade, high availability with RAC and Data Guard, backup and recovery, performance tuning, and engineered systems such as Oracle Database Appliance and Exadata. The team holds Oracle certifications up to Certified Master level and operates customer platforms under service level agreements.\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/oracle-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"12cR2 auditing all users with a role granted - dbi services Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/12cr2-auditing-all-users-with-a-role-granted\/","og_locale":"en_US","og_type":"article","og_title":"12cR2 auditing all users with a role granted","og_description":"By Franck Pachot . 12.1 introduced Unified Auditing where you define policies and then enable them. As with the traditional audit, you enable them for all users or for specific users. The unified auditing adds a syntax to audit all users except some listed ones. 12.2 adds a syntax to audit a group of users,&hellip;&nbsp;","og_url":"https:\/\/www.dbi-services.com\/blog\/12cr2-auditing-all-users-with-a-role-granted\/","og_site_name":"dbi services Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2017-06-04T14:03:04+00:00","author":"Oracle Team","twitter_card":"summary_large_image","twitter_creator":"@dbiservices","twitter_site":"@dbiservices","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/12cr2-auditing-all-users-with-a-role-granted\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/12cr2-auditing-all-users-with-a-role-granted\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bf7c7eb0bec165183207237c9d0ee1d5"},"headline":"12cR2 auditing all users with a role granted","datePublished":"2017-06-04T14:03:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/12cr2-auditing-all-users-with-a-role-granted\/"},"wordCount":469,"commentCount":0,"publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"keywords":["audit","Oracle 12c","Oracle 12cR2"],"articleSection":["Database"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/12cr2-auditing-all-users-with-a-role-granted\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/12cr2-auditing-all-users-with-a-role-granted\/","url":"https:\/\/www.dbi-services.com\/blog\/12cr2-auditing-all-users-with-a-role-granted\/","name":"12cR2 auditing all users with a role granted - dbi services Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2017-06-04T14:03:04+00:00","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/12cr2-auditing-all-users-with-a-role-granted\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/12cr2-auditing-all-users-with-a-role-granted\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/12cr2-auditing-all-users-with-a-role-granted\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"12cR2 auditing all users with a role granted"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi services Blog","description":"#BeSharing","publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dbi-services.com\/#organization","name":"dbi services","url":"https:\/\/www.dbi-services.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","width":512,"height":512,"caption":"dbi services"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dbiservices\/","https:\/\/x.com\/dbiservices","https:\/\/www.linkedin.com\/company\/dbi-services\/","https:\/\/www.youtube.com\/user\/dbiservices"],"description":"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.","email":"info@dbi-services.com","telephone":"+41 32 422 96 00","legalName":"dbi services SA"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bf7c7eb0bec165183207237c9d0ee1d5","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/12\/oracle-square.png","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/12\/oracle-square.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/12\/oracle-square.png","caption":"Oracle Team"},"description":"Posts published under the Oracle Team account are collective contributions by the dbi services Oracle consultants. The practice covers the full Oracle Database lifecycle: architecture, migration and upgrade, high availability with RAC and Data Guard, backup and recovery, performance tuning, and engineered systems such as Oracle Database Appliance and Exadata. The team holds Oracle certifications up to Certified Master level and operates customer platforms under service level agreements.","url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/10231","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=10231"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/10231\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=10231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=10231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=10231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}