<?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-00900</title>
	<atom:link href="https://www.xifenfei.com/tag/ora-00900/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>Thu, 22 Oct 2026 15:45:06 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>修改props$.NLS_CHARACTERSET导致ORA-00900异常恢复</title>
		<link>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</link>
		<comments>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#comments</comments>
		<pubDate>Tue, 20 Aug 2013 14:24:29 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[非常规恢复]]></category>
		<category><![CDATA[ORA-00900]]></category>
		<category><![CDATA[update props$]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=4645</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <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">继续阅读 <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/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" target="_blank">修改props$.NLS_CHARACTERSET导致ORA-00900异常恢复</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>今天一朋友和我说他的数据库不能open,open过程提示ORA-00900错误,通过分析alert日志和props$表,发现他们修改了一个无效的NLS_CHARACTERSET值，导致数据库无法正常启动(准确的说，因为数据库里面该值无效，当数据库open的过程中，检测到控制文件指定的编码和该值不一致，然后修改控制文件的编码，修改之后，数据库一到mount状态执行任何语句都报ORA-00900错误),通过一些工具修改NLS_CHARACTERSET为正确值该故障解决<br />
<br />
<strong>重现ORA-00900故障</strong></p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
PL/SQL Release 11.2.0.3.0 - Production
CORE    11.2.0.3.0      Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production

SQL&gt; select value$ from props$ where name='NLS_CHARACTERSET';

VALUE$
-------------------------------------------------------
ZHS16GBK

SQL&gt; update props$ set value$='AL16UTF16' where name='NLS_CHARACTERSET';

1 row updated.

SQL&gt; commit;

Commit complete.

SQL&gt; alter database backup controlfile to trace as '/tmp/ora11g.ctl';

Database altered.

SQL&gt; shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL&gt; startup
ORACLE instance started.

Total System Global Area  175775744 bytes
Fixed Size                  1343668 bytes
Variable Size             117444428 bytes
Database Buffers           50331648 bytes
Redo Buffers                6656000 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00604: error occurred at recursive SQL level 1
ORA-00900: invalid SQL statement
Process ID: 5277
Session ID: 125 Serial number: 5

SQL&gt; startup nomount;
ORACLE instance started.

Total System Global Area  175775744 bytes
Fixed Size                  1343668 bytes
Variable Size             117444428 bytes
Database Buffers           50331648 bytes
Redo Buffers                6656000 bytes

SQL&gt; alter database mount;

Database altered.

SQL&gt; alter database open;
alter database open
*
ERROR at line 1:
ORA-00900: invalid SQL statement

SQL&gt;select * from dual;
select * from dual
*
ERROR at line 1:
ORA-00900: invalid SQL statement

SQL&gt; shutdown abort
ORACLE instance shut down.
</pre>
<p><strong>第一次startup(open)过程报错</strong></p>
<pre class="brush: bash; title: ; notranslate">
SMON: enabling tx recovery
Updating character set in controlfile to AL16UTF16
Errors in file /u01/oracle/diag/rdbms/ora11g/ora11g/trace/ora11g_ora_5277.trc:
ORA-00604: error occurred at recursive SQL level %s
ORA-00900: invalid SQL statementursive SQL level %s
Errors in file /u01/oracle/diag/rdbms/ora11g/ora11g/trace/ora11g_ora_5277.trc:
ORA-00604: error occurred at recursive SQL level %s
ORA-00900: invalid SQL statementursive SQL level %s
Error 604 happened during db open, shutting down database
USER (ospid: 5277): terminating the instance due to error 604
Errors in file /u01/oracle/diag/rdbms/ora11g/ora11g/trace/ora11g_smon_5243.trc:
ORA-00604: error occurred at recursive SQL level %s
ORA-00900: invalid SQL statementursive SQL level %s
Instance terminated by USER, pid = 5277
ORA-1092 signalled during: ALTER DATABASE OPEN...
opiodr aborting process unknown ospid (5277) as a result of ORA-1092
Sat May 18 00:44:27 2013
ORA-1092 : opitsk aborting process
</pre>
<p>这里比较明显的看到有一条(Updating character set in controlfile to AL16UTF16),正是由于这个操作，更新控制文件的编码为一个无效的编码，从而导致在后面数据库mount(加载控制文件)之后，就不能再进行其他任何操作<br />
<br />
<strong>解决思路</strong><br />
使用odu找出来block位置，或者在同版本库中查询<br />
使用dul或者bbed修改props$的NLS_CHARACTERSET值<br />
重建控制文件(noresetlogs方式)<br />
<br />
<strong>处理过程</strong></p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; shutdown abort
ORACLE instance shut down.

odu找出来block位置
dul或者bbed修改block值
重建控制文件(noresetlogs方式)

SQL&gt; startup
ORACLE instance started.

Total System Global Area  175775744 bytes
Fixed Size                  1343668 bytes
Variable Size             117444428 bytes
Database Buffers           50331648 bytes
Redo Buffers                6656000 bytes
Database mounted.
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '/u01/oracle/oradata/ora11g/system01.dbf'


SQL&gt; recover database;
Media recovery complete.
SQL&gt; alter database open;

Database altered.
</pre>
<p><strong>从oracle 9i开始，修改数据库的编码，直接使用alter database character set internal_use方式进行,而不要使用直接修改props$基表</strong>,更不能修改一个实际中不存在的编码值(本文中数据库编码和国家编码搞混淆从而出现该故障)</p>
<div id="crp_related"><ul><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/2013/09/%e8%ae%b0%e5%bd%95%e4%b8%80%e6%ac%a1%e6%95%b0%e6%8d%ae%e5%ba%93%e5%bc%82%e5%b8%b8%e5%af%bc%e8%87%b4ipc%e6%9c%aa%e9%87%8a%e6%94%be%e6%a1%88%e4%be%8b.html" rel="bookmark" class="crp_title">记录一次数据库异常导致ipc未释放案例</a></li><li style="list-style-type:decimal;font-size:11px;" ><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" rel="bookmark" class="crp_title">dual 缺少同义词故障解决</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/2013/08/%e9%87%8d%e5%bb%ba%e6%8e%a7%e5%88%b6%e6%96%87%e4%bb%b6%e4%b8%a2%e5%a4%b1undo%e5%bc%82%e5%b8%b8%e6%81%a2%e5%a4%8d-ora-01173%e6%a8%a1%e6%8b%9f%e4%b8%8e%e6%81%a2%e5%a4%8d.html" rel="bookmark" class="crp_title">重建控制文件丢失undo异常恢复&#8212;ORA-01173模拟与恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2019/01/tab-recovery-error.html" rel="bookmark" class="crp_title">tab$恢复错误汇总</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/2014/02/oracle-8-0-5-ora-01207%e6%95%85%e9%9a%9c%e6%81%a2%e5%a4%8d.html" rel="bookmark" class="crp_title">ORACLE 8.0.5 ORA-01207故障恢复</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/2014/10/%e6%95%b0%e6%8d%ae%e5%ba%93%e5%90%af%e5%8a%a8%e6%8a%a5ora-00704-ora-39714%e9%94%99%e8%af%af%e8%a7%a3%e5%86%b3.html" rel="bookmark" class="crp_title">数据库启动报ORA-00704 ORA-39714错误解决</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/2012/07/%e8%ae%b0%e5%bd%958-0-5%e6%95%b0%e6%8d%ae%e5%ba%93%e6%81%a2%e5%a4%8d%e8%bf%87%e7%a8%8b.html" rel="bookmark" class="crp_title">记录8.0.5数据库恢复过程</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>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/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
