标签云
asm恢复 bbed bootstrap$ dul kcbzib_kcrsds_1 kccpb_sanity_check_2 kcratr_nab_less_than_odr MySQL恢复 ORA-00312 ORA-00704 ORA-00742 ORA-01110 ORA-01200 ORA-01555 ORA-01578 ORA-01595 ORA-600 2662 ORA-600 2663 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-600 kcratr_nab_less_than_odr ORA-600 kdsgrp1 ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 Oracle 恢复 ORACLE恢复 ORACLE数据库恢复 oracle 比特币 OSD-04016 YOUR FILES ARE ENCRYPTED 比特币加密文章分类
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (112)
- 数据库 (1,850)
- DB2 (22)
- MySQL (81)
- Oracle (1,678)
- Data Guard (53)
- EXADATA (8)
- GoldenGate (24)
- ORA-xxxxx (168)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (15)
- ORACLE 21C (3)
- Oracle 23ai (8)
- Oracle ASM (70)
- Oracle Bug (8)
- Oracle RAC (55)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (29)
- Oracle备份恢复 (638)
- Oracle安装升级 (105)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (90)
- PostgreSQL (37)
- pdu工具 (7)
- PostgreSQL恢复 (13)
- SQL Server (34)
- SQL Server恢复 (14)
- TimesTen (7)
- 达梦数据库 (4)
- 达梦恢复 (2)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (48)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (31)
-
最近发表
- Oracle故障第一现场被恢复混乱的数据库恢复
- impdp报ORA-39083 ORA-14102错误处理
- 一次断电引起的Oracle故障恢复-ora-600 2662故障
- OraScan(Oracle 碎片扫描工具) 使用说明
- .[xueyuanjie@onionmail.org].AIR勒索加密数据库恢复
- oracleasm createdisk破坏的acfs文件系统恢复
- 先offline数据文件,再resetlogs导致恢复复杂的故障处理
- exp dmp导入报IMP-00098: INTERNAL ERROR: impgst2故障处理
- Oracle 19c Grid Infrastructure Release Update-202604(19.31)
- Oracle Database 19c Release Update-202604(19.31)
- aix环境rac 私网直连导致haip启动异常
- 又一例TRIM导致asm磁盘数据丢失的故障
- 一次运气好的ORA-600 kcratr_nab_less_than_odr故障处理
- OraFHR快速open被勒索加密破坏的Oracle数据库
- obet一键恢复offline数据文件
- 记录一次win删除数据文件完美恢复案例
- Oracle典型故障:The controlfile header block returned by the OS has a sequence number that is too old
- 国产信创库fio破坏主备库以及备份故障处理
- .wman扩展名勒索mysql数据库恢复
- Oracle数据库被勒索加密一键open工具–OraFHR
标签归档:SEGMENT_TYPE TEMPORARY
type为TEMPORARY,name为file#.block#对象重现和清理
在数据库的使用中你可能注意到了,在某些情况下,可能出现某些segment的type为TEMPORARY,名字为file#.block#的格式的对象.这里我通过试验重现该对象并且给出清理方法
创建表空间/用户
SQL> create tablespace test datafile 2 '/u01/app/oracle/oracle/product/10.2.0/db_1/oradata/ora10g/test01.dbf' 3 size 128M autoextend on; Tablespace created. SQL> create user chf identified by oracle; User created. SQL> grant dba to chf; Grant succeeded.
创建模拟对象
本次通过一个index对象经过一些列操作使其变为我们需要的TEMPORARY对象
SQL> conn chf/oracle
Connected.
SQL> create table t_xifenfei tablespace test
2 as select * from dba_objects;
Table created.
SQL> create index idx_t_xifenfei on t_xifenfei(object_id) tablespace test;
Index created.
SQL> select header_file,header_block from DBA_SEGMENTS
2 where segment_name='IDX_T_XIFENFEI' AND OWNER='CHF';
HEADER_FILE HEADER_BLOCK
----------- ------------
5 267
破坏segment header
这里通过dd 把该block重置为空块,然后rman检查坏块,证明我们处理正常把index的segment header弄成了空块
SQL> select name from v$datafile where file#=5;
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oracle/product/10.2.0/db_1/oradata/ora10g/test01.dbf
SQL> conn / as sysdba
Connected.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
[oracle@xffdbrh5 ~]$ dd if=/dev/zero
>of=/u01/app/oracle/oracle/product/10.2.0/db_1/oradata/ora10g/test01.dbf
>bs=8192 count=1 seek=267 conv=notrunc
1+0 records in
1+0 records out
8192 bytes (8.2 kB) copied, 0.000100548 seconds, 81.5 MB/s
[oracle@xffdbrh5 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Dec 21 16:30:56 2015
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 901775360 bytes
Fixed Size 2024944 bytes
Variable Size 138414608 bytes
Database Buffers 759169024 bytes
Redo Buffers 2166784 bytes
Database mounted.
Database opened.
[oracle@xffdbrh5 ~]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Mon Dec 21 16:33:00 2015
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORA10G (DBID=4205072872)
RMAN> backup validate check logical datafile 5;
Starting backup at 21-DEC-15
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=144 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00005 name=/u01/app/oracle/oracle/product/10.2.0/db_1/oradata/ora10g/test01.dbf
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 21-DEC-15
RMAN> exit
Recovery Manager complete.
[oracle@xffdbrh5 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Dec 21 16:33:50 2015
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> select * from V$DATABASE_BLOCK_CORRUPTION ;
FILE# BLOCK# BLOCKS CORRUPTION_CHANGE# CORRUPTIO
---------- ---------- ---------- ------------------ ---------
5 267 1 0 ALL ZERO
index segment header异常
index异常后,通过rebuild报ora-08103错误
SQL> alter index chf.idx_t_xifenfei rebuild; alter index chf.idx_t_xifenfei rebuild * ERROR at line 1: ORA-08103: object no longer exists
重现TEMPORARY对象
通过删除index,然后发现了我们久违的TEMPORARY类型的对象出现
SQL> drop index chf.idx_t_xifenfei; Index dropped. SQL> col SEGMENT_NAME for a20 SQL> select segment_name,segment_type from user_segments; SEGMENT_NAME SEGMENT_TYPE -------------------- ------------------ T_XIFENFEI TABLE 5.267 TEMPORARY
清理TEMPORARY对象
SQL> CONN / AS SYSDBA
Connected.
SQL> exec dbms_space_admin.segment_corrupt('TEST',5,267);
PL/SQL procedure successfully completed.
SQL> exec dbms_space_admin.segment_drop_corrupt('TEST',5,267);
PL/SQL procedure successfully completed.
SQL> select segment_name,segment_type from DBA_SEGMENTS WHERE OWNER='CHF';
SEGMENT_NAME SEGMENT_TYPE
-------------------- ------------------
T_XIFENFEI TABLE
通过试验证明:当segment header异常,并且删除该对象,就会出现type为TEMPORARY,名字为file#.block#的格式的对象.我们可以通过dbms_space_admin包处理该类异常对象,让他们彻底从数据库中清除掉

加我微信(17813235971)
加我QQ(107644445)

