<?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; ORA-00959</title>
	<atom:link href="https://www.xifenfei.com/tag/ora-00959/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, 27 Oct 2026 15:30:55 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>数据库open报ORA-00959: tablespace &#8216;UNDOTBS1&#8242; does not exist分析</title>
		<link>https://www.xifenfei.com/2022/05/open-db-ora-00959.html</link>
		<comments>https://www.xifenfei.com/2022/05/open-db-ora-00959.html#comments</comments>
		<pubDate>Wed, 11 May 2022 11:32:50 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[ORA-00959]]></category>
		<category><![CDATA[_corrupted_rollback_segments]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=9697</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2022/05/open-db-ora-00959.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/2022/05/open-db-ora-00959.html" target="_blank">数据库open报ORA-00959: tablespace &#8216;UNDOTBS1&#8242; does not exist分析</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>有一个朋友找到我,说数据库重启之后无法正常启动,提示ORA-00959 UNDOTBS1表空间不存在<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2022/05/ORA-00959-undotbs1.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2022/05/ORA-00959-undotbs1.jpg" alt="ORA-00959-undotbs1" width="1268" height="634" class="alignnone size-full wp-image-9698" /></a><br />
<hr />
在数据库的启动过程中,这个是一个很常见的错误,一般出现这类错误的原因是由于undo_tablespace指定的undo表空间不存在导致.但是这个库比较明显,设置了undo_management=manual, undo_tablespace=system,依旧数据库需要找undotbs1表空间,进一步分析数据库当前表空间情况<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2022/05/20220508224920.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2022/05/20220508224920.jpg" alt="20220508224920" width="649" height="315" class="alignnone size-full wp-image-9699" /></a><br />
<hr />
该数据库确实没有undotbs1表空间,基于以上信息,初步怀疑很可能是undo回滚段异常,通过对于oracle基表进行分析,发现信息<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2022/05/undo-tbs.png"><img src="https://www.xifenfei.com/wp-content/uploads/2022/05/undo-tbs.png" alt="undo-tbs" width="1037" height="339" class="alignnone size-full wp-image-9700" /></a><br />
<a href="https://www.xifenfei.com/wp-content/uploads/2022/05/undotbs1.png"><img src="https://www.xifenfei.com/wp-content/uploads/2022/05/undotbs1.png" alt="undotbs1" width="741" height="269" class="alignnone size-full wp-image-9701" /></a><br />
<hr />
基于上面的信息,可以确认回滚段中确实有四条记录指向被删除的undotbs1,而且还有一条undo回滚段信息为need recovery状态.进一步分析数据库alert日志</p>
<pre class="brush: bash; title: ; notranslate">
--创建undotbs2表空间,并重启数据库
Sun Sep 26 14:42:16 2021
create undo tablespace UNDOTBS2 datafile '/data/oradata/xifenfei/undotbs001.dbf' size 120G
reuse autoextend on next 500m maxsize unlimited
Sun Sep 26 14:46:46 2021
Completed: create undo tablespace UNDOTBS2 datafile '/data/oradata/xifenfei/undotbs001.dbf' size 120G
reuse autoextend on next 500m maxsize unlimited
Sun Sep 26 14:47:13 2021
[16927] Successfully onlined Undo Tablespace 10.
[16927] **** active transactions found in undo Tablespace 2 - moved to Pending Switch-Out state.
[16927] active transactions found/affinity dissolution incompletein undo tablespace 2 during switch-out.
ALTER SYSTEM SET undo_tablespace='UNDOTBS2' SCOPE=BOTH;
Sun Sep 26 14:49:25 2021
Shutting down instance (immediate)
Shutting down instance: further logons disabled
Stopping background process QMNC

---第一次尝试删除undotbs1失败
Sun Sep 26 15:06:30 2021
drop tablespace UNDOTBS1 INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS
Sun Sep 26 15:47:26 2021
ORA-1013 signalled during: drop tablespace UNDOTBS1 INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS
...
Sun Sep 26 15:48:40 2021
Shutting down instance (immediate)
Shutting down instance: further logons disabled
Stopping background process QMNC

--加上该隐含参数,继续重启库删除undotbs1,依旧删除失败
  _corrupted_rollback_segments= &quot;_SYSSMU28_1306132068$&quot;

Sun Sep 26 15:53:34 2021
QMNC started with pid=31, OS id=20454 
Completed: ALTER DATABASE OPEN
Sun Sep 26 15:55:32 2021
 drop tablespace UNDOTBS1 INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS
…………
Sun Sep 26 16:45:47 2021
ORA-1013 signalled during:  drop tablespace UNDOTBS1 INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS...
Sun Sep 26 16:46:00 2021
Shutting down instance (immediate)
Shutting down instance: further logons disabled
Stopping background process QMNC

---加上以下参数，并尝试重启数据库删除undotbs1成功
  _corrupted_rollback_segments= &quot;_SYSSMU31_201790566$&quot;
  _corrupted_rollback_segments= &quot;_SYSSMU30_2395098326$&quot;
  _corrupted_rollback_segments= &quot;_SYSSMU29_306369076$&quot;
  _corrupted_rollback_segments= &quot;_SYSSMU28_1306132068$&quot;

Sun Sep 26 16:47:24 2021
QMNC started with pid=31, OS id=23421 
Completed: ALTER DATABASE OPEN
Sun Sep 26 16:47:40 2021
drop tablespace UNDOTBS1 INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS
…………
Mon Sep 27 01:44:56 2021
Deleted file /data/oradata/xifenfei/undotbs01.dbf
Deleted file /data/oradata/xifenfei/undotbs02.dbf
Deleted file /data/oradata/xifenfei/undotbs03.dbf
Deleted file /data/oradata/xifenfei/undotbs04.dbf
Deleted file /data/oradata/xifenfei/undotbs05.dbf
Deleted file /data/oradata/xifenfei/undotbs06.dbf
Completed: drop tablespace UNDOTBS1 INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS
</pre>
<p>从这里基本上可以看出来,操作之人非常草率,在oracle回滚段还在被占用状态,直接尝试删除老undo表空间,在无法删除之后,直接暴力的使用undo回滚段异常参数,然后进行undo表空间删除.这样操作的后果屏蔽了事务的一致性,导致后续可能导致数据库一系列异常.对当前库启动过程进行跟踪发现<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2022/05/20220511192523.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2022/05/20220511192523.jpg" alt="20220511192523" width="1144" height="449" class="alignnone size-full wp-image-9702" /></a><br />
<hr />
数据库启动的过程中查询undo$中的undotbs1信息,而该表空间不存在,所以出现此类报错,从而导致数据库无法正常启动.知道问题原因所在,那通过undo$记录,数据库即可正常启动.</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/07/drop-tablesapce-recovery.html" rel="bookmark" class="crp_title">drop tablesapce 数据恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2022/04/drop-tablespace-recovery.html" rel="bookmark" class="crp_title">分享运气超级好的一次drop tablespace 数据恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2024/09/drop-tablespace-xxx-including-contents-recovery.html" rel="bookmark" class="crp_title">drop tablespace xxx including contents恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/06/oracle%e5%9c%a8%e7%ba%bf%e5%88%87%e6%8d%a2undo%e8%a1%a8%e7%a9%ba%e9%97%b4.html" rel="bookmark" class="crp_title">ORACLE在线切换undo表空间</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/05/11-2-0-4-psu-service-not-start.html" rel="bookmark" class="crp_title">win 11.2.0.4打patch后服务无法正常启动处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/12/lockbit-recovery-xmltype.html" rel="bookmark" class="crp_title">LockBit病毒oracle数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/03/star-newemail-tg-devos.html" rel="bookmark" class="crp_title">[star-new@email.tg].Devos加密数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2022/05/asm-drop-tbs-recovery.html" rel="bookmark" class="crp_title">ASM删除表空间恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/10/makop-recovery.html" rel="bookmark" class="crp_title">.makop加密数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/12/40t-blackmail-oracle-recovery.html" rel="bookmark" class="crp_title">40T勒索加密Oracle数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/06/datapump-network_link-ora-12899.html" rel="bookmark" class="crp_title">datapump network_link遭遇ORA-12899错误</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/05/sqlplus-segmentation-fault.html" rel="bookmark" class="crp_title">sqlplus 报 Segmentation Fault故障分析</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2022/05/open-db-ora-00959.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
