删除ASM残留信息方法和重建步骤

删除ASM残留信息方法和重建步骤

node1&&node2都运行一下命令
cd /opt/ora10g/product/10.2.0/db_1/dbs
rm -rf *
cd /opt/ora10g/admin
rm -rf *

dd if=/dev/zero of=/dev/raw/raw3 bs=8192 count=12800
dd if=/dev/zero of=/dev/raw/raw4 bs=8192 count=12800

dd if=/dev/zero of=/dev/raw/raw1 bs=8192 count=12800[crs disk ]
dd if=/dev/zero of=/dev/raw/raw2 bs=8192 count=12800[vot disk]
/etc/init.d/oracleasm createdisk NOVA1 /dev/sdd1
/etc/init.d/oracleasm createdisk NOVA2 /dev/sde1
vi /etc/oratab [删除+ASM相关字段]

crs_unregister ora.node2.ASM2.asm
crs_unregister ora.node1.ASM1.asm

删除ASM实例的方法

[oracle@node1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 – Production on Sun Apr 26 14:56:13 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> select instance_name from v$asm_client;

no rows selected

SQL> select name from v$asm_diskgroup;

NAME
——————————
RAC_DISK

SQL> drop diskgroup RAC_DISK including contents ;

Diskgroup dropped.
SQL> shutdown immediate
ORA-15100: invalid or missing diskgroup name
ASM instance shutdown

[oracle@node1 ~]$ oradism -delete -asmsid +ASM
[oracle@node1 ~]$ oradism -delete -asmsid +ASM1
[oracle@node1 ~]$ oradism -delete -asmsid +ASM2
srvctl stop asm -n node1
srvctl stop asm -n node2

[oracle@node2 ~]$ crs_stat -t
Name Type Target State Host
————————————————————
ora….SM1.asm application ONLINE ONLINE node1
ora….E1.lsnr application OFFLINE OFFLINE
ora.node1.gsd application ONLINE ONLINE node1
ora.node1.ons application ONLINE ONLINE node1
ora.node1.vip application ONLINE ONLINE node1
ora….SM2.asm application ONLINE OFFLINE
ora….E2.lsnr application OFFLINE OFFLINE
ora.node2.gsd application ONLINE ONLINE node2
ora.node2.ons application ONLINE ONLINE node2
ora.node2.vip application ONLINE ONLINE node2
[oracle@node2 ~]$ crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy

srvctl add asm -n node1 -i +ASM1 -o /opt/ora10g/admin

删除自动存储管理实例+ASM
实例+ASM的删除是在数据库被卸载之后完成的,并删除/ORACLE_HOME/dbs目录下的所有文件(除了与ASM相关的)。因此必须完成下列步骤:
1)在命令提示符中,设置oracle_sid环境变量为+ASM实例:
# export oracle_sid=+ASM
2)启动SQL*Plus并以sys用户连接到自动存储管理+ASM实例:
# sqlplus / as sysdba
3)使用下列命令来确定是否有数据库实例正在使用自动存储管理实例+ASM:
SQL>select instance_name from v$asm_client;
该命令结果列出所有正在运行并使用+ASM实例的数据库实例。只要+ASM包含正在支持的数据库实例,就不能删除该+ASM实例。
4)如果没有与+ASM相关联的数据库实例,则删除与该实例相关联的磁盘组。
首先,识别与+ASM相关联的磁盘组:
SQL>select name from v$asm_diskgroup;
其次,用下列命令删除每个要删除的磁盘组:
SQL>drop diskgroup<disk_group_name>including contents;
5)关闭+ASM实例并退出SQL*Plus:
SQL>shutdown
SQL>exit
6)在命令提示符中输入下列命令,删除+ASM服务:
oradim -delete -asmsid +ASM

你可能感兴趣的:(oracle,sql,css,sun)