Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the function of the amdu_extract command in Oracle

2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "what is the function of amdu_extract command in Oracle". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what is the function of amdu_extract command in Oracle"?

The amdu_extract command is used to extract files from a disk group with the following syntax:

ASMCMD [+ DATA/cs/DATAFILE] > help amdu_extractamdu_extract Calls AMDU to extract from Synopsis amdu_extract Description The options for amdu_extract command are described below: disk group-Name of the disk group containing the file to be extracted. File-Name of the file to be extracted. Can be specified as either an absolute or a relative path. Diskstring-Specifies the value for the discovery diskstring.Examples The following example uses amdu_extract to extract the parameter file from the'+ datafile' disk group. ASMCMD [+] > amdu_extract datafile + datafile/parameterfile/spfile.ora / devices/disk*

Where diskgroup is the name of the disk group where the extracted file is located, file_name, the Oracle ASM alias of the extracted file, and disk_string is the disk string found by Oracle ASM. And amdu_extract is actually an AMDU tool called to extract files.

Query all the data files of the database cs. The name of the file to be extracted here is JY.331.976296525.

ASMCMD [+ DATA/cs/DATAFILE] > ls-lrtWARNING:option 'r 'is deprecated for 'ls'please use' reverse'Type Redund Striped Time Sys NameDATAFILE UNPROT COARSE MAR 12 18:00:00 Y SYSAUX.259.970598293DATAFILE UNPROT COARSE MAR 12 18:00:00 Y SYSTEM.258.970598233DATAFILE UNPROT COARSE MAR 12 18:00:00 Y UNDOTBS1.260.970598319DATAFILE UNPROT COARSE MAR 12 18:00:00 Y USERS.261.970598319DATAFILE UNPROT COARSE AUG 16 11:00:00 Y JY.331.976296525DATAFILE UNPROT COARSE AUG 16 11:00:00 Y SYSAUX.273.970601881DATAFILE UNPROT COARSE AUG 16 11:00:00 Y SYSTEM.272.970601831DATAFILE UNPROT COARSE AUG 16 11:00:00 Y TEST.326.976211663DATAFILE UNPROT COARSE AUG 16 11:00:00 Y UNDOTBS1.274.970601905DATAFILE UNPROT COARSE AUG 16 11:00:00 Y UNDOTBS2.284.970602381DATAFILE UNPROT COARSE AUG 16 11:00:00 Y USERS.275.970601909SQL > select name File_number from v$asm_alias where file_number4294967295 and (name like'% jy%' or name like'% JY%') NAME FILE_NUMBER -- JY.331.976296525 331ASMCMD [+ DATA/cs/DATAFILE] > amdu_extract DATA + DATA/cs/DATAFILE/JY.331.976296525 / dev/asm*ASMCMD-8024: file number could not be determined for alias name'+ DATA/cs/DATAFILE/JY.331.976296525'

< ?pre>

You can see the prompt that the file number cannot be determined by the file alias. In fact, + DATA/cs/DATAFILE/JY.331.976296525 is the data file name created by Oracle in ASM, not an alias. If we manually add the alias jy01.dbfSQL > alter diskgroup data add alias'+ DATA/cs/DATAFILE/jy01.dbf' for'+ DATA/cs/DATAFILE/JY.331.976296525';Diskgroup altered.SQL > select name,file_number from v$asm_alias where file_number4294967295 and (name like'% jy%' or name like'% JY%') to + DATA/cs/DATAFILE/JY.331.976296525 NAME FILE_NUMBER -- JY.331.976296525 331jy01.dbf 331ASMCMD [+ DATA/cs/DATAFILE] > amdu_extract DATA + DATA/cs/DATAFILE/jy01.dbf / dev/asm*amdu_2018_08_16_19_17_42/ [grid@cs1 ~] $ls-lrtdrwxr-xr-x 2 grid oinstall 40 Aug 16 19:17 amdu_2018_08_16_19_17_42 [grid@cs1 ~] $cd amdu_2018_08_16_19_17_42 [grid@cs1 amdu_2018_08_16_ 1917 October 42] $ls-lrttotal 102416 ls-1 grid oinstall 8103 Aug 16 19:17 report.txt-rw-r--r-- 1 grid oinstall 104865792 Aug 16 19:17 DATA_331.f

Use the amdu tool to extract data files by specifying Oracle ASM Discovery disk strings and disk groups. Data file serial number

[grid@cs2] $amdu-diskstring'/ dev/asm*'-extract 'DATA.331'amdu_2018_08_16_19_20_59/AMDU-00204: Disk N0004 is in currently mounted diskgroup DATA.AMDU-00201: Disk N0004:' / dev/asmdisk04' [grid@cs2 ~] $cd amdu_2018_08_16_19_20_59/ [grid@cs2 amdu_2018_08_16_19_20_59] $ls-lrttotal 102420 RW Murray 1 grid oinstall 8291 Aug 16 19:21 report.txt-rw-r--r-- 1 grid oinstall 104865792 Aug 16 19:21 DATA_331.f

You can see that the same file size extracted using amdu and asmcmd's amdu_extract is 104865792.

At this point, I believe you have a deeper understanding of "what is the role of the amdu_extract command in Oracle". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report