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
文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。
轉載請注明本文地址:http://specialneedsforspecialkids.com/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 數據損壞或丟失 問題描述:服務器崩潰、斷電、磁盤損壞、內存或網絡...
閱讀 1347·2023-01-11 13:20
閱讀 1685·2023-01-11 13:20
閱讀 1133·2023-01-11 13:20
閱讀 1860·2023-01-11 13:20
閱讀 4101·2023-01-11 13:20
閱讀 2705·2023-01-11 13:20
閱讀 1386·2023-01-11 13:20
閱讀 3598·2023-01-11 13:20