01
坏块概述
02
坏块检测
dbv help=y
DBVERIFY: Release 12.2.0.1.0 - Production on Tue Jan 19 17:24:26 2021
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
Keyword Description (Default)
----------------------------------------------------
FILE File to Verify (NONE)
START Start Block (First Block of File)
END End Block (Last Block of File)
BLOCKSIZE Logical Block Size (8192)
LOGFILE Output Log (NONE)
FEEDBACK Display Progress (0)
PARFILE Parameter File (NONE)
USERID Username/Password (NONE)
SEGMENT_ID Segment ID (tsn.relfile.block) (NONE)
HIGH_SCN Highest Block SCN To Verify (NONE)
(scn_wrap.scn_base OR scn)
dbv file=+DATADG/xxx/DATAFILE/system.1135.1061813741
blocksize=8192 USERID=sys/xxxx
logfile=system.1135.1061813741.1.log
03
坏块修复
RECOVER DATAFILE 8 BLOCK 13 DATAFILE 2 BLOCK 19;
RECOVER CORRUPTION LIST;(V$DATABASE_BLOCK_CORRUPTION)
By default, RMAN first searches for good blocks in the real-
time query physical standby database, then flashback logs
and then blocks in full or level 0 incremental backups.
<https://docs.oracle.com/database/121/BRADV/rcmblock.htm#BRADV89782>
REM Create the repair table in a given tablespace:
BEGIN
DBMS_REPAIR.ADMIN_TABLES (
TABLE_NAME => REPAIR_TABLE,
TABLE_TYPE => dbms_repair.repair_table,
ACTION => dbms_repair.create_action,
TABLESPACE => &tablespace_name);
END;
/
REM Identify corrupted blocks for schema.object (it also can be done at partition level with parameter PARTITION_NAME):
set serveroutput on
DECLARE num_corrupt INT;
BEGIN
num_corrupt := 0;
DBMS_REPAIR.CHECK_OBJECT (
SCHEMA_NAME => &schema_name,
OBJECT_NAME => &object_name,
REPAIR_TABLE_NAME => REPAIR_TABLE,
corrupt_count => num_corrupt);
DBMS_OUTPUT.PUT_LINE(number corrupt: || TO_CHAR (num_corrupt));
END;
/
REM Optionally display any corrupted block identified by check_object:
select BLOCK_ID, CORRUPT_TYPE, CORRUPT_DESCRIPTION
from REPAIR_TABLE;
REM Mark the identified blocks as corrupted
DECLARE num_fix INT;
BEGIN
num_fix := 0;
DBMS_REPAIR.FIX_CORRUPT_BLOCKS (
SCHEMA_NAME => &schema_name,
OBJECT_NAME=> &object_name,
OBJECT_TYPE => dbms_repair.table_object,
REPAIR_TABLE_NAME => REPAIR_TABLE,
FIX_COUNT=> num_fix);
DBMS_OUTPUT.PUT_LINE(num fix: || to_char(num_fix));
END;
/
REM Allow future DML statements to skip the corrupted blocks:
BEGIN
DBMS_REPAIR.SKIP_CORRUPT_BLOCKS (
SCHEMA_NAME => &schema_name,
OBJECT_NAME => &object_name,
OBJECT_TYPE => dbms_repair.table_object,
FLAGS => dbms_repair.SKIP_FLAG);
END;
/
alter system set events=10231 trace name context forever,level 10’;
alter system set events=10231 trace name context off;
04
总 结
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/129681.html
摘要:微软正在继续向提交潜在的新规范。微软方面表示,预计在未来几个月内完成规范,并在今年晚些时候推出。此外,微软还在推进另一个开放计算贡献的项目。去年年底,微软推出了加密微控制器标准。微软正在继续向Open Compute Project提交潜在的新规范。在美国圣何塞举行的Open Compute Project(OCP)美国峰会上,微软推出了Project Denali,一项用于SSD固件接口标...
摘要:记录总结一下的中引入图片路径的几种书写方式中静态资源的引入机制关于静态资源的官方文档静态资源可以通过两种方式进行处理在被导入或在中通过相对路径以开头被引用。如果是一个绝对路径,例如,它将会被保留不变。 vue --version 3.6.3记录总结一下的Vue中引入图片路径的几种书写方式 vue中静态资源的引入机制 Vue.js关于静态资源的官方文档 静态资源可以通过两种方式进行处理...
摘要:一总览本文章不对日志组件进行优劣评价,只是对关系进行对比。在日志中组件中存在这样的几种关系,这几种关系理解清楚,有助于我们对日志的引入和使用。 一、 总览 本文章不对日志组件进行优劣评价,只是对关系进行对比。在日志中组件中存在这样的几种关系, 这几种关系理解清楚, 有助于我们对日志的引入和使用。 showImg(https://segmentfault.com/img/bVbow7o?...
阅读 1249·2023-01-11 13:20
阅读 1557·2023-01-11 13:20
阅读 1011·2023-01-11 13:20
阅读 1680·2023-01-11 13:20
阅读 3971·2023-01-11 13:20
阅读 2519·2023-01-11 13:20
阅读 1310·2023-01-11 13:20
阅读 3486·2023-01-11 13:20