11.07.2015 Views

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 9 ■ STORAGE MANAGEMENT 401backup text file. The md_restore command uses this text file and converts it into SQL commands torestore the custom user-defined metadata for the diskgroups. You can view the ASM alert logfile to see the SQL generated by the md_restore command. We’ll provide an example of this inthe next section when we demonstrate a complete ASM diskgroup backup and recovery.With the md_backup command, users have the option to back up one or more diskgroups.The diskgroup names are delimited by commas. By default, the MDB file is created in the currentworking directory. This can be overwritten by providing a fully qualified file name. Not specifyingthe diskgroup(s) to the md_backup command will, by default, build metadata information for alldiskgroups that are mounted.Because the MDB file is a text file, users will be tempted to modify this file. You should beextremely cautious when modifying this file because ASM does not validate the syntax or accuracyof the flat file. The md_restore command simply converts this file into SQL statements andexecutes it. Please back up this file before making any modifications to it. Having said all this,modifying the MDB backup file can be very useful. You can manipulate this file so that onlycertain ASM objects are restored instead of restoring the entire diskgroup.You will see in the “Metadata Backup and Restore Demonstration” section that the MDBfile has four distinct sections: disk information, diskgroup information, alias information, andtemplate information. This tag is used by the md_restore command to locate the section in thebackup file.■Caution As mentioned, please exercise caution when modifying the MDB backup file. User errors cancause sections to be skipped.In the disk section of the MDB file labeled as DISKSINFO, information about diskgroupname, disk label name, disk path, OS size/ASM size of the disk, and failgroup name will becaptured. For the diskgroup section labeled as DGINFO, characteristics of the diskgroup name,redundancy type, ASM/RDBMS compatibility, and AU size will be captured. For the alias directioninformation section labeled as ALIASINFO, the MDB file has information about the diskgroup name,directory level, and alias name with the full path of the alias entry. Lastly, the template sectionlabeled as TEMPLATEINFO houses relevant information for all system and nonsystem (user-defined)templates. For each template, the diskgroup name, template name, redundancy, stripe, andsystem designator is stored. All of this information is pertinent to the md_restore command.Restore Diskgroup Using md_restoreThe md_restore command of asmcmd performs an ASM metadata restore for a diskgroup. This utilityreads the MDB backup file and essentially builds the required SQL statements to rebuild all thecomponents of the diskgroup including templates, aliases, directories, and diskgroup names.This utility restores only the ASM diskgroup metadata information. Coupled with RMAN, youcan achieve a higher level of data protection. You must still have a good RMAN backup. After asuccessful restore of the ASM diskgroup metadata, you can restore the database using RMAN.This utility has several options. It can be used to restore the MDB backup file as is, or it canperform transformations of the diskgroup name. At the same time, you have the option to restorejust one diskgroup or multiple diskgroups or all the diskgroups specified in the backup file.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!