<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Dba_role_privs on Oracle Scripts</title><link>https://www.oraclescripts.com/tags/dba_role_privs/</link><description>Recent content in Dba_role_privs on Oracle Scripts</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>OracleScripts.com</copyright><lastBuildDate>Thu, 04 Jan 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://www.oraclescripts.com/tags/dba_role_privs/index.xml" rel="self" type="application/rss+xml"/><item><title>Oracle User Roles and Privileges via dba_role_privs</title><link>https://www.oraclescripts.com/post/show-oracle-roles-that-are-granted-to-a-user/</link><pubDate>Thu, 04 Jan 2024 00:00:00 +0000</pubDate><guid>https://www.oraclescripts.com/post/show-oracle-roles-that-are-granted-to-a-user/</guid><description>
&lt;h2 id="retrieving-user-role-privileges-in-oracle-using-the-view-dba_role_privs"&gt;Retrieving User Role Privileges in Oracle using the view dba_role_privs&lt;/h2&gt;
&lt;p&gt;This page examines an Oracle SQL code snippet that fetches granted roles and their associated admin options for a specified user.&lt;/p&gt;
&lt;script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1012089347386563"
crossorigin="anonymous"&gt;&lt;/script&gt;
&lt;ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-1012089347386563"
data-ad-slot="5317081938"
data-ad-format="auto"
data-full-width-responsive="true"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;h2 id="sql-code"&gt;SQL Code&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;select grantee
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;, granted_role
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;, admin_option
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;from dba_role_privs
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;where grantee like upper(&amp;#39;&amp;amp;username&amp;#39;)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;6&lt;/span&gt;&lt;span class="cl"&gt;/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This code retrieves the roles granted to a specific user, indicating whether each role has the admin option enabled. This information is crucial for understanding user privileges and authorizations within the database.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Breakdown:&lt;/strong&gt;&lt;/p&gt;</description></item></channel></rss>