Implement ASM Instance on Solaris
Now we are ready to implement ASM Instance on Solaris. We divided all task in following Section:
- Section A: Prepare/Install RHEL Machine
- Section B: Install Oracle binaries (http://indiandba.blogspot.com/2008/12/oracle-10g-installation-configuration.html)
- Section C: Prepare Disk for ASM (Read Adding Disk/ Create Partition in Solaris section)
- Section D: Set ownership of Disk
- Section E: Create ASM Instance – Manually
- Section F: Create ASM Enable Database
SECTION – A First we prepare RHEL4 machine.
Install RHEL4
SECTION – B Install Oracle binaries
Click here for How to Install Oracle Binaries on Solaris
SECTION – C Prepare Disk for ASM
Click here for Adding Disk in Solaris and Click here for Disk Partition / Slice and Label
SECTION – D Set ownership of Disk
Default owner is root:sys needs to be changed to oracle:dba .We need to set oracle:dba ( here oracle is a Oracle owner and dba is a group) ownership of the disk. As root we have take partition s0 of disk (c0d1s0 and c1d1s0)
- Check ownership of Disk. Execute following command as a root user.
bash-3.00# ls -lhL /dev/rdsk/c0d1s0
crw-r—– 1 root sys 118, 64 Feb 16 02:10 /dev/rdsk/c0d1s0
bash-3.00# ls -lhL /dev/rdsk/c1d1s0
crw-r—– 1 root sys 118, 64 Feb 16 02:10 /dev/rdsk/c1d1s0
bash-3.00# chown oracle:dba /dev/rdsk/c0d1s0
bash-3.00# chown oracle:dba /dev/rdsk/c1d1s0
SECTION – E Create ASM Instance (Manually)
Step 1 If CSS service is not there; create it by executing the following batch file:
$<ORACLE_HOME/bin/localconfig add
Important: Cluster Synchronization Services (CSS) is required to enable synchronization between an Automatic Storage Management (ASM) instance and the database instances.
Step 2 Create Admin Directories
$mkdir /oracle/ASM/bdump
$mkdir /oracle/ASM/cdump
$mkdir /oracle/ASM/udump
$mkdir /oracle/ASM/pfile
Step 3 Create ASM Instance Parameter file. In /oracle/ASM/pfile directory
INSTANCE_TYPE=ASM
DB_UNIQUE_NAME=+ASM
LARGE_POOL_SIZE=16M
BACKGROUND_DUMP_DEST = ‘/oracle/ASM/bdump’
USER_DUMP_DEST=’/oracle/ASM/udump’
CORE_DUMP_DEST = ‘/oracle/ASM/cdump’
ASM_DISKGROUPS=’DB_DATA’
ASM_DISKSTRING =’/dev/rdsk/*’
Important:
- If you do not want to use above parameter just set only one parameter INSTANCE_TYPE=ASM. ASM instance will start with default values for other parameters.
- Bellow I am giving you 5 key parameter that you must configure for ASM instance.
INSTANCE_TYPE
DB_UNIQUE_NAME
ASM_POWER_LIMIT (Indicate the maximum speed to be used by this ASM instance during a disk rebalancing operation. Default is 1 and the range 1 to 11)
ASM_DISKSTRING (set the disk location for oracle to consider during a disk-discovery process)
ASM_DISKGROUP (specify the name of any disk group that you want the ASM instance to automatically mount at instance startup)
- ASM instance uses the LARGE_POOL_SIZE memory buffer. We should allocate at least 8MB .
Step 4 Creating ASM Instance
$export ORACLE_SID=+ASM
$sqlplus /nolog
SQL> connect / as sysdba
SQL> startup nomount pfile=’/oracle/ASm/pfile/init+ASM.ora’
IMPORTANT: We can find error “ORA-29701: unable to connect to Cluster Manager” at the time of ASM instance startup. The Cause of error is Connect to CM failed or timed out. Just delete the CM local configuration and add local configuration by using. /localconfig delete and. /localconfig add command. This shall script is reside in $ORACLE_HOME/bin directory.
Step 5 Create ASM Disk Group
Let’s start by determining if Oracle can find these four new disks: The view V$ASM_DISK can be queried from the ASM instance to determine which disks are being used or may potentially be used as ASM disks.
$export oracle_sid=+ASM
$sqlplus “/ as sysdba”
SQL> SELECT group_number, disk_number, mount_status, header_status, state, path FROM v$asm_disk
Note:
The value of zero in the GROUP_NUMBER column for all four disks. This indicates that a disk is available but hasn’t yet been assigned to a disk group.
Using SQL*Plus, the following will create a disk group with normal redundancy and two failure groups:
SQL> CREATE DISKGROUP DB_DATA NORMAL REDUNDANCY
FAILGROUP controller1 DISK ‘ c0d1s0’
FAILGROUP controller2 DISK ‘ c1d1s0’;
Diskgroup created.
Step 6 ALTER DISKGROUP ALL MOUNT;
Now your ASM Instance has been created. Restart the ASM Instance.
SECTION – F Create (OMF) Database
Step 1 Set your ORACLE_SID
export ORACLE_SID=INDIAN
Step 2 Create a minimal init.ora ( In Default Location -$ORACLE_HOME/dbs/init<sid>.ora)
control_files = +DB_DATA
undo_management = AUTO
db_name = test
db_block_size = 8192
sga_max_size = 1073741824
sga_target = 1073741824
db_create_file_dest = +DB_DATA
db_create_online_log_dest_1 = +DB_DATA
Step 3 Create a password file
$ORACLE_HOME/bin/orapwd file=$ORACLE_HOME/dbs/pwd<sid>.ora password=oracle entries=5
Step 4 Start the instance
sqlplus / as sysdba
startup nomount
Step 5 Create the database
create database indian
character set WE8ISO8859P1
national character set utf8
undo tablespace undotbs1
default temporary tablespace temp;
Step 6 Run catalog and catproc
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
Responses