Steps to re-create ASM diskgroups

Source: Internet
Author: User

 

 

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 saved med
ORA-15063: diskgroup "<disk group name>" lacks quorum of 2 PST disks; 0 found

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 too upted

If you have seen this error or another error indicating ASM metadata upload uption and have verified that the disk (s) is visable with correct permissions on the operating system and that the asm_diskstring parameter is set correctly, your ASM metadata may be uploaded upted. 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

 

Step 1: ensure that you have a prior RMAN backup of all databases using ASM

The only way you can recover from ASM metadata upload uption is to have a prior RMAN backup of the database in an area that wocould not be affected by an ASM instance outage. as part of your recovery strategy, you shoshould 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 <Sid>. ora'
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!

 

Step 2: shutdown your ASM instance (s)

 

Stop your database instances and ASM instances with sqlplus or srvctl (RAC)

Sqlplus example:

setenv ORACLE_SID +ASM
sqlplus '/ as sysdba'
SQL> shutdown immediate

setenv ORACLE_SID DBSCOTT
sqlplus '/ as sysdba'
SQL> shutdown immediate

SRVCTL (RAC) Example:

srvctl stop asm -n <node name 1>
srvctl stop asm -n <node name 2>
srvctl stop database -d <DB_NAME>

 

Step 3: re-create your ASM disk group (s)

 

Set your oracle_sid to your ASM instance and create a new diskgroup. Example:

setenv ORACLE_SID +ASM
sqlplus '/ as sysdba'
SQL> startup nomount
SQL> create diskgroup data disk '/dev/rdsk/c1t4d0s4' force;
SQL> shutdown immediate
SQL> startup mount

 

Step 4: Restore database

 

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 <Sid>. ora

2. Use RMAN to restore the controlfiles and database. Example:

RMAN target/
RMAN> restore controlfile from '/U03/backup/ctrlf _ <string>'; -- where <string> is the unique string generated by % u.
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 <Sid>. ora and change the control_files parameter to point
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.

 

 

 

 

From Oracle

Bytes -------------------------------------------------------------------------------------------------------

Blog: http://blog.csdn.net/tianlesoftware

Email: dvd.dba@gmail.com

Dba1 group: 62697716 (full); dba2 group: 62697977 (full) dba3 group: 62697850 (full)

Super DBA group: 63306533 (full); dba4 group: 83829929 dba5 group: 142216823

Chat group: 40132017 chat 2 group: 69087192

-- Add the group to describe the relationship between Oracle tablespace and data files in the remarks section. Otherwise, the application is rejected.

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.