博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Steps to Re-Create ASM Diskgroups
阅读量:5277 次
发布时间:2019-06-14

本文共 4278 字,大约阅读时间需要 14 分钟。

 

 

       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 "<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 corrupted
      If you have seen this error or another error indicating ASM metadata corruption 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 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

 

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

       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<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 to
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

-------------------------------------------------------------------------------------------------------

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

Email: dvd.dba@gmail.com

DBA1 群:62697716();   DBA2 群:62697977()   DBA3 群:62697850()  

DBA 超级群:63306533();  DBA4 群: 83829929  DBA5群: 142216823   

聊天 群:40132017   聊天2群:69087192

--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请

转载于:https://www.cnblogs.com/sqlite3/archive/2011/04/25/2568174.html

你可能感兴趣的文章
UVA1629 Cake slicing
查看>>
微信公众号开发入门---STATE 1:入门回复,菜单
查看>>
SSH学习(2)
查看>>
应用系统开发思想的变迁
查看>>
queue
查看>>
记录-- vue+element树节点的标注
查看>>
Inherits、CodeFile、CodeBehind
查看>>
使用Exceptionless记录日志
查看>>
Migration Necessary
查看>>
php第七节课
查看>>
高次同余方程求解
查看>>
[分治FFT]「CTSC2018」青蕈领主
查看>>
【转】NSMutableArray的正确使用
查看>>
CV届牛人
查看>>
jquery 点滴
查看>>
2016年5月29日周总结
查看>>
jQuery使用总结 - Core jQuery Selectors 选择器一2/4
查看>>
Python 优先级
查看>>
Splay(单点修改+查询)
查看>>
ASP.NET模板引擎技术
查看>>