nkj827
作者nkj827·2020-04-30 21:29
项目经理·长春长信华天

oracle故障处理

字数 2653阅读 743评论 0赞 3

检验数据文件

dbv file=E:\OracleFiles\DatabaseFiles\WWW\TBS01.DBF

C:\Documents and Settings\www>dbv file=E:\OracleFiles\DatabaseFiles\WWW\TBS01.DBF

DBVERIFY: Release 10.2.0.1.0 - Production on 星期四 6 月 26 11:00:57 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.

DBVERIFY - 开始验证: FILE = E:\OracleFiles\DatabaseFiles\WWW\TBS01.DBF

页 12 标记为损坏

Corrupt block relative dba: 0x02c0000c (file 11, block 12)

Bad check value found during dbv:

Data in bad block:

type: 6 format: 2 rdba: 0x02c0000c

last change scn: 0x0000.00138635 seq: 0x2 flg: 0x04

spare1: 0x0 spare2: 0x0 spare3: 0x0

consistency value in tail: 0x86350602

check value in block header: 0x892b

computed block checksum: 0xc51

DBVERIFY - 验证完成

检查的页总数: 128

处理的页总数 (数据): 4

失败的页总数 (数据): 0

处理的页总数 (索引): 0

失败的页总数 (索引): 0

处理的页总数 (其它): 11

处理的总页数 (段) : 0

失败的总页数 (段) : 0

空的页总数: 112

标记为损坏的总页数: 1

流入的页总数: 0

最高块 SCN : 1279736 (0.1279736)

运用 DBVERIFY 工具验证数据

结合 1 10231 事件来导出导入丢弃损坏数据块

exp test/test file=users.dmp tables=users

C:\Documents and Settings\www>exp test/test file=users.dmp tables=users

Export: Release 10.2.0.1.0 - Production on 星期四 6 月 26 11:02:27 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.

连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集

即将导出指定的表通过常规路径...

. . 正在导出表 USERS

EXP-00056: 遇到 ORACLE 错误 1578

ORA-01578: ORACLE 数据块损坏 (文件号 11, 块号 12)

ORA-01110: 数据文件 11: 'E:\ORACLEFILES\DATABASEFILES\WWW\TBS01.DBF'

导出成功终止, 但出现警告。

导出失败,因为导出时也会全表扫描从而引发错误

第 25 页

alter system set events='10231 trace name context forever,level 10';

可使导出或 SELECT...AS 时全表扫描时跳过标记错误的数据块

exp test/test file=users.dmp tables=users

C:\Documents and Settings\www>exp test/test file=users.dmp tables=users

Export: Release 10.2.0.1.0 - Production on 星期四 6 月 26 11:06:52 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.

连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集

即将导出指定的表通过常规路径...

. . 正在导出表 USERS 导出了 23 行

成功终止导出, 没有出现警告。

drop table users;

imp test/test file=users.dmp tables=users

C:\Documents and Settings\www>imp test/test file=users.dmp tables=users

Import: Release 10.2.0.1.0 - Production on 星期四 6 月 26 11:10:15 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.

连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

经由常规路径由 EXPORT:V10.02.01 创建的导出文件

已经完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的导入

. 正在将 TEST 的对象导入到 TEST

. 正在将 TEST 的对象导入到 TEST

. . 正在导入表 "USERS"导入了 23 行

成功终止导入, 没有出现警告。

select count(*) from users;

COUNT(*)


23

由于一个数据块丢弃,从而恢复了部分数据

如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

3

添加新评论0 条评论

Ctrl+Enter 发表

作者其他文章

相关资料

X社区推广