A.M.D.U資料恢復
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 h2019-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
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/20674423/viewspace-2640530/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 資料恢復:AMDU資料抽取恢復資料恢復
- Vsan資料恢復—Vsan資料恢復案例資料恢復
- 【Vsan資料恢復】Vsan資料恢復案例資料恢復
- 【資料庫資料恢復】SAP資料庫資料恢復案例資料庫資料恢復
- 【資料庫資料恢復】透過恢復NDF檔案修復資料庫的資料恢復過程資料庫資料恢復
- Sybase ASE資料庫恢復,Sybase資料恢復,資料誤刪除恢復工具READSYBDEVICE資料庫資料恢復dev
- 【資料庫資料恢復】Sql Server資料庫資料恢復案例資料庫資料恢復SQLServer
- 【VSAN資料恢復】VSAN儲存資料恢復案例資料恢復
- NAS陣列恢復資料資料恢復開盤陣列資料恢復
- 【伺服器資料恢復】Vsan資料恢復案例伺服器資料恢復
- 資料庫修復資料恢復資料庫資料恢復
- 寶塔資料庫恢復 mysql資料庫丟失恢復 mysql資料庫刪除庫恢復 寶塔mysql資料庫恢復資料庫MySql
- Sybase SQL Anywhere(ASA)資料庫恢復,ASA資料恢復,資料誤刪除恢復工具ReadASADBSQL資料庫資料恢復
- 伺服器資料恢復—透過拼接資料庫碎片恢復SqlServer資料庫資料的資料恢復案例伺服器資料恢復資料庫SQLServer
- 北亞企安資料恢復-XSAN資料恢復案例資料恢復
- 伺服器資料恢復-ESX SERVER資料恢復案例伺服器資料恢復Server
- 【伺服器資料恢復】SUN SOLARIS資料恢復案例伺服器資料恢復
- 【資料庫資料恢復】windows server下SqlServer資料庫的資料恢復資料庫資料恢復WindowsServerSQL
- 【資料庫資料恢復】如何恢復Oracle資料庫truncate表的資料資料庫資料恢復Oracle
- SQL Server資料庫恢復,SQL Server資料恢復,SQL Server資料誤刪除恢復工具SQLRescueSQLServer資料庫資料恢復
- MAC資料恢復Mac資料恢復
- mysql資料恢復MySql資料恢復
- 硬碟資料恢復硬碟資料恢復
- EMC 儲存資料恢復案例詳解【資料恢復方案】資料恢復
- Vsan資料恢復—Vsan分散式儲存資料恢復案例資料恢復分散式
- 儲存崩潰資料恢復過程;資料恢復案例資料恢復
- 【伺服器資料恢復】raid5資料恢復案例伺服器資料恢復AI
- 【北亞資料恢復】硬碟壞道故障如何恢復資料?資料恢復硬碟
- 【資料庫資料恢復】Oracle資料庫誤truncate table的資料恢復案例資料庫資料恢復Oracle
- 【資料庫資料恢復】誤truncate table的Oracle資料庫資料恢復方案資料庫資料恢復Oracle
- 【資料庫資料恢復】oracle資料庫誤truncate table怎麼恢復資料?資料庫資料恢復Oracle
- 【資料庫資料恢復】linux系統下MYSQL資料庫資料恢復案例資料庫資料恢復LinuxMySql
- 【vsan資料恢復】vsan資料重構失敗的資料恢復案例資料恢復
- 資料庫資料恢復—NTFS分割槽損壞如何恢復SqlServer資料庫資料資料庫資料恢復SQLServer
- 【資料庫資料恢復】sql server資料庫連線失效的資料恢復案例資料庫資料恢復SQLServer
- 【資料庫資料恢復】ORACLE常見資料災難&資料恢復可能性資料庫資料恢復Oracle
- 【資料庫資料恢復】Oracle資料庫ASM磁碟組掉線如何恢復資料?資料庫資料恢復OracleASM
- 【資料庫資料恢復】SqlServer資料庫無法讀取的資料恢復案例資料庫資料恢復SQLServer