<?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; 19c undo异常</title>
	<atom:link href="https://www.xifenfei.com/tag/19c-undo%e5%bc%82%e5%b8%b8/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>Tue, 17 Nov 2026 13:36:46 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>模拟19c数据库pdb undo异常恢复</title>
		<link>https://www.xifenfei.com/2020/11/19c-pdb-undo-lost-recovery.html</link>
		<comments>https://www.xifenfei.com/2020/11/19c-pdb-undo-lost-recovery.html#comments</comments>
		<pubDate>Mon, 16 Nov 2020 16:02:38 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[19c undo异常]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=8900</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2020/11/19c-pdb-undo-lost-recovery.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/2020/11/19c-pdb-undo-lost-recovery.html" target="_blank">模拟19c数据库pdb undo异常恢复</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>对于19c在pdb情况下三种常见故障进行了模拟测试:<br />
<a href="https://www.xifenfei.com/2020/11/19c-redo-lost-recovery.html" title="模拟19c数据库redo异常恢复">模拟19c数据库redo异常恢复</a><br />
<a href="https://www.xifenfei.com/2020/11/19c-pdb-undo-lost-recovery.html" title="模拟19c数据库pdb undo异常恢复" rel="noopener" target="_blank">模拟19c数据库pdb undo异常恢复</a><br />
<a href="https://www.xifenfei.com/2020/11/19c-root-pdb-undo-lost-recovery.html" title="模拟19c数据库root pdb undo异常恢复" rel="noopener" target="_blank">模拟19c数据库root pdb undo异常恢复</a><br />
测试在有事务的情况下,删除pdb中的undo数据库异常情况测试<br />
会话1在root pdb中删除表记录,不提交</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; show pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB                            READ WRITE NO
SQL&gt; delete from system.t_xifenfei;

2316160 rows deleted.

</pre>
<p>会话2在pdb中删除表记录,不提交</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; conn xff/oracle@127.0.0.1/pdb
Connected.
SQL&gt; delete from xff.t_xifenfei;

72351 rows deleted.

</pre>
<p>会话3 直接abort库</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; shutdown abort;
ORACLE instance shut down.

</pre>
<p>删除pdb中undo文件</p>
<pre class="brush: bash; title: ; notranslate">
[oracle@localhost pdb]$ rm -rf undotbs01.dbf 
[oracle@localhost pdb]$ 

</pre>
<p>启动数据库</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; startup
ORACLE instance started.

Total System Global Area 4999609088 bytes
Fixed Size                  9145088 bytes
Variable Size             905969664 bytes
Database Buffers         4076863488 bytes
Redo Buffers                7630848 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 11 - see DBWR trace file
ORA-01110: data file 11: '/u01/app/oracle/oradata/ORA19C/pdb/undotbs01.dbf'
</pre>
<p>offline异常文件,再open库</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; alter database datafile 11 offline drop;
alter database datafile 11 offline drop
*
ERROR at line 1:
ORA-01516: nonexistent log file, data file, or temporary file &quot;11&quot; in the current container

SQL&gt; show pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       MOUNTED
         3 PDB                            MOUNTED
SQL&gt; alter session set container=pdb;

Session altered.

SQL&gt; alter database datafile 11 offline drop;

Database altered.

SQL&gt; conn / as sysdba
Connected.

SQL&gt; startup 
ORACLE instance started.

Total System Global Area 4999609088 bytes
Fixed Size                  9145088 bytes
Variable Size             905969664 bytes
Database Buffers         4076863488 bytes
Redo Buffers                7630848 bytes
Database mounted.
Database opened.

</pre>
<p>open pdb</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; alter session set container=pdb;

Session altered.

SQL&gt; 
SQL&gt; alter database open;

Database altered.

SQL&gt; conn / as sysdba
Connected.
SQL&gt; show pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB                            READ WRITE NO
</pre>
<p>测试中库open比较简单,后续只要对异常undo进行处理即可</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; create undo tablespace undotbs2 datafile '/u01/app/oracle/oradata/ORA19C/pdb/undotbs02.dbf' size 128M autoextend on;

Tablespace created.

SQL&gt; alter system set undo_tablespace=undotbs2;

System altered.

SQL&gt; select tablespace_name,segment_name,status from dba_rollback_segs;

TABLESPACE_NAME                SEGMENT_NAME                   STATUS
------------------------------ ------------------------------ --------------------------------
SYSTEM                         SYSTEM                         ONLINE
UNDOTBS1                       _SYSSMU1_3588498444$           NEEDS RECOVERY
UNDOTBS1                       _SYSSMU2_2971032042$           NEEDS RECOVERY
UNDOTBS1                       _SYSSMU3_3657342154$           NEEDS RECOVERY
UNDOTBS1                       _SYSSMU4_811969446$            NEEDS RECOVERY
UNDOTBS1                       _SYSSMU5_3018429039$           NEEDS RECOVERY
UNDOTBS1                       _SYSSMU6_442110264$            NEEDS RECOVERY
UNDOTBS1                       _SYSSMU7_2728255665$           NEEDS RECOVERY
UNDOTBS1                       _SYSSMU8_801938064$            NEEDS RECOVERY
UNDOTBS1                       _SYSSMU9_647420285$            NEEDS RECOVERY
UNDOTBS1                       _SYSSMU10_2262159254$          NEEDS RECOVERY

SQL&gt;  drop tablespace undotbs1 including contents and datafiles;

Tablespace dropped.

</pre>
<p>在测试中,undo有事务的情况下,数据库可以正常open,而且运行了一段时间未crash,在这个方面确实比11g及其以前版本有很大改进.当然由于测试环境本身比较单一,可能实际生产中会此类故障处理比较复杂</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/11/19c-root-pdb-undo-lost-recovery.html" rel="bookmark" class="crp_title">模拟19c数据库root pdb undo异常恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/11/19c-redo-lost-recovery.html" rel="bookmark" class="crp_title">模拟19c数据库redo异常恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2016/07/oracle-12c-undo-failure-recovery-root-pdb.html" rel="bookmark" class="crp_title">Oracle 12c undo异常处理&#8212;root pdb undo异常</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2024/05/oracle-23ai-rm-redo-log-recovery.html" rel="bookmark" class="crp_title">Oracle 23ai rm redo*.log恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2014/11/%e8%ae%be%e7%bd%aepdb%e9%9a%8fcdb%e4%b8%80%e8%b5%b7%e5%90%af%e5%8a%a8.html" rel="bookmark" class="crp_title">设置pdb随cdb一起启动</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2014/02/oracle%e5%90%84%e7%a7%8d%e6%96%87%e4%bb%b6%e4%b8%a2%e5%a4%b1%e6%81%a2%e5%a4%8d.html" rel="bookmark" class="crp_title">ORACLE丢失各种文件导致数据库不能OPEN恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/11/bbed%e6%89%93%e5%bc%80%e4%b8%a2%e5%a4%b1%e9%83%a8%e5%88%86system%e6%95%b0%e6%8d%ae%e6%96%87%e4%bb%b6%e5%ba%93.html" rel="bookmark" class="crp_title">bbed打开丢失部分system数据文件库</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/08/rename-sys-ora-01092-ora-00600-kokasgi1%e9%94%99%e8%af%af.html" rel="bookmark" class="crp_title">重命名sys用户引起数据库启动报ORA-01092 ORA-00600 kokasgi1错误</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2014/03/oracle-12c-%e6%8e%a7%e5%88%b6%e6%96%87%e4%bb%b6%e5%bc%82%e5%b8%b8%e6%81%a2%e5%a4%8d.html" rel="bookmark" class="crp_title">ORACLE 12C 控制文件异常恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/06/undo%e6%8d%9f%e5%9d%8f%e6%81%a2%e5%a4%8d-%e6%97%a0%e4%ba%8b%e5%8a%a1.html" rel="bookmark" class="crp_title">undo损坏恢复–无事务</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/09/ora-01113-ora-01110.html" rel="bookmark" class="crp_title">一键恢复ORA-01113 ORA-01110&#8212;Oracle Recovery Tools</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2024/12/oracle-filename-enter-key.html" rel="bookmark" class="crp_title">解决oracle数据文件路径有回车故障</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2020/11/19c-pdb-undo-lost-recovery.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
