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 a免费云主机域名mdu_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改名等启动数据库











相关推荐: linux7安装rac11.2.0.4 安装数据库软件选择不到节点

解决方式如下:[root@ora02std ContentsXML]# pwd/u01/app/oraInventory/ContentsXML[root@ora02std ContentsXML]#[root@ora0免费云主机域名2std Contents…

免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。

(0)
打赏 微信扫一扫 微信扫一扫
上一篇 12/31 18:08
下一篇 12/31 18:09