<?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; 12c oradebug poke</title>
	<atom:link href="https://www.xifenfei.com/tag/12c-oradebug-poke/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>Sun, 25 Oct 2026 13:02:42 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>oradebug poke ORA-32521/ORA-32519故障解决</title>
		<link>https://www.xifenfei.com/2016/07/oradebug-poke-ora-32521-ora-32519.html</link>
		<comments>https://www.xifenfei.com/2016/07/oradebug-poke-ora-32521-ora-32519.html#comments</comments>
		<pubDate>Wed, 06 Jul 2016 17:36:01 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[Oracle备份恢复]]></category>
		<category><![CDATA[12c oradebug poke]]></category>
		<category><![CDATA[ORA-32519]]></category>
		<category><![CDATA[ORA-32521]]></category>
		<category><![CDATA[oradebug ORA-32519]]></category>
		<category><![CDATA[oradebug poke]]></category>
		<category><![CDATA[oradebug scn]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=6459</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2016/07/oradebug-poke-ora-32521-ora-32519.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/2016/07/oradebug-poke-ora-32521-ora-32519.html" target="_blank">oradebug poke ORA-32521/ORA-32519故障解决</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>最近有不少朋友咨询12.1.0.2及其以后的版本使用oradebug去修改scn失败,这里做了一个测试正常情况下确实无法修改(oradebug poke报 ORA-32519 或者 ORA-32521) ,这里进行了一系列修改测试最后修改成功.<br />
开发的小工具:<a href="https://www.xifenfei.com/2022/06/win-oracle-scn-patch.html" title="修改oracle scn小工具(patch scn)" rel="noopener" target="_blank">修改oracle scn小工具(patch scn)</a>，可以快速解决该问题<br />
<strong>数据库版本</strong></p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; select * from v$version;

BANNER                                                                               CON_ID
-------------------------------------------------------------------------------- ----------
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production              0
PL/SQL Release 12.1.0.2.0 - Production                                                    0
CORE    12.1.0.2.0      Production                                                        0
TNS for 64-bit Windows: Version 12.1.0.2.0 - Production                                   0
NLSRTL Version 12.1.0.2.0 - Production                                                    0
</pre>
<p><strong>oradebug poke测试</strong></p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; oradebug setmypid
已处理的语句
SQL&gt; oradebug DUMPvar SGA kcsgscn_
kcslf kcsgscn_ [14C8D6270, 14C8D62A0) = 009EA333 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 4C8D5CF0 00000001
SQL&gt; oradebug poke 0x14C8D6274 4 0x00000001
ORA-32521: 对 ORADEBUG 命令  进行语法分析时出错

--或者该提示
SQL&gt; oradebug setmypid
已处理的语句
SQL&gt; oradebug DUMPvar SGA kcsgscn_
kcslf kcsgscn_ [14C8D6270, 14C8D62A0) = 009EAE3D 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 4C8D5CF0 00000001
SQL&gt; oradebug poke 0x14C8D6274 4 0x0000000a
ORA-32519: 权限不足, 无法执行 ORADEBUG 命令: execution of ORADEBUG commands is disabled for this instance
</pre>
<p>通过测试确定oradebug正常情况无法执行poke,不是提示ORA-32521就是提示ORA-32519错误导致scn无法修改.<br />
<br />
<strong>通过一些修改之后oradebug 修改scn</strong></p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; select dbid, name,open_mode,
  2         created created,
  3         open_mode, log_mode,
  4         checkpoint_change# as checkpoint_change#,
  5         controlfile_type ctl_type,
  6         controlfile_created ctl_created,
  7         controlfile_change# as ctl_change#,
  8         controlfile_time ctl_time,
  9         resetlogs_change# as resetlogs_change#,
 10         resetlogs_time resetlogs_time
 11  from v$database;

      DBID NAME                                                 OPEN_MODE            CREATED        OPEN_MODE
 LOG_MODE
---------- ---------------------------------------------------- -------------------- -------------- ------------
 ------------
CHECKPOINT_CHANGE# CTL_TYP CTL_CREATED    CTL_CHANGE# CTL_TIME       RESETLOGS_CHANGE# RESETLOGS_TIME
------------------ ------- -------------- ----------- -------------- ----------------- --------------
1504692401 XIFENFEI                                             READ WRITE           16-8月 -15     READ WRITE
 ARCHIVELOG
          10407853 CURRENT 16-8月 -15        10408361 07-7月 -16                     1 16-8月 -15


SQL&gt; select con_id,file#,checkpoint_change# from v$datafile_header;

    CON_ID      FILE# CHECKPOINT_CHANGE#
---------- ---------- ------------------
         1          1           10407853
         2          2            9457324
         1          3           10407853
         2          4            9457324
         1          5           10407853
         1          6           10407853
         3          7           10407853
         3          8           10407853
         3          9           10407853
         4         10            9559964
         4         11            9559964
         4         12            9559964
         3         13           10407853

已选择 13 行。

SQL&gt; shutdown abort;
ORACLE 例程已经关闭。
SQL&gt; startup
ORACLE 例程已经启动。

Total System Global Area 3221225472 bytes
Fixed Size                  3837232 bytes
Variable Size             838861520 bytes
Database Buffers         2365587456 bytes
Redo Buffers               12939264 bytes
数据库装载完毕。
SQL&gt; oradebug setmypid
已处理的语句
SQL&gt; oradebug DUMPvar SGA kcsgscn_
kcslf kcsgscn_ [14BE16270, 14BE162A0) = 009ED5C6 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 4BE15CF0 00000001
SQL&gt; oradebug poke 0x14BE16274 4 0x0001
BEFORE: [14BE16274, 14BE16276) = 0000
AFTER: [14BE16274, 14BE16276) = 0001
SQL&gt; alter database open;

数据库已更改。

SQL&gt; select dbid, name,open_mode,
  2         created created,
  3         open_mode, log_mode,
  4         checkpoint_change# as checkpoint_change#,
  5         controlfile_type ctl_type,
  6         controlfile_created ctl_created,
  7         controlfile_change# as ctl_change#,
  8         controlfile_time ctl_time,
  9         resetlogs_change# as resetlogs_change#,
 10         resetlogs_time resetlogs_time
 11  from v$database;

      DBID NAME                                                 OPEN_MODE            CREATED        OPEN_MODE
 LOG_MODE
---------- ---------------------------------------------------- -------------------- -------------- -----------
 ------------
CHECKPOINT_CHANGE# CTL_TYP CTL_CREATED    CTL_CHANGE# CTL_TIME       RESETLOGS_CHANGE# RESETLOGS_TIME
------------------ ------- -------------- ----------- -------------- ----------------- --------------
1504692401 XIFENFEI                                             READ WRITE           16-8月 -15     READ WRITE
 ARCHIVELOG
        4305478053 CURRENT 16-8月 -15      4305478245 07-7月 -16                     1 16-8月 -15



SQL&gt; select con_id,file#,checkpoint_change# from v$datafile_header;

    CON_ID      FILE# CHECKPOINT_CHANGE#
---------- ---------- ------------------
         1          1         4305478053
         2          2            9457324
         1          3         4305478053
         2          4            9457324
         1          5         4305478053
         1          6         4305478053
         3          7         4305478053
         3          8         4305478053
         3          9         4305478053
         4         10            9559964
         4         11            9559964
         4         12            9559964
         3         13         4305478053

已选择 13 行。

SQL&gt; select con_id,file#,checkpoint_change# from v$datafile;

    CON_ID      FILE# CHECKPOINT_CHANGE#
---------- ---------- ------------------
         1          1         4305478053
         2          2            9457324
         1          3         4305478053
         2          4            9457324
         1          5         4305478053
         1          6         4305478053
         3          7         4305478053
         3          8         4305478053
         3          9         4305478053
         4         10            9559964
         4         11            9559964
         4         12            9559964
         3         13         4305478053

已选择 13 行。
</pre>
<p>通过上述测试证明scn已经被完美修改.证明我们已经具备了不使用bbed的情况下推进12.1.0.2版本的scn问题,为12c的一系列需要推scn的恢复提供完美技术支持.</p>
<div id="crp_related"><ul><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/2024/02/ora-00283-ora-16433-start-recovery.html" rel="bookmark" class="crp_title">从ORA-00283 ORA-16433报错开始恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/01/dd%e6%93%8d%e4%bd%9c%e6%95%b0%e6%8d%ae%e6%96%87%e4%bb%b6.html" rel="bookmark" class="crp_title">dd操作数据文件</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2024/06/patch-scn-for-linux.html" rel="bookmark" class="crp_title">Patch SCN工具for Linux</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/02/cdm-ora-600-kcbzib_kcrsds_1.html" rel="bookmark" class="crp_title">CDM备份缺少归档打开数据库报ORA-600 kcbzib_kcrsds_1故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/06/oracle-12c-cdb%e4%b8%adpdb%e5%8f%82%e6%95%b0%e7%ae%a1%e7%90%86%e6%9c%ba%e5%88%b6.html" rel="bookmark" class="crp_title">ORACLE 12C CDB中PDB参数管理机制</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/ora-600-kcbzib_kcrsds_1-202501.html" rel="bookmark" class="crp_title">2025年首个故障恢复&#8212;ORA-600 kcbzib_kcrsds_1</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/12/%e5%9c%a8ultraedit%e4%b8%ad%e5%ae%9a%e4%bd%8d%e6%95%b0%e6%8d%ae%e6%96%87%e4%bb%b6%e5%86%85%e5%ae%b9.html" rel="bookmark" class="crp_title">在UltraEdit中定位数据文件内容</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/05/%e7%b3%bb%e7%bb%9f%e4%b8%ad%e6%95%b0%e6%8d%ae%e6%96%87%e4%bb%b6%e7%ac%ac%e4%b8%80%e4%b8%aa%e6%95%b0%e6%8d%ae%e5%9d%97%e5%92%8coracle-%e4%b8%ad%e7%ac%ac%e4%b8%80%e4%b8%aa%e6%95%b0%e6%8d%ae%e5%9d%97.html" rel="bookmark" class="crp_title">系统中数据文件第一个数据块和oracle 中第一个数据块关系</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2022/10/oracle-scn-patch-upgrade-202210.html" rel="bookmark" class="crp_title">一键修改Oracle SCN工具升级(patch scn)</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/05/bbed%e5%a4%84%e7%90%86ora-01200%e6%95%85%e9%9a%9c.html" rel="bookmark" class="crp_title">bbed处理ORA-01200故障</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/12/ora-00603-ora-01092-ora-600-kcbzib_kcrsds_1.html" rel="bookmark" class="crp_title">ORA-00603  ORA-01092 ORA-600 kcbzib_kcrsds_1</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2016/07/oradebug-poke-ora-32521-ora-32519.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
