Environment Description:
Operating System: centos 5x86
Database: Oracle 10.2.0.1 non-RAC Environment
ASM instance name: + ASM
Refer to Metalink node: 311350.1
1. Check the process of the ASM instance.
Ora_test @ Oracle [/home/Oracle]> PS-Ef | grep ASM | grep-V grep Oracle 4263 1 0 jan20? 00:00:02 asm_pmon _ + ASM Oracle 4265 1 0 jan20? 00:00:00 asm_psp0 _ + ASM Oracle 4267 1 0 jan20? 00:00:00 asm_mman _ + ASM Oracle 4269 1 0 jan20? 00:00:00 asm_dbw0 _ + ASM Oracle 4271 1 0 jan20? 00:00:00 asm_lgwr _ + ASM Oracle 4273 1 0 jan20? 00:00:00 asm_ckpt _ + ASM Oracle 4275 1 0 jan20? 00:00:00 asm_smon _ + ASM Oracle 4277 1 0 jan20? 00:00:00 asm_rbal _ + ASM Oracle 4279 1 0 jan20? 00:00:06 asm_gmon _ + ASM |
2. Set the ASM instance name
Ora_test @ Oracle [/home/Oracle]> export oracle_sid = + ASM |
3. check whether there are instances Using ASM
Ora_test @ Oracle [/home/Oracle]> sqlplus/As sysdba SQL * Plus: Release 10.2.0.1.0-production on Thu Jan 21 08:44:03 2010 Copyright (c) 1982,200 5, Oracle. All rights reserved. Connected: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production With the partitioning, OLAP and Data Mining options Idle> select instance_name from V $ asm_client; No rows selected
|
If an instance is Using ASM, stop the related instances and back up the related datafile and controlfile.
4. Check the diskgroup on the ASM instance.
Idle> select name from V $ asm_diskgroup; Name ------------------------------ Data |
5. Delete the diskgroup on the ASM instance
Idle> drop diskgroup data including contents; Diskgroup dropped. |
6. Close the ASM instance
Idle> Shutdown ORA-15100: Invalid or missing diskgroup nameASM instance Shutdown Idle> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production With the partitioning, OLAP and Data Mining options |
7. Delete ASM instance information from CSS
Ora_test @ Oracle [/home/Oracle]> oradism-delete-asmsid + ASM |
8. delete files related to the ASM instance, such as spfile and pfile.
Ora_test @ Oracle [/home/Oracle]> Cd $ ORACLE_HOME/dbs Ora_test @ Oracle [/Oracle/APP/10.1/DBS]> RM-f * + ASM * Ora_test @ Oracle [/Oracle/APP/10.1/DBS]> Cd $ oracle_base/admin Ora_test @ Oracle [/Oracle/admin]> RM-RF + ASM |
9. Delete the ASM instance related lines in the/etc/oratab file.
Delete the following lines in the/etc/oratab File
In fact, to delete an oracle instance, you also need to find the content of this file.
+ ASM:/Oracle/APP/10.1: Y |
10. Use the root user to delete the cssd Service
Ora_test @ root [/Oracle/APP/10.1/bin]>./localconfig Delete Stopping cssd. Shutting down CSS daemon. Shutdown request successfully issued. Shutdown has begun. The daemons shoshould exit soon. |
11. Clear the file header information of the device used by ASM.
Ora_test @ Oracle [/home/Oracle]> Cd/dev/raw/ Ora_test @ Oracle [/dev/raw]> ls-L * CrW ------- 1 Oracle oinstall 162, 1 Jan 21 raw1 CrW ------- 1 Oracle oinstall 162, 2 Jan 21 raw2 CrW ------- 1 Oracle oinstall 162, 3 Jan 21 raw3 Ora_test @ Oracle [/dev/raw]> dd If =/dev/Zero of =/dev/raw/raw1 BS = 1024 COUNT = 10 10 + 0 records in 10 + 0 records out 10240 bytes (10 KB) Copied, 0.00396028 seconds, 2.6 MB/S Ora_test @ Oracle [/dev/raw]> dd If =/dev/Zero of =/dev/raw/raw2 BS = 1024 COUNT = 10 10 + 0 records in 10 + 0 records out 10240 bytes (10 KB) Copied, 0.00485093 seconds, 2.1 MB/S Ora_test @ Oracle [/dev/raw]> dd If =/dev/Zero of =/dev/raw/raw3 BS = 1024 COUNT = 10 10 + 0 records in 10 + 0 records out 10240 bytes (10 KB) Copied, 0.00532261 seconds, 1.9 MB/S |