当前位置:Gxlcms > mysql > Oracle10gamdu工具使用

Oracle10gamdu工具使用

时间:2021-07-01 10:21:17 帮助过:30人阅读

Oracle 10g amdu工具使用,前几天采用amdu工具为客户恢复过oracle 11g的一个数据库,后来仔细找了下资料,发现在10g上其实也可以

前几天采用amdu工具为客户恢复过Oracle 11g的一个数据库,后来仔细找了下资料,发现在10g上其实也可以使用该工具,但是需要自己安装

在ASM的OCR磁盘损坏后,数据库无法正常使用可以使用amdu将数据文件抽取出来,其实这个工具在10g也可以使用,不过需要配置安装才可以。,在10g的ASM中要使用AMDU工具,需要自行下载安装:

Linux X86 (Platform 46) amdu_lnx_32.zip

Linux X86-64 AMD64/EM64T (Platform 226) amdu_lnx_X86-64.zip

Solaris 10 Sparc 64bit (Platform 23) amdu_solaris10_64.zip

Solaris 9 Sparc 64bit (Platform 23) amdu_solaris9_64.zip

HP-UX PA-RISC 64bits (Platform 59) amdu_HP-PARISC.zip

HP-UX Itanium (Platform 197) amdu_hp_itanium.zip

AIX amdu_aix.zip

分别下载三个工具后,直接上传到ORACLE 软件目录一个目录,,解压即为安装,解压后的文件目录下会存在如下四个文件:

1. amdu -- amdu binary
2. libclntsh.so.11.1
3. libnnz11.so
4. libskgxp11.so

将如上的文件路径配加入环境变量即可

$cd
$export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`
or $setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:`pwd`
$export PATH=$PATH:`pwd` or setenv PATH ${PATH}:`pwd`

这时候可以使用amdu查看任意asm磁盘的相关信息:

-bash-3.2$ ./amdu -diskstring '/dev/raw/raw3'
amdu_2012_02_26_19_00_17/

运行后默认会生成一个 命名方式为amdu_YYYY_MM_DD_HH24_MM_SS文件夹,如上可见
-bash-3.2$ cd amdu_2012_02_26_19_00_17/
-bash-3.2$ ls
report.txt
-bash-3.2$ more report.txt
-*-amdu-*-

******************************* AMDU Settings ********************************
ORACLE_HOME = /opt/rac/database
System name: Linux
Node name: primary
Release: 2.6.18-164.el5
Version: #1 SMP Tue Aug 18 15:51:54 EDT 2009
Machine: i686
amdu run: 26-FEB-12 19:00:17
Endianess: 1

--------------------------------- Operations ---------------------------------

------------------------------- Disk Selection -------------------------------
-diskstring '/dev/raw/raw3'

------------------------------ Reading Control -------------------------------

------------------------------- Output Control -------------------------------

********************************* DISCOVERY **********************************

----------------------------- DISK REPORT N0001 ------------------------------
Disk Path: /dev/raw/raw3
Unique Disk ID:
Disk Label:
Physical Sector Size: 512 bytes
Disk Size: 8032 megabytes
Group Name: DATA
Disk Name: DATA_0000
Failure Group Name: DATA_0000
Disk Number: 0
Header Status: 3
Disk Creation Time: 2011/01/21 17:47:28.754000
Last Mount Time: 2012/02/15 09:44:27.166000
Compatibility Version: 0x0a100000
Disk Sector Size: 512 bytes
Disk size in AUs: 8032 AUs
Group Redundancy: 1
Metadata Block Size: 4096 bytes
AU Size: 1048576 bytes
Stride: 113792 AUs
Group Creation Time: 2011/01/21 17:47:27.971000
File 1 Block 1 location: AU 2

******************************* END OF REPORT ********************************

导出DATA磁盘组的相关信息:

-bash-3.2$ ./amdu -diskstring '/dev/raw/raw*' -dump 'DATA'
amdu_2012_02_26_19_10_18/

这个时候会生成三个文件

DATA1_0001.img -- could be more than one. size is limited to 2gb.
DATA1.map
report.txt


如上三个文件分别是如下作用
1. report.txt
Like the name, it include details about the disks scanned (name, diskgroup name, failgroup name, size, creation time, etc).
2. *.map
For every diskgroup referenced on command -dump, will be a *.map file, which can be used to find the exact location of the ASM metadata on the disks. This file is a key component when reviewing specific areas of the metadata.
3. *.img
For each diskgroup, could be many image files. The size is limited to 2gb and will be a exact dump of the content of the diskgroup.

linux

人气教程排行