orapwd file=orapw+ASM1 password=Gmcc1234 force=y
注:修改时需要在各个RAC节点执行
3. 修改验证(在节点RAC1)
export ORACLE_SID=+ASM1
sqlplus sys/Gmcc1234 as sysdba可以进入
SQL*Plus: Release 11.1.0.7.0 - Production on Sat Dec 25 10:27:44 2010
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL>
ASM磁盘管理总结
2010-12-25 15:52
先谈谈如何进行ASM管理,我暂时总结有两种方式进入: 方法一:
oracle@GDGZ-DCS-SV01C-RAC01:~> export ORACLE_SID=+ASM1 oracle@GDGZ-DCS-SV01C-RAC01:~>sqlplus / as sysasm
SQL*Plus: Release 11.1.0.7.0 - Production on Sat Dec 25 10:27:44 2010
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options
SQL> select group_number, name, type, total_mb, free_mb 2 from v$asm_diskgroup;
1 DG_DATA EXTERN 1216512 1216325 2 DG_IDX EXTERN 399360 399180 3 DG_ORA EXTERN 92271 91877
方法二:
oracle@GDGZ-DCS-SV01C-RAC01:~> export ORACLE_SID=+ASM1 oracle@GDGZ-DCS-SV01C-RAC01:~>asmcmd ASMCMD>
ASMCMD>lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name
MOUNTED EXTERN N 512 4096 1048576 1216512 1216325 0 1216325 0 DG_DATA/
MOUNTED EXTERN N 512 4096 1048576 399360 399180 0 399180 0 DG_IDX/
MOUNTED EXTERN N 512 4096 1048576 92271 91877 0 91877 0 DG_ORA/ ASMCMD>lsdsk Path
/dev/raw/raw1 /dev/raw/raw2 /dev/raw/raw3 /dev/raw/raw4 /dev/raw/raw5 ASMCMD>pwd +
ASMCMD> du
Used_MB Mirror_used_MB 216 216 ASMCMD>ls DG_DATA/ DG_IDX/ DG_ORA/
个人比较推荐第二种方式,因为和常用的磁盘操作很类似(比如ls/cd/rm/cp等命令都可以使用)
我在RAC建库时就碰到这样一个问题:
1,第一次建库时进行到4%,发现日志文件的模板搞错了,立即停止执行建库 2,重新修改正确后,再次建库,提示控制文件别名已被使用
于是我使用第二种方法进入ASM磁盘管理: ASMCMD> cd DG_ORA ASMCMD>ls ORA/
ASMCMD> cd ORA ASMCMD>ls CONTROLFILE/ control01.ctl control02.ctl control03.ctl control11.ctl control12.ctl control13.ctl control21.ctl control22.ctl control23.ctl
果然看到了已经建好的控制文件(由于我试过几次修改控制文件别名,所以导致控制文件有9个),删除上面的控制文件
可见control01.ctl只是一个链接(其实就是前面设置的别名),无法删除,必须进入到对应的摸板目录删除真实的数据文件
ASMCMD> cd CONTROLFILE/ ASMCMD>ls
Current.256.738606603