Create an ASM instance using an Oracle script
Create an ASM instance using an Oracle script
Environment: Oracle 11g (11.1.0.6) Windows Server 2003
Note: The Oracle asm instance is created before and after 11gR2. Grid infrastructure is introduced in 11gR2. The method used here is only applicable to databases earlier than 11gR2.
Create a directory (the instance sid is dbasm ):
Create the following directories in the Oracle product directory (for example, D: \ app \ Administrtor \ admin:
D: \ app \ Administrtor \ admin \ dbasm
D: \ app \ Administrtor \ admin \ dbasm \ adump
D: \ app \ Administrtor \ admin \ dbasm \ bdump
D: \ app \ Administrtor \ admin \ dbasm \ cdump
D: \ app \ Administrtor \ admin \ dbasm \ dpdump
D: \ app \ Administrtor \ admin \ dbasm \ udump
Create an asm disk:
Note: Create a partition on a disk that has been formatted and created on a disk that has not been partitioned. There are two differences. In this example, create a partition on a formatted partition.
C: \ Documents ents and Settings \ Administrator> asmtool-create d: \ asmfiles \ asmfile1 1
C: \ Documents ents and Settings \ Administrator> asmtool-create d: \ asmfiles \ asmfile2 2
A kb and a 2048kb file will be generated in the corresponding directory after the creation.
Create an initialization file:
Create the file initDBASM. ora in $ ORACLE_HOME \ dbs AND ORACLE_HOM \ database.
File Content:
*. _ Asm_allow_only_raw_disks = FALSE
*. Instance_type = 'asm'
*. Asm_diskstring = 'd: \ asmfiles \*'
*. Large_pool_size = 12 M
*. Db_unique_name = 'dbasm'
*. Asm_power_limit = 1
*. Remote_login_passwordfile = 'shared'
*. Background_dump_dest = D: \ app \ Administrtor \ admin \ asm \ bdump'
*. Core_dump_dest = D: \ app \ Administrtor \ admin \ asm \ cdump'
*. User_dump_dest = D: \ app \ Administrtor \ admin \ asm \ udump'
Create a password file:
C: \ Documents ents and Settings \ Administrator> orapwd file = PWDoraDBASM. ora password = oracle
The password is oracle, corresponding to the sys Password
Open an instance:
Log on to SQLPLUS:
Set ORACLE_SID = DBASM
Sqlplus/as sysdba
Startup;
(If a ora-error occurs, double-click to run $ ORACLE_HOME \ BIN \ localconfig. bat. This file is available in versions earlier than 11gR2, and then log on to sqlplus again to start the instance)
In this step, the instance is created.