1. 查看活動的文件有哪些
SQL> select group_number, file_number, bytes, type from v$asm_file;
GROUP_NUMBER FILE_NUMBER BYTES TYPE
------------ ----------- ---------- ----------------------------------------------------------------------
1 253 1536 ASMPARAMETERFILE
2. 將spfile轉成pfile往外存
SQL> create pfile='/grid/base/grid/dbs/spfile_asm.ora' from spfile;
File created.
3. 關閉Instance,用新建的pfile開機
SQL> shutdown immediate;
ASM diskgroups volume disabled
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup pfile='/grid/base/grid/dbs/spfile_asm.ora';
ASM instance started
Total System Global Area 283930624 bytes
Fixed Size 2212656 bytes
Variable Size 256552144 bytes
ASM Cache 25165824 bytes
ORA-15110: no diskgroups mounted
SQL> alter diskgroup "DATA" mount;
Diskgroup altered.
4. 刪除asm內的spfile與檔案
[grid@rh5-ora11g ~]$ asmcmd
ASMCMD> ls
DATA/
ASMCMD> cd data
ASMCMD> ls
ASM/
ASMCMD> cd asm
ASMCMD> ls
ASMPARAMETERFILE/
ASMCMD> rm -rf *
ASMCMD> ls
ASMCMD-08002: entry 'asm' does not exist in directory '+data/'
ASMCMD> cd +data
ASMCMD> ls
ASMCMD> exit
[grid@rh5-ora11g ~]$
SQL> drop diskgroup "DATA";
Diskgroup dropped.
5. 使用asmca創建新的ASM磁區
6. 建立spfile給新ASM用的文件,並動啟ASM
[grid@rh5-ora11g dbs]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on 星期五 12月 7 00:09:09 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> conn /as sysasm
已連接。
SQL> create spfile='+DATA' from pfile='/grid/base/grid/dbs/spfile_asm.ora';
File created.
SQL> shutdown immediate;
ASM diskgroups volume disabled
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup
ASM 實例已啟動
Total System Global Area 283930624 bytes
Fixed Size 2212656 bytes
Variable Size 256552144 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
ASM diskgroups volume enabled
http://blog.csdn.net/snowfox326043/article/details/8265766
0 留言