AMDU--ASM File Transfer Tool

Source: Internet
Author: User
Recently, a problem occurs: ASMdiskgroup cannot be mounted. After analysis, it is found that there will be a problem quickly, but because there is no backup, there is no way to recreate diskgroup and restore from backup -- so .... backup

Recently, a problem occurs: ASMdiskgroup cannot be mounted. After analysis, it is found that there will be a problem quickly, but because there is no backup, there is no way to recreate diskgroup and restore from backup -- so .... backup


A problem recently occurs: the ASM diskgroup cannot be mounted. After analysis, it is found that there will be a problem quickly, but because there is no backup, there is no way to recreate diskgroup and restore from backup -- so .... backup is very important! Otherwise, cry !! It's morning and evening!

By solving this problem, I tested in my own test environment how to save the data files whenever the ASM diskgroup cannot be mounted.

The oracle tool AMDU is used here. For more information, see AMDU functionality and usage (Doc ID 855791.1)


1. Since diskgroup cannot be mounted, SPFILE, CONTROLFILE, and DATAFILE cannot be read.

According to the steps, we first need to restore the spfile. The spfile exists in the position of control_files. If the spfile cannot be accessed, we need to find the backup.

SQL> show parameter control_files + DATA/db/controlfile/current.260.804295233, + FRA/db/controlfile/current.256.804295237

2. Find asm_diskstring through the ASM instance

SQL> show parameter diskNAMETYPEVALUE ------------------------------------ -------------------------------------- asm_diskgroupsstringDATA, FRAasm_diskstringstring/dev/sd *

3. Find the path of the asm disk and specify diskstring to scan the disk later.

SQL> select NAME, STATE, TYPE, OFFLINE_DISKS, VOTING_FILES from v $ asm_diskgroup; SQL> col PATH for a50 SQL> col name for a10 SQL> set line 200 SQL> select DISK_NUMBER, GROUP_NUMBER, PATH, name from v $ asm_disk; DISK_NUMBER GROUP_NUMBER PATHNAME ------------------ bytes ---------- 12/dev/oracleasm/disks/logs/dev/oracleasm/disks/worker GROUP_NUMBER PATHNAME ---------------- hour ---------- 11/ dev/oracleasm/disks/ASMDISK2DATA_000101/dev/oracleasm/disks/ASMDISK1DATA_0000

4. In the diskgroup mount status, you cannot use amdu to export files.

An error occurred while executing the amdu command to start exporting.

$ Amdu-diskstring '/dev/oracleasm/disks/ASMDISK *'-extract data.260amdu _ 2013_07_03_17_29_13/AMDU-00204: Disk N0005 is in currently mounted diskgroup DATAAMDU-00201: Disk N0005: '/dev/oracleasm/disks/ASMDISK1'

Check disk mount

$ Crsctl status res-t configure NAMETARGET STATESERVERSTATE_DETAILS using ora. DATA. dgONLINE ONLINEsingle-dbora.FRA.dgONLINE ONLINEsingle-db

5. Export Control Files

$ Amdu-diskstring '/dev/oracleasm/disks/ASMDISK *'-extract data.260amdu _ 2013_07_03_17_46_07/[oracle @ Single-DB amdu] $ cd release/[oracle @ Single-DB release] $ lsDATA_260.f report.txt


6. Try to mount the control file

The spfile is also stored in the disk group and cannot be nomounted.

$ Sqlplus/as sysdbaSQL> startup nomount; ORA-01078: failure in processing system parametersORA-01565: error in identifying file '+ DATA/db/spfiledb. ora 'ora-17503: ksfdopn: 2 Failed to open file + DATA/db/spfiledb. oraORA-15056: additional error messageORA-17503: ksfdopn: DGOpenFile05 Failed to open file + DATA/db/spfiledb. oraORA-17503: ksfdopn: 2 Failed to open file + DATA/db/spfiledb. oraORA-15001: diskgroup "DATA" does not exist or is not mountedORA-06512: at line 4

7. edit a new pfile file.

$ Cp init. ora spfilebk. ora $ vi spfilebk. ora ~~~~~~~~~~~~~~~ Db_name = 'db' sga _ target = 1 Gprocesses = 150audit_trail = 'db' DB _ block_size = 8192db_domain = ''db _ partition = 2Gopen_cursors = partition = 'exclusive 'undo _ tablespace = 'undotbs1 'control _ files =/u01/amdu/amdu_2013_07_03_17_46_07/DATA_260.fcompatible = '11. 2.0 '~~~~~~~~~~~~~~~

8. Start the database to mount mode through the exported control file. If the database is successfully started, the exported data is correct. Continue .....

$ Sqlplus/as sysdbaSQL> startup nomount pfile = '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfilebk. ora '; ORACLE instance started. total System Global Area 1068937216 bytesFixed Size2220200 bytesVariable Size281022296 bytesDatabase Buffers780140544 bytesRedo Buffers5554176 bytesSQL> alter database mount; Database altered.

9. view the location of the data file and then export it one by one.

SQL> select name from v $ datafile; NAME extension + DATA/db/datafile/system.256.804295135 + DATA/db/datafile/partition + DATA/db/datafile/users.259.804295141 $ amdu-diskstring '/ dev/oracleasm/disks/ASMDISK * '-extract data.256 <

10. Rename the data file and move it to the same directory to prepare to mount the data file.

$ Mv hour/DATA_257.f hour $ mv hour/DATA_259.f users.259.804295141 $ mv hour/DATA_258.f hour $ ll-rw-r -- 1 oracle dba 545267712 Jul 3 hour-rw-r -- r -- 1 oracle dba 702554112 Jul 3 system.256.804295135-rw-r -- 1 oracle dba 99622912 Jul 3 hour-rw-r -- 1 oracle dba 5251072 Jul 3 22 users.259.804295141

11. You need to modify the pfile file before mounting. The following figure shows how to identify datafile in different paths in the open Database control file. I use the convert parameter to solve this problem (or set newname)

Db_file_name_convert = '+ DATA/db/datafile','/u01/amdu/amdu_datafile'

After pfile is added, the database is started and the database is started successfully.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.