<?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; dual丢失</title>
	<atom:link href="https://www.xifenfei.com/tag/dual%e4%b8%a2%e5%a4%b1/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>dual 缺少同义词故障解决</title>
		<link>https://www.xifenfei.com/2012/10/dual-%e7%bc%ba%e5%b0%91%e5%90%8c%e4%b9%89%e8%af%8d%e8%a7%a3%e5%86%b3.html</link>
		<comments>https://www.xifenfei.com/2012/10/dual-%e7%bc%ba%e5%b0%91%e5%90%8c%e4%b9%89%e8%af%8d%e8%a7%a3%e5%86%b3.html#comments</comments>
		<pubDate>Tue, 30 Oct 2012 04:34:58 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[dual丢失]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=3942</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2012/10/dual-%e7%bc%ba%e5%b0%91%e5%90%8c%e4%b9%89%e8%af%8d%e8%a7%a3%e5%86%b3.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/2012/10/dual-%e7%bc%ba%e5%b0%91%e5%90%8c%e4%b9%89%e8%af%8d%e8%a7%a3%e5%86%b3.html" target="_blank">dual 缺少同义词故障解决</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>在最近的一个客户案例中,因为缺少dual同义词,导致ddl语句无法执行。这里_system_trig_enabled参数和upgrade模式两种来解决该问题,整体上来说_system_trig_enabled不用重启数据库终止业务,更加人性化.<br />
<strong>缺少dual同义词后果</strong></p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; create table t_xifenfei_dual as
  2  select * from dba_objects;
select * from dba_objects
              *
ERROR at line 2:
ORA-00604: error occurred at recursive SQL level 1
ORA-00942: table or view does not exist

SQL&gt; alter session set events '942 trace name errorstack level 3';

Session altered.

SQL&gt; create table t_xifenfei_dual as  select * from dba_objects;
create table t_xifenfei_dual as  select * from dba_objects
                                               *
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00942: table or view does not exist

--trace文件
*** 2012-09-29 12:37:05.156
ksedmp: internal or fatal error
ORA-00942: table or view does not exist
Current SQL statement for this session:
select dummy from dual where  ora_dict_obj_type = 'SYNONYM' 
AND ora_dict_obj_owner = 'PUBLIC'

--dual 对象
SQL&gt; select object_type,owner from dba_objects where object_name='DUAL';

OBJECT_TYPE         OWNER
------------------- ------------------------------
TABLE               SYS
</pre>
<p><strong>尝试重建同义词</strong></p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; create public synonym dual for dual;
create public synonym dual for dual
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00942: table or view does not exist
</pre>
<p>_system_trig_enabled参数</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; select a.ksppinm name,b.ksppstvl value,a.ksppdesc description
  2    from x$ksppi a,x$ksppcv b
  3   where a.inst_id = USERENV ('Instance')
  4     and b.inst_id = USERENV ('Instance')
  5     and a.indx = b.indx
  6     and upper(a.ksppinm) LIKE upper('%&amp;param%')
  7  order by name
  8  /
Enter value for param: SYSTEM_TRIG_ENABLED
old   6:    and upper(a.ksppinm) LIKE upper('%&amp;param%')
new   6:    and upper(a.ksppinm) LIKE upper('%SYSTEM_TRIG_ENABLED%')

NAME                             VALUE                    DESCRIPTION
-------------------------------- ------------------------ -----------------------------
_system_trig_enabled             TRUE                     are system triggers enabled
</pre>
<p><strong>设置_SYSTEM_TRIG_ENABLED重建dual同义词</strong></p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; ALTER SYSTEM SET &quot;_SYSTEM_TRIG_ENABLED&quot;=FALSE SCOPE=MEMORY;

System altered.

SQL&gt; create public synonym dual for dual;

Synonym created.


SQL&gt; ALTER SYSTEM SET &quot;_SYSTEM_TRIG_ENABLED&quot;=true SCOPE=MEMORY;

System altered.
</pre>
<p><strong>使用upgrade模式创建</strong></p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; drop PUBLIC SYNONYM dual;

Synonym dropped.

SQL&gt; shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL&gt; startup
ORACLE instance started.

Total System Global Area  318767104 bytes
Fixed Size                  1267236 bytes
Variable Size             109054428 bytes
Database Buffers          201326592 bytes
Redo Buffers                7118848 bytes
Database mounted.
Database opened.
SQL&gt; create public synonym dual for dual;
create public synonym dual for dual
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00942: table or view does not exist


SQL&gt; shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL&gt; startup upgrage;
SP2-0714: invalid combination of STARTUP options
SQL&gt; startup upgrape;
SP2-0714: invalid combination of STARTUP options
SQL&gt; startup upgrade
ORACLE instance started.

Total System Global Area  318767104 bytes
Fixed Size                  1267236 bytes
Variable Size             109054428 bytes
Database Buffers          201326592 bytes
Redo Buffers                7118848 bytes
Database mounted.
Database opened.
SQL&gt; create public synonym dual for dual;

Synonym created.

SQL&gt; startup force
ORACLE instance started.

Total System Global Area  318767104 bytes
Fixed Size                  1267236 bytes
Variable Size             109054428 bytes
Database Buffers          201326592 bytes
Redo Buffers                7118848 bytes
Database mounted.
Database opened.
</pre>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/03/%e8%af%af%e5%88%a0%e9%99%a4dual%e8%a1%a8%e6%81%a2%e5%a4%8d.html" rel="bookmark" class="crp_title">误删除dual表恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/08/oracle%e7%94%a8%e6%88%b7%e9%87%8d%e5%91%bd%e5%90%8d.html" rel="bookmark" class="crp_title">ORACLE用户重命名</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/06/oracle-11g%e4%b8%a2%e5%a4%b1access%e6%81%a2%e5%a4%8d%e6%96%b9%e6%b3%95.html" rel="bookmark" class="crp_title">Oracle 11g丢失access$恢复方法</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2016/09/modify-obj-dataobj-_next_object.html" rel="bookmark" class="crp_title">通过update _NEXT_OBJECT 实现obj$.obj#和obj$.dataobj#跳号</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/03/%e6%a8%a1%e6%8b%9fora-04043%e5%b9%b6%e8%a7%a3%e5%86%b3.html" rel="bookmark" class="crp_title">模拟ORA-04043并解决</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/03/%e6%8e%88%e6%9d%83%e7%94%a8%e6%88%b7%e8%ae%bf%e9%97%ae%e6%95%b0%e6%8d%ae%e5%ad%97%e5%85%b8%e4%b8%89%e7%a7%8d%e6%96%b9%e5%bc%8f.html" rel="bookmark" class="crp_title">授权用户访问数据字典三种方式</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/03/v%e8%a7%86%e5%9b%be%e7%94%b1%e6%9d%a5.html" rel="bookmark" class="crp_title">v$和gv$来源</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/08/%e4%bd%bf%e7%94%a8oradebug%e4%bf%ae%e6%94%b9%e6%95%b0%e6%8d%ae%e5%ba%93scn.html" rel="bookmark" class="crp_title">使用oradebug修改数据库scn</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/03/%e5%85%b3%e4%ba%8e9i%e4%b8%adsga_max_size%e5%8f%82%e6%95%b0%e6%8f%8f%e8%bf%b0.html" rel="bookmark" class="crp_title">关于9I中sga_max_size参数描述</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/08/%e4%bf%ae%e6%94%b9props-nls_characterset%e5%af%bc%e8%87%b4ora-00900%e5%bc%82%e5%b8%b8%e6%81%a2%e5%a4%8d.html" rel="bookmark" class="crp_title">修改props$.NLS_CHARACTERSET导致ORA-00900异常恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2016/06/_use_single_log_writer%e5%92%8c_max_outstanding_log_writes.html" rel="bookmark" class="crp_title">_use_single_log_writer和_max_outstanding_log_writes</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/02/ora-00069.html" rel="bookmark" class="crp_title">ORA-00069: cannot acquire lock &#8212; table locks disabled for xxxx</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2012/10/dual-%e7%bc%ba%e5%b0%91%e5%90%8c%e4%b9%89%e8%af%8d%e8%a7%a3%e5%86%b3.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
