创建ASM With Oracle 10G(二)
bal_+ASM
oracle 3339 1 0 15:20 00:00:00 asm_gmon_+ASM
oracle 3361 3256 0 15:28 pts/1 00:00:00 grep asm
[oracle@gtser1~]$ sqlplus "/as sysdba"
SQL*Plus:Release 10.2.0.5.0 - Production on Sat Feb 23 15:30:12 2013
Copyright(c) 1982, 2010, Oracle. All RightsReserved.
Connectedto:
OracleDatabase 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With thePartitioning, OLAP, Data Mining and Real Application Testing options
SQL>show parameter spfile;
NAME TYPE
----------------------------------------------------------
VALUE
------------------------------
spfile string
SQL>startup force;
ASMinstance started
TotalSystem Global Area 125829120 bytes
FixedSize 2094512 bytes
VariableSize 98568784 bytes
ASMCache 25165824 bytes
ORA-15110:no diskgroups mounted
SQL>show parameter spfile;
NAME TYPE
----------------------------------------------------------
VALUE
------------------------------
spfile string
/u01/oracle/10g/product/10.2.0
/db_1/dbs/spfile+ASM.ora
SQL>exit
Disconnectedfrom Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bitProduction
With thePartitioning, OLAP, Data Mining and Real Application Testing options
创建密码文件
[oracle@gtser1~]$ orapwd file=/u01/oracle/10g/product/10.2.0/db_1/dbs/orapw+ASM password=000000enter=5
Usage:orapwd file= entries= force=ignorecase= nosysdba=
where
file - name of password file (required),
password - password for SYS will beprompted if not specified at command line,
entries - maximum number of distinct DBA(optional),
force - whether to overwrite existing file(optional),
ignorecase - passwords are case-insensitive(optional),
nosysdba - whether to shut out the SYSDBAlogon (optional Database Vault only).
There must be no spaces around the equal-to(=) character.
[oracle@gtser1~]$ orapwd file=/u01/oracle/10g/product/10.2.0/db_1/dbs/orapw+ASMpassword=000000 entries=5
创建磁盘组,创建名为data01的外部冗余的磁盘组,用于存放数据文件
SQL>create diskgroup data01 external redundancy disk '/dev/raw/raw1' name disk1;
Diskgroupcreated.
将raw2添加到data01磁盘组
SQL>alter diskgroup data01 add disk '/dev/raw/raw2' name d2;
Diskgroupaltered.
创建磁盘组,创建名为fra的外部冗余的磁盘组,用于FRA
SQL>create diskgroup fra external redundancy disk '/dev/raw/raw3' name d3, '/dev/raw/raw4'name d4;
Diskgroupcreated.
SQL>select group_number,disk_number,name,header_status,failgroup,create_date,pathfrom v$asm_disk order by 1,2;
GROUP_NUMBERDISK_NUMBER NAME HEADER_STATUS FAILGROUP CREATE_DATE PATH
----------------------- ------ ------------------------ --------- ----------------------------
1 0 DISK1 MEMBER DISK1 23-FEB-13 /dev/raw/raw1
1 1 D2 MEMBER D2 24-FEB-13 /dev/raw/raw2
2 0 D3 MEMBER D3 24-FEB-13 /dev/raw/raw3
2 1 D4 MEMBER D4 24-FEB-13 /dev/raw/raw4
SQL>select group_number,name,state,type,total_mb,free_mb,usable_file_mb,required_mirror_free_mbfrom v$asm_diskgro