您好,登錄后才能下訂單哦!
這篇文章主要介紹“AMDU數據恢復的方法是什么”,在日常操作中,相信很多人在AMDU數據恢復的方法是什么問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”AMDU數據恢復的方法是什么”的疑惑有所幫助!接下來,請跟著小編一起來學習吧!
A.M.D.U數據恢復
客戶環境:
操作系統:RedHat Enterprise AS Linux 4.6 x64
數據庫DB:Oracle Enterprise Database 10g(10.2.0.4) no psu
集群系統:Oracle Real Application Cluster 10g(10.2.0.4) no psu
問題背景:
在一個寂靜的夜晚被一陣急促的電話鈴聲吵醒,打來電話的是我的老朋友J,他告知我說數據庫起不來了,業務全部中斷,存儲狂扇,頻繁的告警亮燈,尋求我的緊急幫助。我首先安慰老朋友J,說這個可能是存儲有問題,比較棘手,還是有修復的可能。J聽到我這么一說長舒了一口氣,緩緩的吐了幾個字說:“吳哥,你得幫幫我!”我說沒問題,隨即夢醒打了個飛的直奔故障現場。了解到了客戶環境:比想象中的更為復雜,上線后就沒有任何備份,是一個部署在RHEL4.6環境下的10g(10.2.0.4)的RAC,用的是8盤位DFT低端SAS存儲。
問題分析:
在了解到問題環境之后需要對問題進行進一步的分析和解決,思考了半個小時,CRS服務無法啟動,沒有數據庫備份無法恢復;10gRAC ASM無法mount,內部視圖無法查詢,磁盤組無法正常加載,給數據恢復帶來諸多不便......,看來常規方法是不行了,只能考慮一些非常規的數據恢復方法:DUL? AUL? ODU? 這幾個工具一直在大腦中回蕩,后來冷靜思考,咨詢了行業里面的牛人,告訴我說通過11g下的AMDU可以在磁盤組加載之前將ASM元數據抽出來,用于診斷及起庫open,之后再重做RAC恢復數據即可。且該工具可以向后兼容,引入到10g中。
說完就干~!
處理過程:
1.1.基礎環境準備
在Oracle官網下載最新的AMDU工具,在任意節點掛載外置移動硬盤,上傳到掛載外置移動硬盤的節點上,進去后賦予oracle:oinstall權限并用oracle用戶解壓,配置參數文件amdu_par,包含如下內容:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`
export PATH=$PATH:`pwd`
1.2. 初始化amdu工具
用oracle用戶執行如下命令,?將自動生成一個以時間命名的目錄,其下的報告
文件記錄了磁盤組的相關信息。
./amdu amdu_2019_03_30_12_26_32
該報告的主要信息如下:
-*-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 ?? ---------元數據塊大小,4KB AU Size: 1048576 bytes ??-------------AU大小:1MB 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 ??----------元數據塊大小,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 ??---------元數據塊大小,4KB AU Size: 1048576 bytes --------------AU大小:1MB 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 --?--元數據塊大小,4KB Stride: 113792 AUs ?? --------AU 大小:1MB 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,控制文件也無法訪問,因此需要首先分析數據庫的文件分布情況,進而通過文件的ASM 存儲序號來進行文件抽取,?通過告警日志,可以找到數據庫的控制文件信息。如下所示,控制文件的ASM 文件號是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
? 取得控制文件之后,可以通過控制文件內容獲得數據庫的數據文件及日志文件分布情況。以下是從控制文件中獲得的信息輸出。
[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. 恢復文件
根據控制文件中的文件分布信息,可以通過amdu工具將所有文件提取出來,根據以數據文件和日志文件信息,創建如下腳本以抽取對應的日志文件和數據文件。
先恢復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/
再恢復數據文件:
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. 校驗文件
到這里文件已經全部恢復出來了,途中未見報錯,接下來需要用dbv對文件進行個校驗,檢查下是否有邏輯壞塊:
[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. 驗證數據庫版本及補丁信息
[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、構建新的環境
2.1. 安裝相同版本數據庫
不要建庫,只需安裝數據庫軟件即可。
過程(略)
2.2. 創建數據庫啟動參數文件
編輯好參數文件,將數據庫啟動到nomount狀態:
[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. 將數據庫啟到nomount狀態
[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數據庫
SQL> alter database mount; Database altered. SQL> select instance_name,status from gv$instance; INSTANCE_NAME STATUS ---------------- ------------ oradb MOUNTED
接下來就可以修改控制文件里面對應的數據文件及RedoLog的路徑,并open數據庫了。
2.5 修改路徑
修改控制文件中的數據文件和RedoLog對應路徑信息。
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.啟動數據庫
[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. 數據庫業務方面確認
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
到此,關于“AMDU數據恢復的方法是什么”的學習就結束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學習,快去試試吧!若想繼續學習更多相關知識,請繼續關注億速云網站,小編會繼續努力為大家帶來更多實用的文章!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。