Manual ASM instance creation

There are some situations, when we cannot use dbca GUI to create the ASM instance.

Following procedure describes the manual ASM instance creation process

Step 1
======

Create the required directory structure (this will change for 10g & 11g)

oracle$> mkdir -p $ORACLE_BASE/admin/+ASM/bdump
oracle$> mkdir -p $ORACLE_BASE/admin/+ASM/cdump
oracle$> mkdir -p $ORACLE_BASE/admin/+ASM/hdump
oracle$> mkdir -p $ORACLE_BASE/admin/+ASM/pfile
oracle$> mkdir -p $ORACLE_BASE/admin/+ASM/udump

Step 2
======

Create pfile

oracle$> cd $ORACLE_BASE/admin/+ASM/pfile

oracle$> vi init.ora

# asm_diskstring parameter will change based on
# operating system & disk naming conventions
asm_diskstring=’/dev/rdsk/c*’
# background_dump_dest is 10gr2 specific, depricated in 11g
background_dump_dest=/oracle/admin/+ASM/bdump
core_dump_dest=/oracle/admin/+ASM/cdump
# user_dump_dest is 10gr2 specific, depricated in 11g
user_dump_dest=/oracle/admin/+ASM/udump
instance_type=asm
compatible=11.1.0.0
large_pool_size=12M
remote_login_passwordfile=exclusive

Step 3
======

Start the ocssd demon process (execute as root)
root#> /oracle/11gr1/bin/localconfig add

root#> ps -ef grep ocssd
oracle 9322 9264 0 09:15:38 ? 0:28 /oracle/11gr1/bin/ocssd.bin

Step 4
======

Create spfile from pfile

oracle$> export ORACLE_SID=+ASM
oracle$> sqlplus / as sysdba

SQL> create spfile from pfile=’/oracle/admin/+ASM/pfile/init.ora’;

File created.

SQL> exit

Step 5
======

Rename original pfile

oracle$> mv $ORACLE_BASE/admin/+ASM/pfile/init.ora $ORACLE_BASE/admin/+ASM/pfile/init.ora.orig

Step 6
======

Startup ASM instance

SQL> startup
ASM instance started

Total System Global Area 283930624 bytes
Fixed Size 2120512 bytes
Variable Size 256644288 bytes
ASM Cache 25165824 bytes
ORA-15110: no diskgroups mounted

Step 7
======

Create a diskgroup

SQL> CREATE DISKGROUP DATA EXTERNAL REDUNDANCY DISK ‘/dev/rdsk/c1t1d1s6’;

Diskgroup created.

Step 8
======

Create database using above diskgroup

oracle$> unset ORACLE_SID

oracle$> dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbName mydb -sid mydb -sysPassword oracle -systemPassword oracle -datafileDestination +DATA -storageType ASM -asmSysPassword oracle

Advertisements
This entry was posted in Oracle Automatic Storage Management and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s