Friday, December 11, 2009

The initialization parameters for ASM instance

The initialization parameters that are of specific interest for an ASM instance are:
•INSTANCE_TYPE - Set to ASM or RDBMS depending on the instance type. The default is RDBMS.
•DB_UNIQUE_NAME - Specifies a globally unique name for the database. This defaults to +ASM but must be altered if you intend to run multiple ASM instances.
•ASM_POWER_LIMIT -The maximum power for a rebalancing operation on an ASM instance. The valid values range from 1 to 11, with 1 being the default. The higher the limit the more resources are allocated resulting in faster rebalancing operations. This value is also used as the default when the POWER clause is omitted from a rebalance operation.
•ASM_DISKGROUPS - The list of disk groups that should be mounted by an ASM instance during instance startup, or by the ALTER DISKGROUP ALL MOUNT statement. ASM configuration changes are automatically reflected in this parameter.
•ASM_DISKSTRING - Specifies a value that can be used to limit the disks considered for discovery. Altering the default value may improve the speed of disk group mount time and the speed of adding a disk to a disk group. Changing the parameter to a value which prevents the discovery of already mounted disks results in an error. The default value is NULL allowing all suitable disks to be considered.
Incorrect usage of parameters in ASM or RDBMS instances result in ORA-15021 errors.

Overview of Automatic Storage Management (ASM)

Overview of Automatic Storage Management (ASM)
Automatic Storage Management (ASM) simplifies administration of Oracle related files by allowing the administrator to reference disk groups rather than individual disks and files, which are managed by ASM. The ASM functionality is an extention of the Oracle Managed Files (OMF) functionality that also includes striping and mirroring to provide balanced and secure storage. The new ASM functionality can be used in combination with existing raw and cooked file systems, along with OMF and manually managed files.

The ASM functionality is controlled by an ASM instance. This is not a full database instance, just the memory structures and as such is very small and lightweight.

The main components of ASM are disk groups, each of which comprise of several physical disks that are controlled as a single unit. The physical disks are known as ASM disks, while the files that reside on the disks are know as ASM files. The locations and names for the files are controlled by ASM, but user-friendly aliases and directory structures can be defined for ease of reference.

The level of redundancy and the granularity of the striping can be controlled using templates. Default templates are provided for each file type stored by ASM, but additional templates can be defined as needed.

Failure groups are defined within a disk group to support the required level of redundancy. For two-way mirroring you would expect a disk group to contain two failure groups so individual files are written to two locations.

Checking Requirement: to install oracle10g on sunsolaris 10

Checking Requirement:

—————————-

#/usr/sbin/prtconf | grep “Memory size” [Check RAM size]
# /usr/sbin/swap -s [check swap]
# df -k /tmp [check /tmp size (>400mb)]
# uname -r [check solaris version]

# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms SUNWsprot SUNWsprox SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt

# cat /etc/nsswitch.conf | grep hosts
# hostname
# domainname

Installing and Configuring Oracle Database 10g on the Solaris Platform

Login as root and create te user oracle which belongs to dba group.
su -
# groupadd dba
# useradd -G dba -m -d /export/home/oracle -s /usr/bin/bash oracle
Note: "#" sign means that you need execute this command as root user.
2. Setting System parameters
Edit the /etc/system and add following line:
set noexec_user_stack=1
Note: Since Solaris 10 shared memory settings for Oracle in /etc/system is obsolete.

Execute following commands to configure system settings for Oracle.
# projadd -U oracle -K "project.max-shm-memory=(priv,4g,deny)" user.oracle
# projmod -sK "project.max-sem-nsems=(priv,256,deny)" user.oracle
# projmod -sK "project.max-sem-ids=(priv,100,deny)" user.oracle
# projmod -sK "project.max-shm-ids=(priv,100,deny)" user.oracle
Note: Use "prctl -i project user.oracle" command to check the settings.

3. Enviroment settings
Edit the /export/home/oracle/.bash_profile file and add following lines:
ORACLE_BASE=/opt/oracle
ORACLE_HOME=$ORACLE_BASE/102
ORACLE_SID=ORA10GR2
LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$PATH:/usr/local/bin:/usr/ccs/bin:/usr/sfw/bin:$ORACLE_HOME/bin

export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH
Note: This configuration assumes that user oracle is using Bash as default shell.

Save the .bash_profile and execute following commands for load new enviroment:
cd /export/home/oracle
. .bash_profile

4. Create base directory for Oracle

Login as root and create base directory for Oracle ($ORACLE_BASE).
su -
# cd /opt
# mkdir oracle
# chown oracle:dba oracle

Download & Install
1. Installation of required packages

Some additional packages are required for succesful instalation of Oracle software. To check whether required packages are installed on your operating system use following command:
pkginfo -i SUNWlibms SUNWtoo SUNWi1cs SUNWi15cs SUNWxwfnt SUNWxwplt SUNWmfrun SUNWxwplr SUNWxwdv SUNWgcc SUNWbtool SUNWi1of SUNWhea SUNWlibm SUNWsprot SUNWuiu8


Install the required packages using the pkgadd command:
# pkgadd -d . SUNWlibms SUNWtoo SUNWi1cs SUNWi15cs SUNWxwfnt SUNWxwplt SUNWmfrun SUNWxwplr SUNWxwdv SUNWgcc SUNWbtool \
SUNWi1of SUNWhea SUNWlibm SUNWsprot SUNWuiu8

3. Download the Oracle 10g (10.2.0.2) software from Oracle website.
Extract the files using following command:
unzip 10202_database_solx86.zip

4. Start the Oracle software installation process.

Now the system is prepared for Oracle software installation. To start the installation process execute the following commands:
cd database
./runInstaller

Shut Down or Reboot a Solaris System

Shut Down or Reboot a Solaris System
Solaris is usually used as a server operating system. Because of this, you want to make sure that you shut the system down as gracefully as possible to ensure there isn’t any data loss.
For every application that is installed on your server, you should make sure that you have the correct scripts in /etc/rc(x).d to gracefully shut down the service.
Shutdown
You have more than one command option that you can use. The best command is this, executed as root:
shutdown -y -i5 -g0
This will immediately shut the system down. You can also use the older command that still works:
sync;sync;init 5
You can even use:
poweroff
Reboot
If you are trying to reboot the system as opposed to turning it off, you could use:
shutdown -y -i6 -g0
Or:
sync;sync;init 6
Or even:
reboot
So many commands to do the same thing… almost seems silly.

Packages required to install oracle 10g on SUN SOLIRS

The following command should install them from the automounted
DVD media:

pkgadd -d /cdrom/cdrom0/Solaris_10/Product SUNWi1cs SUNWi15cs

# ./CheckPackage.sh
pkgadd -d /cdrom/sol_10_1106_sparc/s0/Solaris_10/Product/ SUNWi1cs
pkgadd -d /cdrom/sol_10_1106_sparc/s0/Solaris_10/Product/ SUNWi15cs

# pkginfo -i SUNWbtool SUNWarc SUNWhea SUNWlibmr
SUNWlibm SUNWlibms SUNWsprot SUNWtoo SUNWi1of
SUNWi1cs SUNWi15cs SUNWxwfnt SUNWpoolr SUNWpool
SUNWuiu8