01
問題背景
02
壞塊修復(fù)
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備份到文件系統(tǒng)作為備用,防止備庫數(shù)據(jù)文件不可用
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 恢復(fù)數(shù)據(jù)文件到新盤
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: 數(shù)據(jù)文件 141: /dev/rrac_da40_32g
ORA-01122: 數(shù)據(jù)庫文件 141 驗(yàn)證失敗
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.
再次恢復(fù):
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: 數(shù)據(jù)文件 297: /opt/app/oracle/product/10.2.0/db_1/dbs/UNNAMED00297
打開手動(dòng)管理:
ALTER SYSTEM SET standby_file_management=MANUAL SCOPE=BOTH;
創(chuàng)建到裸設(shè)備:
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
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://systransis.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...
摘要:問題九庫控制文件擴(kuò)展報(bào)錯(cuò)庫的擴(kuò)展報(bào)錯(cuò),用的是裸設(shè)備,和還是原來大小,主庫的沒有報(bào)錯(cuò),并且大小沒有變,求解釋。專家解答從報(bào)錯(cuò)可以看出,控制文件從個(gè)塊擴(kuò)展到個(gè)塊時(shí)報(bào)錯(cuò),而裸設(shè)備最大只支持個(gè)塊,無法擴(kuò)展,可以嘗試將參數(shù)改小,避免控制文件報(bào)錯(cuò)。 鏈接描述引言 近期我們?cè)贒BASK小程序新關(guān)聯(lián)了運(yùn)維之美、高端存儲(chǔ)知識(shí)、一森咖記、運(yùn)維咖啡吧等數(shù)據(jù)領(lǐng)域的公眾號(hào),歡迎大家閱讀分享。 問答集萃 接下來,...
摘要:問題原因非正常關(guān)機(jī)導(dǎo)致沒有把數(shù)據(jù)及時(shí)的寫入硬盤。丟失的臨時(shí)表臨時(shí)表和基于語句的復(fù)制方式不相容。如果備庫崩潰或者正常關(guān)閉,任何復(fù)制線程擁有的臨時(shí)表都會(huì)丟失。臨時(shí)表的特性只對(duì)創(chuàng)建臨時(shí)表的連接可見。 主備復(fù)制過程中有很大可能會(huì)出現(xiàn)各種問題,接下來我們就討論一些比較普遍的問題,以及當(dāng)遇到這些問題時(shí),如何解決或者預(yù)防問題發(fā)生。 1 數(shù)據(jù)損壞或丟失 問題描述:服務(wù)器崩潰、斷電、磁盤損壞、內(nèi)存或網(wǎng)絡(luò)...
閱讀 1356·2023-01-11 13:20
閱讀 1707·2023-01-11 13:20
閱讀 1215·2023-01-11 13:20
閱讀 1906·2023-01-11 13:20
閱讀 4165·2023-01-11 13:20
閱讀 2757·2023-01-11 13:20
閱讀 1402·2023-01-11 13:20
閱讀 3671·2023-01-11 13:20