Create ASM With Oracle 10G

Source: Internet
Author: User

Create an ASM With Oracle 10G. Since the subsequent demonstration operations will use the ASM instance, create a simple ASM instance at the beginning of the article, and then introduce the ASM in detail. The specific procedure for creating an ASM Instance is as follows: create the relevant directory of the ASM Instance [oracle @ gtser1 ~] $ Mkdir-p $ ORACLE_BASE/admin/+ ASM/bdump [oracle @ gtser1 ~] $ Mkdir-p $ ORACLE_BASE/admin/+ ASM/cdump [oracle @ gtser1 ~] $ Mkdir-p $ ORACLE_BASE/admin/+ ASM/hdump [oracle @ gtser1 ~] $ Mkdir-p $ ORACLE_BASE/admin/+ ASM/pfile [oracle @ gtser1 ~] $ Mkdir-p $ ORACLE_BASE/admin/+ ASM/udump prepare pfile initialization parameters [oracle @ gtser1 ~] $ Vi/tmp/init + ASM. oraINSTANCE_TYPE = ASM "/tmp/init + ASM. ora" 6L, 225C has been written to [oracle @ gtser1 ~] $ Cat/tmp/init + ASM. oraINSTANCE_TYPE = ASM *. instance_name = '+ ASM '*. asm_diskstring = '/dev/raw *' background _ dump_dest =/u01/oracle/10g/admin/+ ASM/bdumpcore_dump_dest =/u01/oracle/10g/admin/ + ASM/cdumpuser_dump_dest =/u01/oracle/10g/admin/+ ASM/udump start the ASM instance [oracle @ gtser1 ~] $ Export ORACLE_SID = + ASM [oracle @ gtser1 ~] $ Sqlplus "/as sysdba" SQL * Plus: Release 10.2.0.5.0-Production on Sat Feb 23 15:20:17 2013 Copyright (c) 1982,201 0, Oracle. all RightsReserved. connectedto an idle instance. SQL> startup pfile = '/tmp/init + ASM. ora 'asminstance started TotalSystem Global Area 125829120 bytesFixedSize 2094512 bytesVariableSize 98568784 bytesASMCache 25165824 bytesORA-15110: no diskgroups mounted create spfileSQL> create spfile From pfile; createspfile from pfile * ERROR atline 1: ORA-01078: failure in processing system parametersLRM-00109: cocould not open parameter file '/u01/oracle/10g/product/10.2.0/db_1/dbs/init + ASM. ora 'SQL> create spfile from pfile ='/tmp/init + ASM. ora '; Filecreated. view instance information SQL> select instance_name, host_name, version, database_status from v $ instance; INSTAHOST_NAM VERSION DATABASE ------------------------------ -+ ASM gtser1 10.2.0.5.0 ACTIVE view disk information GROUP_NUMBERDISK_NUMBER NAME HEADER_STATUS FAILGROUP CREATE_DATE PATH certificate ----- bytes --------- bytes 0 0 CANDIDATE/dev/raw/raw4 0 1 CANDIDATE/dev/raw/raw2 0 2 CANDIDATE/dev/raw/raw3 0 0 CANDIDATE/dev/raw/raw1 view disk information SQL> select group_number, name, state, type, total_mb, free_mb from v $ asm_diskgroup order By 1, 2; no rowsselected SQL> exitDisconnectedfrom Oracle Database 10g Enterprise Edition Release 10.2.0.5.0-64 bitProductionWith thePartitioning, OLAP, data Mining and Real Application Testing options View related processes in OS [oracle @ gtser1 ~] $ Ps-ef | grep asmoracle 3323 1 0? 00:00:00 asm_pmon _ + ASMoracle 3325 1 0? 00:00:00 asm_psp0 _ + ASMoracle 3327 1 0? 00:00:00 asm_mman _ + ASMoracle 3329 1 0? 00:00:00 asm_dbw0 _ + ASMoracle 3331 1 0? 00:00:00 asm_lgwr _ + ASMoracle 3333 1 0? 00:00:00 asm_ckpt _ + ASMoracle 3335 1 0? 00:00:00 asm_smon _ + ASMoracle 3337 1 0? 00:00:00 asm_rbal _ + ASMoracle 3339 1 0? 00:00:00 asm_gmon _ + ASMoracle 3361 3256 0 00:00:00 pts/1 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,201 0, Oracle. all RightsReserved. connectedto: OracleDatabase 10g Enterprise Edition Release 10.2.0.5.0-64bit ProductionWith thePartitioning, OLAP, Data Mining and Real Application Testing options SQL> show parameter spfile; NAME TYPE success -------------------------------------------------------- -- VALUE Pair spfile string SQL> startup force; ASMinstance started TotalSystem Global Area 125829120 bytesFixedSize 2094512 bytesVariableSize 98568784 bytesASMCache 25165824 bytesORA-15110: no diskgroups mounted SQL> show parameter spfile; name type -------------------------------------- ---VALUE ------------------------------ spfile string/u01/oracle/10g/product/1 0.2.0/db_1/dbs/spfile + ASM. oraSQL> exitDisconnectedfrom Oracle Database 10g Enterprise Edition Release 10.2.0.5.0-64 bitProductionWith thePartitioning, OLAP, Data Mining and Real Application Testing options create a password file [oracle @ gtser1 ~] $ Orapwd file =/u01/oracle/10g/product/10.2.0/db_1/dbs/orapw + ASM password = 000000 enter = 5 Usage: orapwd file = <fname> entries = <users> force = <y/n> ignorecase = <y/n> nosysdba = <y/n> 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 create a disk group and create an external redundant disk group named data01, used to store data files SQL> create diskgroup data01 external redundancy disk '/dev/raw/raw1' name disk1; Diskgroupcreated. add raw2 to data01 disk group SQL> alter diskgroup data01 add disk'/dev/raw/raw2' name d2; Diskgroupaltered. create a disk group and create an external redundant disk group named fra for FRASQL> 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 partition ------ partition --------- partition 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_assist_free_mbfrom v $ asm_diskgroup order by 1, 2; GROUP_NUMBERNAME state type TOTAL_MB FREE_MB syntax -------------------- ------------ ----------- consume 1 DATA01 mounted extern 2048.00 1996.00 1996 0 2 fra mounted extern 2048.00 1996.00 0 other syntaxes: SQL> create diskgroup group_high highredundancy 2 failgroup fg1 disk '/dev/raw/raw1 'name d1 3 failgroup fg2 disk'/dev/raw/raw2' name d2 4 failgroup fg3 disk '/ dev/raw/raw3 'name d3; diskgroup created. SQL> create diskgroup group_normal normalredundancy 2 failgroup fg4 disk '/dev/raw/raw4 'name d4 3 failgroup fg5 disk'/dev/raw/raw5' name d5; Diskgroup created. SQL> create diskgroup group_external externalredundancy disk '/dev/raw/raw6'; Diskgroup created. SQL> drop diskgroup group_external; Diskgroup dropped. SQL> alter diskgroup group_normal add disk '/dev/raw/raw6 'name d61; Diskgroup altered. SQL> alter diskgroup group_normal resize diskd61 size: 150 m; Diskgroup altered. SQL> alter diskgroup group_normal drop diskd61; Diskgroup altered. SQL> alter diskgroup group_normal addfailgroup fg5 disk '/dev/raw/raw6 'name d6; Diskgroup altered. SQL> alter diskgroup group_high dismount; Diskgroup altered. SQL> alter diskgroup all dismount; Diskgroup altered. SQL> alter diskgroup all mount; Diskgroup altered. ASM directory and alias SQL> alter diskgroup group_normal adddirectory '+ group_normal/mydir'; Diskgroup altered. SQL> alter diskgroup group_normal add alias '+ group_normal/gt10g/datafile/gtlions01.dbf' for '+ group_normal/gt10g/datafile/GTLIONS.256.807383189'; Diskgroup altered.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.