01
问题背景
02
坏块修复
lspv -l hdisk5
hdisk5:
LV NAME LPs PPs DISTRIBUTION MOUNT POINT
rac_data28_32g 32 32 00..00..00..32..00 N/A
rac_data27_32g 32 32 00..00..00..32..00 N/A
rac_data26_32g 32 32 29..00..00..03..00 N/A
rac_data25_32g 32 32 32..00..00..00..00 N/A
rac_data32_32g 32 32 00..00..00..32..00 N/A
rac_data31_32g 32 32 00..00..00..32..00 N/A
rac_da40_32g 32 32 00..00..00..32..00 N/A
rac_data29_32g 32 32 00..00..00..32..00 N/A
rac_data34_32g 32 32 00..00..00..32..00 N/A
rac_data33_32g 32 32 00..00..00..32..00 N/A
rac_data4_32g 32 32 00..32..00..00..00 N/A
rac_data37_32g 32 32 00..00..00..00..32 N/A
rac_data2_32g 32 32 00..32..00..00..00 N/A
rac_data38_32g 32 32 00..00..00..00..32 N/A
rac_data3_32g 32 32 00..32..00..00..00 N/A
rac_data35_32g 32 32 00..00..00..32..00 N/A
rac_redo2_3 1 1 00..01..00..00..00 N/A
dbv file=/dev/rac_da40_32g blocksize=8192
DBVERIFY: Release 10.2.0.3.0 - Production on Sun Dec 19 13:44:35 2021
Copyright (c) 1982, 2005, Oracle. All rights reserved.
DBVERIFY - Verification starting : FILE = /dev/rac_da40_32g
DBVERIFY - Verification complete
Total Pages Examined : 4194303
Total Pages Processed (Data) : 295443
Total Pages Failing (Data) : 0
Total Pages Processed (Index): 119458
Total Pages Failing (Index): 0
Total Pages Processed (Other): 3777343
Total Pages Processed (Seg) : 0
Total Pages Failing (Seg) : 0
Total Pages Empty : 1932
Total Pages Marked Corrupt : 127
Total Pages Influx : 0
Highest block SCN : 2559490068 (2.2559490068)
dd if=/dev/rac_da40_32g of=/archive/rac_da40_32g.dbf bs=8k
skip=8 count=4194296
RMAN> copy datafile /dev/rrac_data40_32g to /migrate/recover_backup/rrac_data40_32g.dbf;
Starting backup at 19-DEC-21
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=5085 instance=oadb1 devtype=DISK
channel ORA_DISK_1: starting datafile copy
input datafile fno=00163 name=/dev/rrac_da62_32g
output filename=/migrate/recover_backup/rrac_data40_32g.dbf tag=TAG20211219T132823 recid=232 stamp=1091712654
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:35
Finished backup at 19-DEC-21
2.2.3 主库用rman备份到文件系统作为备用,防止备库数据文件不可用
RMAN> copy datafile /dev/rrac_data40_32g to
/migrate/recover_backup/backup_rrac_da40_32g.dbf;
lslv rac_da40_32g
LOGICAL VOLUME: rac_da40_32g VOLUME GROUP: datavg2
LV IDENTIFIER: 00f7275700004c000000013b08bcea61.40 PERMISSION: read/write
VG STATE: active/complete LV STATE: closed/syncd
TYPE: raw WRITE VERIFY: off
MAX LPs: 512 PP SIZE: 64 megabyte(s)
COPIES: 1 SCHED POLICY: striped
LPs: 512 PPs: 512
STALE PPs: 0 BB POLICY: relocatable
INTER-POLICY: maximum RELOCATABLE: no
INTRA-POLICY: middle UPPER BOUND: 16
MOUNT POINT: N/A LABEL: None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes (superstrict)
Serialize IO ?: NO
STRIPE WIDTH: 16
STRIPE SIZE: 512k
DEVICESUBTYPE : DS_LVZ
2.4 恢复数据文件到新盘
dd if=/archive/rac_da40_32g.dbf of=/dev/rrac_da40_32g bs=8k seek=8
4194296+0 records in.
4194296+0 records out.
Thu Dec 23 14:50:53 2021
Managed Standby Recovery not using Real Time Apply
Thu Dec 23 14:50:53 2021
Errors in file /opt/app/oracle/admin/oadb/bdump/oadb1_mrp0_3449322.trc:
ORA-01110: 数据文件 141: /dev/rrac_da40_32g
ORA-01122: 数据库文件 141 验证失败
RMAN> copy datafile /archive/backup_rrac_da40_32g.dbf to /dev/rrac_da40_32g;
Starting backup at 23-DEC-21
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=5472 instance=oadb1 devtype=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 12/23/2021 16:03:35
RMAN-20201: datafile not found in the recovery catalog
RMAN-06010: error while looking up datafile: /archive/backup_rrac_da40_32g.dbf
SQL> alter database datafile 141 offline;
alter database datafile 141 offline
ERROR at line 1:
ORA-01668: standby database requires DROP option for offline of data file
SQL> alter database datafile 141 offline drop;
Database altered.
SQL> alter database rename file /dev/rrac_da40_32g to /archive/backup_rrac_da40_32g.dbf;
Database altered.
再次恢复:
RMAN> copy datafile /archive/backup_rrac_da40_32g.dbf to /dev/rrac_da40_32g;
Starting backup at 23-DEC-21
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=5475 instance=oadb1 devtype=DISK
channel ORA_DISK_1: starting datafile copy
input datafile fno=00045 name=/archive/backup_rrac_da40_32g.dbf
alter database recover managed standby database using
current logfile disconnect;
set lines 200
SELECT PROCESS ,STATUS , THREAD#,SEQUENCE#,BLOCKS,BLOCK# FROM gV$MANAGED_STANDBY;
PROCESS STATUS THREAD# SEQUENCE# BLOCKS BLOCK#
--------- ------------ ---------- ---------- ---------- ----------
ARCH CLOSING 2 24914 171 1
ARCH CLOSING 1 32563 330 641025
ARCH CLOSING 2 24912 689 1019905
ARCH CLOSING 1 32565 1119 1
RFS IDLE 0 0 0 0
RFS IDLE 0 0 0 0
RFS IDLE 0 0 0 0
MRP0 APPLYING_LOG 2 24912 1020593 185859
RFS IDLE 0 0 0 0
RFS IDLE 0 0 0 0
RFS IDLE 0 0 0 0
ORA-01110: 数据文件 297: /opt/app/oracle/product/10.2.0/db_1/dbs/UNNAMED00297
打开手动管理:
ALTER SYSTEM SET standby_file_management=MANUAL SCOPE=BOTH;
创建到裸设备:
alter database create datafile /opt/app/oracle/product/10.2.0/db_1/dbs/UNNAMED00298 as /dev/rrac_da197_30g size 30718m autoextend off
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
ALTER SYSTEM SET standby_file_management=AUTO SCOPE=BOTH;
select name,value,unit,time_computed from v$dataguard_stats
where name in (transport lag,apply lag);
NAME VALUE UNIT TIME_COMPUTED
------------- -------------------- -------------------------
----- ------------------------------
apply lag +00 00:00:00 day(2) to second(0)
interval 28-DEC-2021 15:22:23
transport lag +00 00:00:00 day(2) to second(0)
interval 28-DEC-2021 15:22:23
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/129684.html
19C DG Broker配置和测试 img{ display:block; margin:0 auto !important; width:100%; } body{ width:75%; ...
DG备库读写测试方案 img{ display:block; margin:0 auto !important; width:100%; } body{ width:75%; margin:0...
摘要:问题九库控制文件扩展报错库的扩展报错,用的是裸设备,和还是原来大小,主库的没有报错,并且大小没有变,求解释。专家解答从报错可以看出,控制文件从个块扩展到个块时报错,而裸设备最大只支持个块,无法扩展,可以尝试将参数改小,避免控制文件报错。 链接描述引言 近期我们在DBASK小程序新关联了运维之美、高端存储知识、一森咖记、运维咖啡吧等数据领域的公众号,欢迎大家阅读分享。 问答集萃 接下来,...
摘要:问题原因非正常关机导致没有把数据及时的写入硬盘。丢失的临时表临时表和基于语句的复制方式不相容。如果备库崩溃或者正常关闭,任何复制线程拥有的临时表都会丢失。临时表的特性只对创建临时表的连接可见。 主备复制过程中有很大可能会出现各种问题,接下来我们就讨论一些比较普遍的问题,以及当遇到这些问题时,如何解决或者预防问题发生。 1 数据损坏或丢失 问题描述:服务器崩溃、断电、磁盘损坏、内存或网络...
阅读 1251·2023-01-11 13:20
阅读 1560·2023-01-11 13:20
阅读 1015·2023-01-11 13:20
阅读 1685·2023-01-11 13:20
阅读 3973·2023-01-11 13:20
阅读 2521·2023-01-11 13:20
阅读 1356·2023-01-11 13:20
阅读 3487·2023-01-11 13:20