To provide a method of re-creating ASM diskgroups.
This document is intended for DBAs and Support Engineers who need to re-create ASM diskgroups.
In the event you cannot mount your ASM disk groups, you will be unable to start any databases using those disk groups. Here is a possible error reported when mounting ASM disk groups:
SQL> startup mount
ORA-15032: not all alterations performed
ORA-15063: diskgroup "
This error may occur if:
a) ASM disk(s) is not visible on the operating system.
b) asm_diskstring parameter is not set correctly on ASM instance(s)
c) ASM metadata in disk is overwritten or corrupted
If you have seen this error or another error indicating ASM metadata corruption and have verified that the disk(s) is visible with correct permissions on the operating system and that the asm_diskstring parameter is set correctly, your ASM metadata may be corrupted. If this is the case, you may need to re-create your ASM instance(s) and disk group(s).
The steps are:
1. Ensure that you have a prior RMAN backup of all databases using ASM
2. Shut down your ASM instance(s)
3. Re-create your ASM disk group(s)
4. Restore databases
The only way you can recover from ASM metadata corruption is to have a prior RMAN backup of the database in an area that would not be affected by an ASM instance outage. As part of your recovery strategy, you should consider integrating tape or other tertiary storage to safeguard your backups.
Example of RMAN backup:
1. Connect RMAN to the target database for backup
rman nocatalog target /
2. Now Backup your Database, Archive logs and Control files. Example:
RMAN> backup device type disk format '/u03/backup/%U' database plus archivelog;
RMAN> backup device type disk format '/u03/backup/ctrlf_%U' current controlfile;
3. Manually make copies of your spfiles. Example:
CREATE PFILE='/u03/app/oracle/product/10.1.0/dbs/init
FROM SPFILE='/+DATA/V10FJ/spfile.ora';
If you do not have a good backup of all databases (datafiles, controlfiles,
redo logs, archive logs), DO NOT CONTINUE BEYOND STEP 1!
Stop your database instances and ASM instances with sqlplus or srvctl (RAC)
SQLPLUS Example:
Set your ORACLE_SID to your ASM instance and create a new diskgroup. Example:
1. Start instance using the local copy of your pfile from step 1.
setenv ORACLE_SID DBSCOTT
sqlplus '/ as sysdba'
SQL> startup nomount pfile=init
2. Use RMAN to restore the controlfiles and database. Example:
rman target /
RMAN> restore controlfile from '/u03/backup/ctrlf_
RMAN> alter database mount;
RMAN> restore database;
RMAN> recover database;
RMAN> alter database open resetlogs;
3. Connect to the ASM instance and get the controlfile name. Example:
setenv ORACLE_SID +ASM
sqlplus '/ as sysdba'
SQL> select name, alias_directory from v$asm_alias;
Look for the controlfile name under the CONTROLFILE directory eg: Current.256.1
4. Edit the init
the one identified from the ASM v$asm_alias view.
5. Re-create the spfile. Example:
SQL> create spfile='+DATA/V10FJ/spfileV10FJ.ora'
from pfile='/u03/app/oracle/product/10.1.0/dbs/pfile.out';
6. Shutdown and restart the instance to use the newly created spfile.
7. Repeat the "STEP 5" section for additional databases.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29953799/viewspace-1420089/ ,如需转载,请注明出处,否则将追究法律责任。