Oracle ASM AMDU工具的使用
Oracle 10g中, ASM磁碟組的資訊需要在Mount之後才能通過內部檢視查詢, 如果磁碟組因為故障無法正常載入,那麼資訊將不可用, 這為ASM相關故障的診斷帶來了諸多不便
Oracle在11g中提供了AMDU, 可用於協助診斷,在ASM磁碟載入前,可以將ASM後設資料從磁碟中抽取出來,用於資料庫診斷。此工具可以向後相容,引入到10g。
使用方法:
[grid@dbhost01 ~]$ amdu -diskstring '/dev/asmdisk*'
amdu_2019_08_09_11_04_26/
[grid@dbhost01 ~]$ cd amdu_2019_08_09_11_04_26/
[grid@dbhost01 amdu_2019_08_09_11_04_26]$ ls -l
total 8
-rw-r--r-- 1 grid oinstall 5367 Aug 9 11:04 report.txt
[grid@dbhost01 amdu_2019_08_09_11_04_26]$ more report.txt
-*-amdu-*-
******************************* AMDU Settings ********************************
ORACLE_HOME = /u01/app/11.2.0/grid
System name: Linux
Node name: dbhost01
Release: 3.10.0-862.el7.x86_64
Version: #1 SMP Wed Mar 21 18:14:51 EDT 2018
Machine: x86_64
amdu run: 09-AUG-19 11:04:26
Endianess: 1
抽取整個資料庫檔案的流程如下:
1. 在告警日誌中定位控制檔案在ASM檔案系統中的編號
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options.
ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1
System name: Linux
Node name: dbhost01
Release: 3.10.0-862.el7.x86_64
Version: #1 SMP Wed Mar 21 18:14:51 EDT 2018
Machine: x86_64
VM name: VMWare Version: 6
Using parameter settings in server-side pfile /u01/app/oracle/product/11.2.0/db_1/dbs/initorcl1.ora
System parameters with non-default values:
processes = 150
spfile = "+DATA/orcl/spfileorcl.ora"
memory_target = 1584M
control_files = " +DATA/orcl/controlfile/current.260.1008261229 "
db_block_size = 8192
compatible = "11.2.0.4.0"
cluster_database = TRUE
db_create_file_dest = "+DATA"
thread = 1
undo_tablespace = "UNDOTBS1"
instance_number = 1
remote_login_passwordfile= "EXCLUSIVE"
db_domain = ""
dispatchers = "(PROTOCOL=TCP) (SERVICE=orclXDB)"
remote_listener = "myrac-cluster-scan:1521"
audit_file_dest = "/u01/app/oracle/admin/orcl/adump"
audit_trail = "DB"
db_name = "orcl"
open_cursors = 300
diagnostic_dest = "/u01/app/oracle"
2. 抽取控制檔案
[grid@dbhost01 amdu_2019_08_09_11_04_26]$ amdu -extract +DATA.260
AMDU-00108: file name invalid [+DATA.260]
[grid@dbhost01 amdu_2019_08_09_11_04_26]$ amdu -extract DATA.260
amdu_2019_08_09_14_20_11/
AMDU-00210: No disks found in diskgroup DATA
AMDU-00210: No disks found in diskgroup DATA
[grid@dbhost01 amdu_2019_08_09_11_04_26]$ amdu -diskstring "/dev/asmdisk*" -extract DATA.260
amdu_2019_08_09_14_20_42/
[grid@dbhost01 amdu_2019_08_09_11_04_26]$ ls -l amdu_2019_08_09_14_20_42
total 18072
-rw-r--r-- 1 grid oinstall 18497536 Aug 9 14:20 DATA_260.f
-rw-r--r-- 1 grid oinstall 7306 Aug 9 14:20 report.txt
[grid@dbhost01 amdu_2019_08_09_11_04_26]$
[grid@dbhost01 amdu_2019_08_09_11_04_26]$
[grid@dbhost01 amdu_2019_08_09_11_04_26]$
3. 從控制檔案中獲取資料檔案,日誌等資訊
[grid@dbhost01 amdu_2019_08_09_14_20_42]$ strings DATA_260.f | grep +DATA > DATAFILE_ORCL.txt
[grid@dbhost01 amdu_2019_08_09_14_20_42]$
[grid@dbhost01 amdu_2019_08_09_14_20_42]$ ls -l
total 18076
-rw-r--r-- 1 grid oinstall 18497536 Aug 9 14:20 DATA_260.f
-rw-r--r-- 1 grid oinstall 987 Aug 9 14:23 DATAFILE_ORCL.txt
-rw-r--r-- 1 grid oinstall 7306 Aug 9 14:20 report.txt
[grid@dbhost01 amdu_2019_08_09_14_20_42]$ more DATAFILE_ORCL.txt
+DATA/orcl/onlinelog/group_2.262.1008261231
+DATA/orcl/onlinelog/group_1.261.1008261231
4. 按照第三步的輸出,抽取出日誌檔案,資料檔案等等
amdu -diskstring "/dev/asmdisk*" -extract DATA.259
amdu -diskstring "/dev/asmdisk*" -extract DATA.258
amdu -diskstring "/dev/asmdisk*" -extract DATA.257
amdu -diskstring "/dev/asmdisk*" -extract DATA.256
amdu -diskstring "/dev/asmdisk*" -extract DATA.263
amdu -diskstring "/dev/asmdisk*" -extract DATA.264
amdu -diskstring "/dev/asmdisk*" -extract DATA.265
amdu -diskstring "/dev/asmdisk*" -extract DATA.266
amdu -diskstring "/dev/asmdisk*" -extract DATA.267
amdu -diskstring "/dev/asmdisk*" -extract DATA.262
amdu -diskstring "/dev/asmdisk*" -extract DATA.261
5. 新建例項,利用抽取的控制檔案,啟動至mount
並使用alter database rename file改名等啟動資料庫
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8520577/viewspace-2653174/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 12C ASM asmcmd amdu_extractOracleASM
- rac壞了asm盤進不去怎麼辦?amdu來辦幫你ASM
- Oracle Linux 7使用syslog來管理Oracle ASM的審計檔案OracleLinuxASM
- 2.10.3 使用 Oracle Automatic Storage Management (Oracle ASM) 克隆資料庫OracleASM資料庫
- 【BUILD_ORACLE】使用ASMLib包搭建ASM磁碟UIOracleASM
- Oracle ASM神書《撥雲見日 解密Oracle ASM核心》出版了OracleASM解密
- Oracle ASM擴容(NFS)OracleASMNFS
- 【ASM】Oracle asm刪除磁碟組注意事項ASMOracle
- Oracle Linux 7使用cron來管理Oracle ASM審計檔案目錄的增長OracleLinuxASM
- Oracle ASM Cluster File Systems (ACOracleASM
- Oracle:ASM & 密碼檔案OracleASM密碼
- Oracle使用RMAN將普通資料檔案轉成ASMOracleASM
- ORACLE ASM的SSD磁碟空間回收分析OracleASM
- Oracle ASM使用asmcmd中的cp命令來執行遠端複製OracleASM
- Oracle 12C Database File Mapping for Oracle ASM FilesOracleDatabaseAPPASM
- 12C Oracle ASM Filter DriverOracleASMFilter
- Oracle ASM Rebalance執行過程OracleASM
- Overview of Oracle Flex ASM In Oracle 19c RAC-20220111ViewOracleFlexASM
- 【ASM】Oracle asm磁碟被格式化,如何掛載該磁碟組ASMOracle
- 【Oracle】ASM例項安裝入門OracleASM
- ORACLE ASM磁碟組空間溢位OracleASM
- 關於Oracle 10g ASM磁碟大小的限制Oracle 10gASM
- Oracle RAC日常運維-ASM磁碟擴容Oracle運維ASM
- Oracle ASM磁碟組擴容(AIX7.1)OracleASMAI
- Oracle asm磁碟損壞異常恢復OracleASM
- oracle asm 資料塊重構恢復OracleASM
- Oracle RAC ASM磁碟組擴容時遇到的VIP漂移OracleASM
- 【ASK_ORACLE】Oracle RAC配置ASM Filter Driver(ASMFD)(一)ASMFD簡介OracleASMFilter
- 如何檢視Oracle RAC的asm磁碟的udev對應關係OracleASMdev
- AMDU資料抽取案例一則
- Oracle OCP(42):ASM 儲存結構簡介OracleASM
- Oracle ASM故障資料恢復解決方案OracleASM資料恢復
- Oracle RAC環境下ASM磁碟組擴容OracleASM
- Oracle資料庫 ASM磁碟線上擴容Oracle資料庫ASM
- 12C__單機安裝Grid+Oracle的方法,ASM使用UDEV進行磁碟繫結OracleASMdev
- 【UP_ORACLE】使用AutoUpgrade工具升級Oracle 11.2.0.4至12.2.0.1Oracle
- 通過ORACLE VM virtualbox環境安裝oracle 11G RAC(ASM)OracleASM
- ORACLE RAC 11.2.0.4 ASM加盤導致叢集重啟之ASM sga設定過小OracleASM