作者归档:惜分飞

ORA-00069: cannot acquire lock — table locks disabled for xxxx

在oracle数据库中删除用户遭遇ORA-00069: cannot acquire lock — table locks disabled for HR_XXX_01错误

SQL>  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

关于ORA-00069错误解释

[oracle@xifenfei.com ~]$ oerr ora 00069
00069, 00000, "cannot acquire lock -- table locks disabled for %s"
// *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.

尝试lock表,直接hang,强制终止

SQL> 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

查询tab$.flags的值

SQL> col object_name for a30
SQL> set lines 150
SQL> 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

发现报错表的flags和其他表不一样(其他表为1073742353,而报错表为1073742359),对于这种情况官方给出来的解决方法,关闭库,确保没有任何额外会话连接上来
ora-00069


因为本身要重启库维护,直接把库启动到upgrade模式进行操作

[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> alter system checkpoint;

System altered.

SQL> /

System altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> 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> 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>  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> alter table XFF.HR_XXX_01 enable table lock; 

Table altered.

SQL>  drop user XFF cascade;

User dropped.

SQL> 
发表在 ORA-xxxxx | 标签为 | 留下评论

ORA-600 [4000] [a]相关bug

ORA-600 [4000 ] [a]一般是这样的报错格式,其中[a] Undo segment number,类似错误主要bug以及对应的修复版本列表

Bug Fixed Description
26966120 18.18, 18.3, 19.1 PDML workload reports ORA-7445 [kdmsfree] / ORA-00600 [4000]
16761566 11.2.0.3.9, 11.2.0.3.BP22, 11.2.0.4, 12.1.0.2, 12.2.0.1 Instance fails to start with ORA-600 [4000] [usn#]
13910190 11.2.0.3.BP15, 11.2.0.4, 12.1.0.1 ORA-600 [4000] from plugged in tablespace in Exadata
37173201 Hitting ORA-600 [4000] during shutdown
36440495 19.26 SECURE FILE LOB CAUSING ORA-00600:[4000]
34547607 19.23, 23.4 [TXN MGMT LOCAL] ORA-600 [ktugct: corruption detected] w/ Compression & RAC DB Instances Crash
32800248 19.24, 23.4 DB:DISTRIB: Avoid ORA-600[4000]/ORA-600[4097] in the DB background RECO scenario.
35143304 19.24 consider converting ORA-600 [4000] to pdb-specific assert or soft assert
33343993 19.16 Convert ORA-600 [4000] to PDB Specific Assert and Crash Only the Affected PDB
32156194 19.12 ORA-600 [25027] during the select on x$ktcxb
32765471 aim:ORA-600 [4000] – kccpb_sanity_check
23030488 18.1 ORA-00600 [4000] During First Open of PDB After Undo Mode Switch
22610979 18.1 ORA-00600 [4000] On DB Close of STANDBY Due to MMON Process
21770222 12.2.0.1 ORA-600: [4000] in CDB
21379969 12.2.0.1 ORA-00600 [4000] after a tablespace is transported and plugged into another DB
20427315 12.2.0.1 ORA-600 [4000] While Performing DMLs In Freelist Segment
20407770 12.2.0.1 ORA-00600 [4000] error in CDB and DDL operations in PDBs
19352922 12.2.0.1 IMC: ORA-600[4000] may occur on HCC block
14741727 11.2.0.2.9, 11.2.0.2.BP19, 11.2.0.3.BP12, 11.2.0.3.BP13, 11.2.0.4, 12.1.0.1 Fixes for bug 12326708 and 14624146 can cause problems – backout fix
12619529 11.2.0.3.BP18, 11.2.0.4, 12.1.0.1 ORA-600[kdsgrp1] from SELECT on plugged in tablespace with FLASHBACK
10425010 11.2.0.3, 12.1.0.1 Stale data blocks may be returned by Exadata FlashCache
9145541 11.1.0.7.4, 11.2.0.1.2, 11.2.0.2, 12.1.0.1 OERI[25027]/OERI[4097]/OERI[4000]/ORA-1555 in plugged datafile after CREATE CONTROLFILE in 11g
12353983 11.2.0.1 ORA-600 [4000] with XA in RAC
7687856 11.2.0.1 ORA-600 [4000] from DML on transported ASSM tablespace
2917441 11.1.0.6 OERI [4000] during startup
3115733 9.2.0.5, 10.1.0.2 OERI[4000] / index corruption can occur during index coalesce
2959556 9.2.0.5, 10.1.0.2 STARTUP after an ORA-701 fails with OERI[4000]
1371820 8.1.7.4, 9.0.1.4, 9.2.0.1 OERI:4506 / OERI:4000 possible against transported tablespace
434596 7.3.4.2, 8.0.3.0 ORA-600[4000] from altering storage of BOOTSTRAP$
发表在 Oracle | 标签为 | 留下评论

sql server数据库“正在恢复”故障处理

客户的sql server数据库在未知情况下,突然不可用,然后查看发现数据库处于“正在恢复”状态,无法使用
zzhf


查看日志发现“错误:10982,严重性:16,状态:1”
rz

,
查看数据库文件情况
QQ20250210-201158

通过分析确认mdf文件本身完整,没有异常,强制挂载mdf文件如下错误
20250210182925

通过一些技巧进行规避,数据库挂载成功,并且checkdb检查正常,没有任何错误,至此完成该故障恢复
checkdb

发表在 SQL Server恢复 | 标签为 , , | 留下评论