<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>惜分飞 &#187; public授权</title>
	<atom:link href="https://www.xifenfei.com/tag/public%e6%8e%88%e6%9d%83/feed" rel="self" type="application/rss+xml" />
	<link>https://www.xifenfei.com</link>
	<description>提供7*24专业数据库(Oracle,SQL Server,MySQL,PostgreSQL等)恢复和技术支持@Tel:17813235971</description>
	<lastBuildDate>Wed, 04 Nov 2026 15:33:30 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>public授权语句</title>
		<link>https://www.xifenfei.com/2025/01/grant-public-sql.html</link>
		<comments>https://www.xifenfei.com/2025/01/grant-public-sql.html#comments</comments>
		<pubDate>Fri, 31 Jan 2025 13:18:10 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[public授权]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=11187</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2025/01/grant-public-sql.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2025/01/grant-public-sql.html" target="_blank">public授权语句</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>在上一篇文章中写到数据泵迁移导致sys授权丢失(<a href="https://www.xifenfei.com/2025/01/impdp-missing-sys-priv.html" title="impdp导入数据丢失sys授权问题分析" rel="noopener" target="_blank">impdp导入数据丢失sys授权问题分析</a>),这次进一步完善在有些系统中,会出现对部分权限授权给public的操作,使用逻辑方式(exp/imp,expdp/impdp)进行迁移,可能会导致这个部分权限丢失,从而使得系统部分功能异常,可以通过类似sql查询出来授权语句,在新库上执行</p>
<pre class="brush: sql; title: ; notranslate">
select 'grant ' || privilege || ' on ' || '&quot;' || OWNER || '&quot;.&quot;' ||
       table_name || '&quot;' || ' to ' || grantee || ';' &quot;GRANTS&quot;
  from dba_tab_privs
 where privilege not in ('READ', 'WRITE')
   and table_name not like '%/%'
   and owner not in ('SYSTEM',
                     'WMSYS',
                     'XDB',
                     'CTXSYS',
                     'MDSYS',
                     'EXFSYS',
                     'APEX_030200',
                     'ORDSYS',
                     'ORDPLUGINS',
                     'DBSNMP',
                     'OLAPSYS',
                     'ORDDATA')
   and grantee in ('PUBLIC')
 order by 1;
</pre>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/03/grant-dml-to-public-authorization-expires.html" rel="bookmark" class="crp_title">表dml操作权限授权给public,导致只读用户失效</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/impdp-missing-sys-priv.html" rel="bookmark" class="crp_title">impdp导入数据丢失sys授权问题分析</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/11/oracle%e5%b8%b8%e7%94%a8%e7%94%a8%e6%88%b7%e6%9d%83%e9%99%90%e8%a7%86%e5%9b%be.html" rel="bookmark" class="crp_title">Oracle常用用户权限视图</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2014/10/11g%e4%b8%ad-connect-by-%e8%af%ad%e5%8f%a5%e6%89%a7%e8%a1%8c%e8%ae%a1%e5%88%92%e6%94%b9%e5%8f%98.html" rel="bookmark" class="crp_title">11g中 connect by 语句执行计划改变</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2017/11/xtts.html" rel="bookmark" class="crp_title">XTTS实战分享</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/12/vpwfile_users%e5%92%8c%e5%af%86%e7%a0%81%e6%96%87%e4%bb%b6%e5%85%b3%e7%b3%bb%e7%bb%ad.html" rel="bookmark" class="crp_title">V$PWFILE_USERS和密码文件关系(续)</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2010/08/fckeditor%e4%bd%bf%e7%94%a8%e8%af%b4%e6%98%8e.html" rel="bookmark" class="crp_title">fckeditor使用说明</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2010/09/shell%e7%bc%96%e7%a8%8b%e2%80%94%e2%80%94%e5%9f%ba%e6%9c%ac%e8%af%ad%e6%b3%95.html" rel="bookmark" class="crp_title">shell编程——基本语法</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/12/%e5%88%9b%e5%bb%ba%e8%a7%86%e5%9b%be%e6%8f%90%e7%a4%baora-01031.html" rel="bookmark" class="crp_title">创建视图提示ORA-01031</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2010/08/flash%e5%b9%bb%e7%81%af%e7%89%87.html" rel="bookmark" class="crp_title">flash幻灯片</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/08/%e5%9c%a8%e7%ba%bf%e9%87%8d%e5%ae%9a%e4%b9%89%e5%8e%9f%e7%90%86%e6%8e%a2%e8%ae%a8.html" rel="bookmark" class="crp_title">在线重定义原理探讨</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/08/oracle-12c-dbms_utility-expand_sql_text-%e6%9f%a5%e7%9c%8bsql%e8%a7%86%e5%9b%be%e5%9f%ba%e8%a1%a8.html" rel="bookmark" class="crp_title">ORACLE 12C dbms_utility.expand_sql_text 查看SQL视图基表</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2025/01/grant-public-sql.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
