這篇文章主要介紹“AMDU數(shù)據(jù)恢復(fù)的方法是什么”,在日常操作中,相信很多人在AMDU數(shù)據(jù)恢復(fù)的方法是什么問題上存在疑惑,小編查閱了各式資料,整理出簡(jiǎn)單好用的操作方法,希望對(duì)大家解答”AMDU數(shù)據(jù)恢復(fù)的方法是什么”的疑惑有所幫助!接下來,請(qǐng)跟著小編一起來學(xué)習(xí)吧!
網(wǎng)站的建設(shè)成都創(chuàng)新互聯(lián)專注網(wǎng)站定制,經(jīng)驗(yàn)豐富,不做模板,主營(yíng)網(wǎng)站定制開發(fā).小程序定制開發(fā),H5頁(yè)面制作!給你煥然一新的設(shè)計(jì)體驗(yàn)!已為濕噴機(jī)等企業(yè)提供專業(yè)服務(wù)。
A.M.D.U數(shù)據(jù)恢復(fù)
客戶環(huán)境:
操作系統(tǒng):RedHat Enterprise AS Linux 4.6 x64
數(shù)據(jù)庫(kù)DB:Oracle Enterprise Database 10g(10.2.0.4) no psu
集群系統(tǒng):Oracle Real Application Cluster 10g(10.2.0.4) no psu
問題背景:
在一個(gè)寂靜的夜晚被一陣急促的電話鈴聲吵醒,打來電話的是我的老朋友J,他告知我說數(shù)據(jù)庫(kù)起不來了,業(yè)務(wù)全部中斷,存儲(chǔ)狂扇,頻繁的告警亮燈,尋求我的緊急幫助。我首先安慰老朋友J,說這個(gè)可能是存儲(chǔ)有問題,比較棘手,還是有修復(fù)的可能。J聽到我這么一說長(zhǎng)舒了一口氣,緩緩的吐了幾個(gè)字說:“吳哥,你得幫幫我!”我說沒問題,隨即夢(mèng)醒打了個(gè)飛的直奔故障現(xiàn)場(chǎng)。了解到了客戶環(huán)境:比想象中的更為復(fù)雜,上線后就沒有任何備份,是一個(gè)部署在RHEL4.6環(huán)境下的10g(10.2.0.4)的RAC,用的是8盤位DFT低端SAS存儲(chǔ)。
問題分析:
在了解到問題環(huán)境之后需要對(duì)問題進(jìn)行進(jìn)一步的分析和解決,思考了半個(gè)小時(shí),CRS服務(wù)無法啟動(dòng),沒有數(shù)據(jù)庫(kù)備份無法恢復(fù);10gRAC ASM無法mount,內(nèi)部視圖無法查詢,磁盤組無法正常加載,給數(shù)據(jù)恢復(fù)帶來諸多不便......,看來常規(guī)方法是不行了,只能考慮一些非常規(guī)的數(shù)據(jù)恢復(fù)方法:DUL? AUL? ODU? 這幾個(gè)工具一直在大腦中回蕩,后來冷靜思考,咨詢了行業(yè)里面的牛人,告訴我說通過11g下的AMDU可以在磁盤組加載之前將ASM元數(shù)據(jù)抽出來,用于診斷及起庫(kù)open,之后再重做RAC恢復(fù)數(shù)據(jù)即可。且該工具可以向后兼容,引入到10g中。
說完就干~!
處理過程:
1.1.基礎(chǔ)環(huán)境準(zhǔn)備
在Oracle官網(wǎng)下載最新的AMDU工具,在任意節(jié)點(diǎn)掛載外置移動(dòng)硬盤,上傳到掛載外置移動(dòng)硬盤的節(jié)點(diǎn)上,進(jìn)去后賦予oracle:oinstall權(quán)限并用oracle用戶解壓,配置參數(shù)文件amdu_par,包含如下內(nèi)容:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`
export PATH=$PATH:`pwd`
1.2. 初始化amdu工具
用oracle用戶執(zhí)行如下命令,?將自動(dòng)生成一個(gè)以時(shí)間命名的目錄,其下的報(bào)告
文件記錄了磁盤組的相關(guān)信息。
./amdu amdu_2019_03_30_12_26_32
該報(bào)告的主要信息如下:
-*-amdu-*- ******************************* AMDU Settings ******************************** ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1 System name:Linux Node name: rac1 Release: 2.6.9-78.ELlargesmp Version: #1 SMP Wed Jul 9 16:03:59 EDT 2008 Machine:x86_64 amdu run: 30-MAR-19 12:26:32 Endianess: 1 --------------------------------- Operations --------------------------------- ------------------------------- Disk Selection ------------------------------- -diskstring '' ------------------------------ Reading Control ------------------------------- ------------------------------- Output Control ------------------------------- ********************************* DISCOVERY ********************************** ----------------------------- DISK REPORT N0001 ------------------------------ Disk Path: /dev/raw/raw1 Unique Disk ID: Disk Label: Physical Sector Size: 512 bytes Disk Size: 199 megabytes ** NOT A VALID ASM DISK HEADER. BAD VALUE IN FIELD blksize_kfdhdb ** ----------------------------- DISK REPORT N0002 ------------------------------ Disk Path: /dev/raw/raw2 Unique Disk ID: Disk Label: Physical Sector Size: 512 bytes Disk Size: 299 megabytes ** NOT A VALID ASM DISK HEADER. BAD VALUE IN FIELD blksize_kfdhdb ** ----------------------------- DISK REPORT N0003 ------------------------------ Disk Path: ORCL:VOL1 Unique Disk ID: Disk Label: VOL1 Physical Sector Size: 512 bytes Disk Size: 2047997 megabytes Group Name: ORADATA_DG1 Disk Name: VOL1 Failure Group Name: VOL1 Disk Number: 0 Header Status: 3 Disk Creation Time: 2011/01/04 15:51:21.126000 Last Mount Time: 2019/03/30 13:15:19.625000 Compatibility Version: 0x0a100000 Disk Sector Size: 512 bytes Disk size in AUs: 2047997 AUs Group Redundancy: 1 Metadata Block Size: 4096 bytes ?? ---------元數(shù)據(jù)塊大小,4KB AU Size: 1048576 bytes ??-------------AU大?。?MB Stride: 113792 AUs Group Creation Time: 2011/01/04 15:51:21.013000 File 1 Block 1 location: AU 2 ---------文件使用,從AU 2 開始 ----------------------------- DISK REPORT N0004 ------------------------------ Disk Path: ORCL:VOL2 Unique Disk ID: Disk Label: VOL2 Physical Sector Size: 512 bytes Disk Size: 2047997 megabytes Group Name: ORADATA_DG2 Disk Name: VOL2 Failure Group Name: VOL2 Disk Number: 0 Header Status: 3 Disk Creation Time: 2011/01/04 15:51:43.512000 Last Mount Time: 2019/03/30 13:15:19.851000 Compatibility Version: 0x0a100000 Disk Sector Size: 512 bytes Disk size in AUs: 2047997 AUs Group Redundancy: 1 Metadata Block Size: 4096 bytes ??----------元數(shù)據(jù)塊大小,4KB AU Size: 1048576 bytes ?--------------AU大小:1MB Stride: 113792 AUs Group Creation Time: 2011/01/04 15:51:43.370000 File 1 Block 1 location: AU 2 ---------文件使用,從AU 2 開始 ----------------------------- DISK REPORT N0005 ------------------------------ Disk Path: ORCL:VOL3 Unique Disk ID: Disk Label: VOL3 Physical Sector Size: 512 bytes Disk Size: 2047997 megabytes Group Name: ORADATA_DG3 Disk Name: VOL3 Failure Group Name: VOL3 Disk Number: 0 Header Status: 3 Disk Creation Time: 2011/01/04 15:52:05.086000 Last Mount Time: 2019/03/30 13:15:20.093000 Compatibility Version: 0x0a100000 Disk Sector Size: 512 bytes Disk size in AUs: 2047997 AUs Group Redundancy: 1 Metadata Block Size: 4096 bytes ??---------元數(shù)據(jù)塊大小,4KB AU Size: 1048576 bytes --------------AU大?。?MB Stride: 113792 AUs Group Creation Time: 2011/01/04 15:52:04.949000 File 1 Block 1 location: AU 2 ??---------文件使用,從AU 2 開始 ----------------------------- DISK REPORT N0006 ------------------------------ Disk Path: ORCL:VOL4 Unique Disk ID: Disk Label: VOL4 Physical Sector Size: 512 bytes Disk Size: 1484867 megabytes Group Name: RECOVER_DG Disk Name: VOL4 Failure Group Name: VOL4 Disk Number: 0 Header Status: 3 Disk Creation Time: 2011/01/04 15:52:31.026000 Last Mount Time: 2019/03/30 13:15:20.336000 Compatibility Version: 0x0a100000 Disk Sector Size: 512 bytes Disk size in AUs: 1484867 AUs Group Redundancy: 1 Metadata Block Size: 4096 bytes AU Size: 1048576 bytes --?--元數(shù)據(jù)塊大小,4KB Stride: 113792 AUs ?? --------AU 大?。?MB Group Creation Time: 2011/01/04 15:52:30.929000 File 1 Block 1 location: AU 2 ?? ---------文件使用,從AU 2 開始 ******************************* END OF REPORT ********************************
1.3.抽取控制文件
?由于磁盤組不能Mount,控制文件也無法訪問,因此需要首先分析數(shù)據(jù)庫(kù)的文件分布情況,進(jìn)而通過文件的ASM 存儲(chǔ)序號(hào)來進(jìn)行文件抽取,?通過告警日志,可以找到數(shù)據(jù)庫(kù)的控制文件信息。如下所示,控制文件的ASM 文件號(hào)是270。
grep control_file $ORACLE_BASE/admin/$ORACLE_SID/bdump/alert_$ORACLE_SID.log control_files = "+ORADATA_DG1/ORADB/CONTROLFILE/Current.260.739555035" .......... [oracle@rac1 amdu_2019_03_30_12_26_32]$ amdu -diskstring '/dev/oracleasm/disks/VOL*' -extract ORADATA_DG1.260 amdu_2019_03_30_12_29_43/
1.4. 通過控制文件獲取RedoLog 和DataFile
? 取得控制文件之后,可以通過控制文件內(nèi)容獲得數(shù)據(jù)庫(kù)的數(shù)據(jù)文件及日志文件分布情況。以下是從控制文件中獲得的信息輸出。
[root@rac1 ~]# strings ORADATA_DG1_260.f |grep -v archivelog |grep -v oracle/ |grep ORAD| sort +ORADATA_DG1/oradb/idx_jsnet.dbf +ORADATA_DG1/oradb/idx_jsnet.dbf +ORADATA_DG1/oradb/idx_jsnet.ora +ORADATA_DG1/oradb/idx_jsnet.ora +ORADATA_DG1/oradb/redo01.log +ORADATA_DG1/oradb/redo01.log +ORADATA_DG1/oradb/redo02.log +ORADATA_DG1/oradb/redo02.log +ORADATA_DG1/oradb/redo03.log +ORADATA_DG1/oradb/redo03.log +ORADATA_DG1/oradb/redo04.log +ORADATA_DG1/oradb/redo04.log +ORADATA_DG1/oradb/sysaux01.dbf +ORADATA_DG1/oradb/sysaux01.dbf +ORADATA_DG1/oradb/system01.dbf +ORADATA_DG1/oradb/system01.dbf +ORADATA_DG1/oradb/tbs_jsnet.dbf +ORADATA_DG1/oradb/tbs_jsnet.dbf +ORADATA_DG1/oradb/tbs_jsnet.dbf +ORADATA_DG1/oradb/tbs_jsnet.dbf +ORADATA_DG1/oradb/temp01.dbf +ORADATA_DG1/oradb/temp01.dbf +ORADATA_DG1/oradb/undotbs01.dbf +ORADATA_DG1/oradb/undotbs01.dbf +ORADATA_DG1/oradb/undotbs02.dbf +ORADATA_DG1/oradb/undotbs02.dbf +ORADATA_DG1/oradb/users01.dbf +ORADATA_DG1/oradb/users01.dbf
1.5. 恢復(fù)文件
根據(jù)控制文件中的文件分布信息,可以通過amdu工具將所有文件提取出來,根據(jù)以數(shù)據(jù)文件和日志文件信息,創(chuàng)建如下腳本以抽取對(duì)應(yīng)的日志文件和數(shù)據(jù)文件。
先恢復(fù)RedoLog File:
[oracle@rac1 amdu_2019_03_30_12_26_32]$ amdu -diskstring '/dev/oracleasm/disks/VOL*' -extract ORADATA_DG1.263 amdu_2019_03_30_12_32_38/ [oracle@rac1 amdu_2019_03_30_12_26_32]$ amdu -diskstring '/dev/oracleasm/disks/VOL*' -extract ORADATA_DG1.264 amdu_2019_03_30_12_33_12/ [oracle@rac1 amdu_2019_03_30_12_26_32]$ amdu -diskstring '/dev/oracleasm/disks/VOL*' -extract ORADATA_DG1.267 amdu_2019_03_30_12_34_11/ [oracle@rac1 amdu_2019_03_30_12_26_32]$ amdu -diskstring '/dev/oracleasm/disks/VOL*' -extract ORADATA_DG1.268 amdu_2019_03_30_12_34_22/
再恢復(fù)數(shù)據(jù)文件:
IDX_JSNET.ora: [oracle@rac1 amdu_2019_03_30_12_26_32]$ amdu -diskstring '/dev/oracleasm/disks/VOL*' -extract ORADATA_DG1.276 amdu_2019_03_30_12_38_42/ IDX_JSNET: [oracle@rac1 amdu_2019_03_30_12_26_32]$ amdu -diskstring '/dev/oracleasm/disks/VOL*' -extract ORADATA_DG1.298 TBS_JSNET: [oracle@rac1 amdu_2019_03_30_12_26_32]$ amdu -diskstring '/dev/oracleasm/disks/VOL*' -extract ORADATA_DG1.277 SYSAUX: [oracle@rac1 amdu_2019_03_30_12_26_32]$ amdu -diskstring '/dev/oracleasm/disks/VOL*' -extract ORADATA_DG1.257 SYSTEM: [oracle@rac1 amdu_2019_03_30_12_26_32]$ amdu -diskstring '/dev/oracleasm/disks/VOL*' -extract ORADATA_DG1.256 TEMP: [oracle@rac1 amdu_2019_03_30_12_26_32]$ amdu -diskstring '/dev/oracleasm/disks/VOL*' -extract ORADATA_DG1.265 UNDOTBS1: [oracle@rac1 amdu_2019_03_30_12_26_32]$ amdu -diskstring '/dev/oracleasm/disks/VOL*' -extract ORADATA_DG1.258 UNDOTBS2: [oracle@rac1 amdu_2019_03_30_12_26_32]$ amdu -diskstring '/dev/oracleasm/disks/VOL*' -extract ORADATA_DG1.266 USER: [oracle@rac1 amdu_2019_03_30_12_26_32]$ amdu -diskstring '/dev/oracleasm/disks/VOL*' -extract ORADATA_DG1.259
1.6. 校驗(yàn)文件
到這里文件已經(jīng)全部恢復(fù)出來了,途中未見報(bào)錯(cuò),接下來需要用dbv對(duì)文件進(jìn)行個(gè)校驗(yàn),檢查下是否有邏輯壞塊:
[oracle@rac1 amdu_2019_03_30_12_26_32]$ dbv file=amdu_2019_03_30_12_ amdu_2019_03_30_12_29_43/ amdu_2019_03_30_12_33_12/ amdu_2019_03_30_12_38_42/ amdu_2019_03_30_12_43_30/ amdu_2019_03_30_12_29_56/ amdu_2019_03_30_12_34_11/ amdu_2019_03_30_12_40_08/ amdu_2019_03_30_12_44_47/ amdu_2019_03_30_12_30_07/ amdu_2019_03_30_12_34_22/ amdu_2019_03_30_12_40_45/ amdu_2019_03_30_12_32_38/ amdu_2019_03_30_12_37_22/ amdu_2019_03_30_12_42_13/ [oracle@rac1 amdu_2019_03_30_12_26_32]$ dbv file=amdu_2019_03_30_12_38_42/ORADATA_DG1_276.f DBVERIFY: Release 10.2.0.4.0 - Production on Sat Mar 30 14:00:33 2019 Copyright (c) 1982, 2007, Oracle. All rights reserved. DBVERIFY - Verification starting : FILE = amdu_2019_03_30_12_38_42/ORADATA_DG1_276.f DBVERIFY - Verification complete Total Pages Examined : 25600 Total Pages Processed (Data) : 0 Total Pages Failing (Data) : 0 Total Pages Processed (Index): 0 Total Pages Failing (Index): 0 Total Pages Processed (Other): 8 Total Pages Processed (Seg) : 0 Total Pages Failing (Seg) : 0 Total Pages Empty : 25592 Total Pages Marked Corrupt : 0 Total Pages Influx : 0 Highest block SCN : 753000 (0.753000) [oracle@rac1 amdu_2019_03_30_12_26_32]$ dbv file=amdu_2019_03_30_12_40_08/ORADATA_DG1_298.f DBVERIFY: Release 10.2.0.4.0 - Production on Sat Mar 30 14:00:53 2019 Copyright (c) 1982, 2007, Oracle. All rights reserved. DBVERIFY - Verification starting : FILE = amdu_2019_03_30_12_40_08/ORADATA_DG1_298.f DBVERIFY - Verification complete Total Pages Examined : 32000 Total Pages Processed (Data) : 0 Total Pages Failing (Data) : 0 Total Pages Processed (Index): 28786 Total Pages Failing (Index): 0 Total Pages Processed (Other): 1062 Total Pages Processed (Seg) : 0 Total Pages Failing (Seg) : 0 Total Pages Empty : 2152 Total Pages Marked Corrupt : 0 Total Pages Influx : 0 Highest block SCN : 697113994 (0.697113994) [oracle@rac1 amdu_2019_03_30_12_26_32]$ dbv file=amdu_2019_03_30_12_40_45/ORADATA_DG1_277.f DBVERIFY: Release 10.2.0.4.0 - Production on Sat Mar 30 14:01:09 2019 Copyright (c) 1982, 2007, Oracle. All rights reserved. DBVERIFY - Verification starting : FILE = amdu_2019_03_30_12_40_45/ORADATA_DG1_277.f DBVERIFY - Verification complete Total Pages Examined : 101120 Total Pages Processed (Data) : 95455 Total Pages Failing (Data) : 0 Total Pages Processed (Index): 353 Total Pages Failing (Index): 0 Total Pages Processed (Other): 3290 Total Pages Processed (Seg) : 0 Total Pages Failing (Seg) : 0 Total Pages Empty : 2022 Total Pages Marked Corrupt : 0 Total Pages Influx : 0 Highest block SCN : 697223552 (0.697223552) [oracle@rac1 amdu_2019_03_30_12_26_32]$ dbv file=amdu_2019_03_30_12_42_13/ORADATA_DG1_257.f DBVERIFY: Release 10.2.0.4.0 - Production on Sat Mar 30 14:01:17 2019 Copyright (c) 1982, 2007, Oracle. All rights reserved. DBVERIFY - Verification starting : FILE = amdu_2019_03_30_12_42_13/ORADATA_DG1_257.f DBVERIFY - Verification complete Total Pages Examined : 107520 Total Pages Processed (Data) : 41691 Total Pages Failing (Data) : 0 Total Pages Processed (Index): 33473 Total Pages Failing (Index): 0 Total Pages Processed (Other): 18814 Total Pages Processed (Seg) : 0 Total Pages Failing (Seg) : 0 Total Pages Empty : 13542 Total Pages Marked Corrupt : 0 Total Pages Influx : 0 Highest block SCN : 697247738 (0.697247738) [oracle@rac1 amdu_2019_03_30_12_26_32]$ dbv file=amdu_2019_03_30_12_43_30/ORADATA_DG1_256.f DBVERIFY: Release 10.2.0.4.0 - Production on Sat Mar 30 14:01:59 2019 Copyright (c) 1982, 2007, Oracle. All rights reserved. DBVERIFY - Verification starting : FILE = amdu_2019_03_30_12_43_30/ORADATA_DG1_256.f DBVERIFY - Verification complete Total Pages Examined : 64000 Total Pages Processed (Data) : 38706 Total Pages Failing (Data) : 0 Total Pages Processed (Index): 7385 Total Pages Failing (Index): 0 Total Pages Processed (Other): 2067 Total Pages Processed (Seg) : 0 Total Pages Failing (Seg) : 0 Total Pages Empty : 15842 Total Pages Marked Corrupt : 0 Total Pages Influx : 0 Highest block SCN : 697247727 (0.697247727) [oracle@rac1 amdu_2019_03_30_12_26_32]$ dbv file=amdu_2019_03_30_12_44_47/ORADATA_DG1_265.f DBVERIFY: Release 10.2.0.4.0 - Production on Sat Mar 30 14:02:25 2019 Copyright (c) 1982, 2007, Oracle. All rights reserved. DBVERIFY: Skipping temporary file amdu_2019_03_30_12_44_47/ORADATA_DG1_265.f [oracle@rac1 amdu_2019_03_30_12_26_32]$ dbv file=amdu_2019_03_30_13_10_37/ORADATA_DG1_258.f DBVERIFY: Release 10.2.0.4.0 - Production on Sat Mar 30 14:03:18 2019 Copyright (c) 1982, 2007, Oracle. All rights reserved. DBVERIFY - Verification starting : FILE = amdu_2019_03_30_13_10_37/ORADATA_DG1_258.f DBVERIFY - Verification complete Total Pages Examined : 23680 Total Pages Processed (Data) : 0 Total Pages Failing (Data) : 0 Total Pages Processed (Index): 0 Total Pages Failing (Index): 0 Total Pages Processed (Other): 23432 Total Pages Processed (Seg) : 0 Total Pages Failing (Seg) : 0 Total Pages Empty : 248 Total Pages Marked Corrupt : 0 Total Pages Influx : 0 Highest block SCN : 667630094 (0.667630094) [oracle@rac1 amdu_2019_03_30_12_26_32]$ dbv file=amdu_2019_03_30_13_14_27/ORADATA_DG1_266.f DBVERIFY: Release 10.2.0.4.0 - Production on Sat Mar 30 14:03:43 2019 Copyright (c) 1982, 2007, Oracle. All rights reserved. DBVERIFY - Verification starting : FILE = amdu_2019_03_30_13_14_27/ORADATA_DG1_266.f DBVERIFY - Verification complete Total Pages Examined : 27080 Total Pages Processed (Data) : 0 Total Pages Failing (Data) : 0 Total Pages Processed (Index): 0 Total Pages Failing (Index): 0 Total Pages Processed (Other): 27080 Total Pages Processed (Seg) : 0 Total Pages Failing (Seg) : 0 Total Pages Empty : 0 Total Pages Marked Corrupt : 0 Total Pages Influx : 0 Highest block SCN : 697247738 (0.697247738) [oracle@rac1 amdu_2019_03_30_12_26_32]$ dbv file=amdu_2019_03_30_13_15_29/ORADATA_DG1_259.f DBVERIFY: Release 10.2.0.4.0 - Production on Sat Mar 30 14:04:03 2019 Copyright (c) 1982, 2007, Oracle. All rights reserved. DBVERIFY - Verification starting : FILE = amdu_2019_03_30_13_15_29/ORADATA_DG1_259.f DBVERIFY - Verification complete Total Pages Examined : 640 Total Pages Processed (Data) : 15 Total Pages Failing (Data) : 0 Total Pages Processed (Index): 2 Total Pages Failing (Index): 0 Total Pages Processed (Other): 593 Total Pages Processed (Seg) : 0 Total Pages Failing (Seg) : 0 Total Pages Empty : 30 Total Pages Marked Corrupt : 0 Total Pages Influx : 0 Highest block SCN : 598900 (0.598900)
1.7. 驗(yàn)證數(shù)據(jù)庫(kù)版本及補(bǔ)丁信息
[oracle@rac1 amdu_2019_03_30_12_26_32]$ $ORACLE_HOME/OPatch/opatch lsinv Invoking OPatch 10.2.0.4.2 Oracle Interim Patch Installer version 10.2.0.4.2 Copyright (c) 2007, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/10.2.0/db_1 Central Inventory : /u01/app/oraInventory from : /etc/oraInst.loc OPatch version : 10.2.0.4.2 OUI version : 10.2.0.4.0 OUI location : /u01/app/oracle/product/10.2.0/db_1/oui Log file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatc h3019-03-30_13-56-47PM.log Lsinventory Output file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollo gs/opatch/lsinv/lsinventory2019-03-30_13-56-47PM.txt -------------------------------------------------------------------------------- Installed Top-level Products (3): Oracle Database 10g 10.2.0.1.0 Oracle Database 10g Products 10.2.0.1.0 Oracle Database 10g Release 2 Patch Set 3 10.2.0.4.0 There are 3 products installed in this Oracle Home. There are no Interim patches installed in this Oracle Home. Rac system comprising of multiple nodes Local node = rac1 Remote node = rac2 -------------------------------------------------------------------------------- OPatch succeeded.
2、構(gòu)建新的環(huán)境
2.1. 安裝相同版本數(shù)據(jù)庫(kù)
不要建庫(kù),只需安裝數(shù)據(jù)庫(kù)軟件即可。
過程(略)
2.2. 創(chuàng)建數(shù)據(jù)庫(kù)啟動(dòng)參數(shù)文件
編輯好參數(shù)文件,將數(shù)據(jù)庫(kù)啟動(dòng)到nomount狀態(tài):
[oracle@rac1 dbs]$ cat initoradb.ora db_name=oradb db_files = 80 db_file_multiblock_read_count = 8 db_block_buffers = 100 shared_pool_size = 123232153 log_checkpoint_interval = 10000 processes = 50 parallel_max_servers = 5 log_buffer = 32768 max_dump_file_size = 10240 global_names = TRUE control_files = '/oracle/oradata/oradb/control01.ctl'
2.3. 將數(shù)據(jù)庫(kù)啟到nomount狀態(tài)
[oracle@rac1 dbs]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.4.0 - Production on Sat Apr 6 12:47:26 2019 Copyright (c) 1982, 2007, Oracle. All Rights Reserved. Connected to an idle instance. SQL> startup nomount; ORACLE instance started. Total System Global Area 4294967296 bytes Fixed Size 2089472 bytes Variable Size 4269805056 bytes Database Buffers 8388608 bytes Redo Buffers 14684160 bytes
2.4. mount數(shù)據(jù)庫(kù)
SQL> alter database mount; Database altered. SQL> select instance_name,status from gv$instance; INSTANCE_NAME STATUS ---------------- ------------ oradb MOUNTED
接下來就可以修改控制文件里面對(duì)應(yīng)的數(shù)據(jù)文件及RedoLog的路徑,并open數(shù)據(jù)庫(kù)了。
2.5 修改路徑
修改控制文件中的數(shù)據(jù)文件和RedoLog對(duì)應(yīng)路徑信息。
RedoLog File RENAME FILE:
alter database rename file '+ORADATA_DG1/oradb/redo02.log' to '/oracle/oradata/oradb/amdu_2019_03_30_12_33_12/ORADATA_DG1_264.f'; alter database rename file '+ORADATA_DG1/oradb/redo01.log' to '/oracle/oradata/oradb/amdu_2019_03_30_12_32_38/ORADATA_DG1_263.f'; alter database rename file '+ORADATA_DG1/oradb/redo03.log' to '/oracle/oradata/oradb/amdu_2019_03_30_12_34_11/ORADATA_DG1_267.f'; alter database rename file '+ORADATA_DG1/oradb/redo04.log' to '/oracle/oradata/oradb/amdu_2019_03_30_12_34_22/ORADATA_DG1_268.f'; ter database rename file '+ORADATA_DG1/oradb/users01.dbf' to '/oracle/oradata/oradb/amdu_2019_03_30_13_15_29/ORADATA_DG1_259.f'; alter database rename file '+ORADATA_DG1/oradb/sysaux01.dbf' to '/oracle/oradata/oradb/amdu_2019_03_30_12_42_13/ORADATA_DG1_257.f'; alter database rename file '+ORADATA_DG1/oradb/undotbs01.dbf' to '/oracle/oradata/oradb/amdu_2019_03_30_13_10_37/ORADATA_DG1_258.f'; alter database rename file '+ORADATA_DG1/oradb/system01.dbf' to '/oracle/oradata/oradb/amdu_2019_03_30_12_43_30/ORADATA_DG1_256.f'; alter database rename file '+ORADATA_DG1/oradb/undotbs02.dbf' to '/oracle/oradata/oradb/amdu_2019_03_30_13_14_27/ORADATA_DG1_266.f'; alter database rename file '+ORADATA_DG1/oradb/tbs_jsnet.dbf' to '/oracle/oradata/oradb/amdu_2019_03_30_12_40_45/ORADATA_DG1_277.f'; alter database rename file '+ORADATA_DG1/oradb/idx_jsnet.dbf' to '/oracle/oradata/oradb/amdu_2019_03_30_12_40_08/ORADATA_DG1_298.f';
Temp File RENAME FILE:
alter database rename file '+ORADATA_DG1/oradb/temp01.dbf' to '/oracle/oradata/oradb/amdu_2019_03_30_12_44_47/ORADATA_DG1_265.f';
3.啟動(dòng)數(shù)據(jù)庫(kù)
[oracle@redhat5 ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.4.0 - Production on Sun Mar 31 03:50:55 2019 Copyright (c) 1982, 2007, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> alter database open; alter database open * ERROR at line 1: ORA-00369: Current log of thread 1 not useable and other log being cleared ORA-00312: online log 1 thread 1: '/oracle/oradata/oradb/amdu_2019_03_30_12_32_38/ORADATA_DG1_263.f' SQL> alter database clear unarchived logfile group 1; Database altered. SQL> alter database open; Database altered. SQL> select instance_name,status from v$instance; INSTANCE_NAMESTATUS ---------------- ------------ oradb OPEN
4. 數(shù)據(jù)庫(kù)業(yè)務(wù)方面確認(rèn)
SQL> select username,default_tablespace from dba_users where account_status='OPEN'; USERNAME DEFAULT_TABLESPACE ------------------------------ ------------------------------ SYSTEM SYSTEM SYS SYSTEM SYSMAN SYSAUX DBSNMP SYSAUX MGMT_VIEW SYSTEM woo TBS_JSNET 6 rows selected. col OWNER format a8 col OBJECT_NAME format a25 select owner,object_name,status from dba_objects where owner='MAM42SYS'; OWNER OBJECT_NAME STATUS -------- ------------------------- ------- WOO WOO_NAVBONTMOL VALID WOO WOO_NAVTONTCOL VALID WOO WOO_NAV2GATIWN VALID
到此,關(guān)于“AMDU數(shù)據(jù)恢復(fù)的方法是什么”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實(shí)踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識(shí),請(qǐng)繼續(xù)關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編會(huì)繼續(xù)努力為大家?guī)砀鄬?shí)用的文章!
分享標(biāo)題:AMDU數(shù)據(jù)恢復(fù)的方法是什么
網(wǎng)頁(yè)路徑:http://muchs.cn/article34/gdohse.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供面包屑導(dǎo)航、品牌網(wǎng)站設(shè)計(jì)、移動(dòng)網(wǎng)站建設(shè)、建站公司、網(wǎng)站制作、網(wǎng)站改版
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)