<?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-00069</title>
	<atom:link href="https://www.xifenfei.com/tag/ora-00069/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>ORA-00069: cannot acquire lock &#8212; table locks disabled for xxxx</title>
		<link>https://www.xifenfei.com/2025/02/ora-00069.html</link>
		<comments>https://www.xifenfei.com/2025/02/ora-00069.html#comments</comments>
		<pubDate>Fri, 14 Feb 2025 13:10:43 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[ORA-xxxxx]]></category>
		<category><![CDATA[ORA-00069]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=11232</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2025/02/ora-00069.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/2025/02/ora-00069.html" target="_blank">ORA-00069: cannot acquire lock &#8212; table locks disabled for xxxx</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>在oracle数据库中删除用户遭遇ORA-00069: cannot acquire lock &#8212; table locks disabled for HR_XXX_01错误</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt;  drop user XFF cascade;
 drop user XFF cascade
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00069: cannot acquire lock -- table locks disabled for HR_XXX_01
</pre>
<p>关于ORA-00069错误解释</p>
<pre class="brush: bash; title: ; notranslate">
[oracle@xifenfei.com ~]$ oerr ora 00069
00069, 00000, &quot;cannot acquire lock -- table locks disabled for %s&quot;
// *Cause: A command was issued that tried to lock the table indicated in
//         the message. Examples of commands that can lock tables are:
//         LOCK TABLE, ALTER TABLE ... ADD (...), and so on.
// *Action: Use the ALTER TABLE ... ENABLE TABLE LOCK command, and retry
//          the command.
</pre>
<p>尝试lock表,直接hang,强制终止</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; alter table XFF.HR_XXX_01 enable table lock; 



^Calter table XFF.HR_XXX_01 enable table lock
*
ERROR at line 1:
ORA-01013: user requested cancel of current operation
</pre>
<p>查询tab$.flags的值</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; col object_name for a30
SQL&gt; set lines 150
SQL&gt; select x. object_name,obj#, flags
  2  from sys.tab$,(
  3  select object_name, object_id
  4  from dba_objects
  5  where owner='XFF'
  6  and object_name in ('HR_XXX_01','HR_XXXCONTROL','XXXLZB_JD1')
  7  and object_type = 'TABLE') x
  8  where obj# = x.object_id;

OBJECT_NAME                          OBJ#      FLAGS
------------------------------ ---------- ----------
XXXLZB_JD1                         246416 1073742353
HR_XXXCONTROL                      246421 1073742353
HR_XXX_01                          246424 1073742359
</pre>
<p>发现报错表的flags和其他表不一样(其他表为1073742353,而报错表为1073742359),对于这种情况官方给出来的解决方法,关闭库,确保没有任何额外会话连接上来<br />
<img src="https://www.xifenfei.com/wp-content/uploads/2025/02/ora-00069.png" alt="ora-00069" width="1026" height="281" class="alignleft size-full wp-image-11233" /><br />
<hr />
因为本身要重启库维护,直接把库启动到upgrade模式进行操作</p>
<pre class="brush: sql; title: ; notranslate">
[oracle@xifenfei.com ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Feb 14 20:29:28 2025
Version 19.24.0.0.0

Copyright (c) 1982, 2024, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.24.0.0.0

SQL&gt; alter system checkpoint;

System altered.

SQL&gt; /

System altered.

SQL&gt; shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL&gt; startup upgrade;
ORACLE instance started.

Total System Global Area 4.2950E+10 bytes
Fixed Size                 23149944 bytes
Variable Size            9529458688 bytes
Database Buffers         3.3286E+10 bytes
Redo Buffers              111067136 bytes
Database mounted.
Database opened.

SQL&gt; startup upgrade;
ORACLE instance started.

Total System Global Area 4.2950E+10 bytes
Fixed Size                 23149944 bytes
Variable Size            9529458688 bytes
Database Buffers         3.3286E+10 bytes
Redo Buffers              111067136 bytes
Database mounted.
Database opened.
SQL&gt;  drop user XFF cascade;
 drop user FZHR cascade
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00069: cannot acquire lock -- table locks disabled for HR_XXX_01


SQL&gt; alter table XFF.HR_XXX_01 enable table lock; 

Table altered.

SQL&gt;  drop user XFF cascade;

User dropped.

SQL&gt; 
</pre>
<div id="crp_related"><ul><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/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/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/07/oracle-11g%e7%9a%84ddl_lock_timeout%e5%8f%82%e6%95%b0.html" rel="bookmark" class="crp_title">Oracle 11G的DDL_LOCK_TIMEOUT参数</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/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/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/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/10/startup-migrate.html" rel="bookmark" class="crp_title">Startup Migrate</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/12/oracle-12c-varchar2%e6%94%af%e6%8c%8132k%e9%95%bf%e5%ba%a6%e5%ad%97%e7%ac%a6%e4%b8%b2.html" rel="bookmark" class="crp_title">ORACLE 12C varchar2支持32k长度字符串</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></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2025/02/ora-00069.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
