Tuesday, December 24, 2013

ASM Management


Here We will discuss 2 topics:
1. ASM Management : Create & Drop Diskgroup, Add & Delete Disks to/from Diskgroup, Mount/Unmount Diskgroup, Resizing disk within Diskgroup, ASM rebalance ideal practice, Real life examples
2. How to change ASM Sys password (at last of this post).


.             ASM (Automatic Storage Management) MANAGEMENT                     .


-  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.
-    In summary ASM provides the following functionality:
o    Manages groups of disks, called disk groups.
o    Manages disk redundancy within a disk group.
o    Provides near-optimal I/O balancing without any manual tuning.
o    Enables management of database objects without specifying mount points and filenames.
o    Supports large files.


Important parameters for ASM management: 

-         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.

-          Disk groups are created using the CREATE DISKGROUP statement. This statement allows you to specify the level of redundancy:

o    NORMAL REDUNDANCY    : Two-way mirroring, requiring two failure groups.
o    HIGH REDUNDANCY      : Three-way mirroring, requiring three failure groups.
o    EXTERNAL REDUNDANCY  : No mirroring for disks that are already protected using hardware                                               mirroring or RAID.

Important Notes:

1.  It is recommended to set "asm_power_limit" to zero when you want to add more than 1 disk. 
If you add disk(s) keeping asm_power_limit value greater than zero, rebalance starts immediately.
When more disks are being added, after 1 disk addition, rebalance starts; if you add another disk
at that moment, rebalance stops for first disk and starts for second disk. So, it is recommended
to set asm_power_limit to zero when you want to add more than 1 disk.

2. After adding all the disks, you can set "asm_power_limit" to value (5 or 6). But setting this value
does not start rebalancing. You need to issue the following command to start rebalance:
 ALTER DISKGROUP disk_group_name REBALANCE POWER 6;

3. When rebalcing is being run, you will get an entry if you issue following command:
select * from v$asm_operation; When "no rows returned" is shown, that means rebalancing is done.


Necessary Views
V$asm_diskgroup
V$asm_disk
V$asm_operation

SQL> show parameter asm_diskstring
SQL> select name, path, mode_status,header_status,state, disk_number from v$asm_disk;
SQL> select name, state, type, total_mb, free_mb from v$asm_diskgroup;

Example:
In this example, we used 2 Disk Groups: DATA_AREA (disk01 and disk02), LOG_AREA (disk03)

DROPPING DISK from DISKGROUP DATA_AREA

SQL> select GROUP_NUMBER,DISK_NUMBER,name, path, header_status from v$asm_disk;

GROUP_NUMBER DISK_NUMBER NAME                           PATH                               Header_status
------------ ----------- ------------------------------ --------------------------------------------------------                ---------------------
           1           0 DATA_AREA_0000                 /dev/erpdbtest/asm/rdsk/disk001         MEMBER
           1           1 DATA_AREA_0001                 /dev/erpdbtest/asm/rdsk/disk002         MEMBER
           2           0 LOG_AREA_0000                  /dev/erpdbtest/asm/rdsk/disk003          MEMBER

SQL> alter diskgroup data_area drop disk DATA_AREA_0001;
Diskgroup altered.

SQL> select GROUP_NUMBER,DISK_NUMBER,name, path, header_status from v$asm_disk;
GROUP_NUMBER DISK_NUMBER NAME                           PATH                               Header_status
------------ ----------- ------------------------------ --------------------------------------------------------                 ---------------------
           1           0 DATA_AREA_0000                 /dev/erpdbtest/asm/rdsk/disk001          MEMBER
           1           1 DATA_AREA_0001                 /dev/erpdbtest/asm/rdsk/disk002       FORMER
           2           0 LOG_AREA_0000                  /dev/erpdbtest/asm/rdsk/disk003           MEMBER

ADDING DISK to DISKGROUP

SQL> alter diskgroup log_area add disk ‘/dev/erpdbtest/asm/rdsk/disk002’
Diskgroup altered.

SQL> select GROUP_NUMBER,DISK_NUMBER,name, path, header_status from v$asm_disk;
GROUP_NUMBER DISK_NUMBER NAME                           PATH                           HEADER_STATUS
------------ ----------- ------------------------------ --------------------------------------------------                  ----------------------------
           1           0 DATA_AREA_0000                 /dev/erpdbtest/asm/rdsk/disk001       MEMBER
           2           0 LOG_AREA_0000                  /dev/erpdbtest/asm/rdsk/disk003        MEMBER
           2           1 LOG_AREA_0001                  /dev/erpdbtest/asm/rdsk/disk002        MEMBER

RESIZING LOG_AREA DISK from 10 GB to 5 GB

SQL> select name, group_number, state, total_mb, free_mb from v$asm_diskgroup;
NAME                           GROUP_NUMBER   STATE         TOTAL_MB    FREE_MB
------------------------------       ---------------------------   -----------         -----------------    ----------
DATA_AREA                       1                       MOUNTED          10237      8908
LOG_AREA                         2                       MOUNTED          20474      20106

(Resizing a specific disk)

SQL> alter diskgroup LOG_AREA resize disk LOG_AREA_0001 size 5G;
Diskgroup altered.

To resize all disks in a diskgroup: 

SQL> alter diskgroup LOG_AREA resize all size 5G

SQL> select * from v$asm_operation;
GROUP_NUMBER OPERA STAT      POWER     ACTUAL      SOFAR   EST_WORK   EST_RATE EST_MINUTES
------------ ----- ---- ---------- ---------- ---------- ---------- ---------- -----------
           2 REBAL RUN           1          1         43        135        171           0

SQL> select * from v$asm_operation;
no rows selected

SQL> select name, group_number, state, total_mb, free_mb from v$asm_diskgroup;
NAME                           GROUP_NUMBER   STATE         TOTAL_MB    FREE_MB
------------------------------       ---------------------------    -----------        ----------------    ----------------
DATA_AREA                       1                       MOUNTED          10237       8908
LOG_AREA                         2                       MOUNTED          15357      14989


DROPPING ENTIRE DISKGROUP
SQL> select name, group_number, state, total_mb, free_mb from v$asm_diskgroup;
NAME                           GROUP_NUMBER   STATE           TOTAL_MB    FREE_MB
------------------------------ ---------------------------   -----------          ----------------     ----------
DATA_AREA                      1                           MOUNTED      10237            8908
LOG_AREA                         2                          MOUNTED      15357           14989

SQL> drop diskgroup LOG_AREA including contents;
drop diskgroup LOG_AREA including contents
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15027: active use of diskgroup "LOG_AREA" precludes its dismount

Diskgroup can not be dropped as it is being used. So, change the logfile to other diskgroup and then try dropping.

sql> alter database drop logfile group 3
sql> alter database add logfile group 3 '+DATA_AREA'

sql> alter system switch logfile
sql> alter system checkpoint

sql> alter database drop logfile group 2
sql> alter database add logfile group 2 '+DATA_AREA'

sql> alter database drop logfile group 1
sql> alter database add logfile group 1 '+DATA_AREA'

SQL> drop diskgroup LOG_AREA including contents;
Diskgroup dropped.


UNMOUNT /MOUNT DISKGROUP (After shutdown database)

SQL> ALTER DISKGROUP ALL DISMOUNT;
Diskgroup altered.

SQL> select name, group_number, state, total_mb, free_mb from v$asm_diskgroup;
NAME                           GROUP_NUMBER     STATE                 TOTAL_MB    FREE_MB
------------------------------ ---------------------------     -----------                 ----------------    ---------------
DATA_AREA                         0                          DISMOUNTED           0                     0

SQL> ALTER DISKGROUP ALL MOUNT;
Diskgroup altered.

SQL> select name, group_number, state, total_mb, free_mb from v$asm_diskgroup;
NAME                           GROUP_NUMBER    STATE            TOTAL_MB     FREE_MB
------------------------------ ---------------------------    -----------            ----------------     --------------
DATA_AREA                              1                    MOUNTED          10237           8593


CREATING DISKGROUP

SQL> show parameter asm_disk
NAME                                 TYPE        VALUE
------------------------------------      -----------      ------------------------------
asm_diskgroups                    string       DATA_AREA
asm_diskstring                      string      /dev/erpdbtest/asm/rdsk/dis*

SQL> select name, path, group_number from v$asm_disk;
NAME                                      PATH                                           GROUP_NUMBER
--------------------------             -----------------------------------                          ---------------------------
                                         /dev/erpdbtest/asm/rdsk/disk002                0
                                         /dev/erpdbtest/asm/rdsk/disk003                0
DATA_AREA_0000             /dev/erpdbtest/asm/rdsk/disk001                1

SQL> select name, state, type, total_mb, free_mb from v$asm_diskgroup;
NAME                           STATE                TYPE              TOTAL_MB              FREE_MB
------------------------------      -----------                -------------          ----------------              ----------------
DATA_AREA              MOUNTED            EXTERN             10237                    8583

SQL> create diskgroup LOG_AREA external redundancy disk '/dev/erpdbtest/asm/rdsk/disk002';
Diskgroup created.

SQL> select name, path, group_number from v$asm_disk;
NAME                                         PATH                                       GROUP_NUMBER
------------------------------           -----------------------------------                       --------------------------
                                             /dev/erpdbtest/asm/rdsk/disk003                0
DATA_AREA_0000                 /dev/erpdbtest/asm/rdsk/disk001                1
LOG_AREA_0000                  /dev/erpdbtest/asm/rdsk/disk002                 2

SQL> select name, state, type, total_mb, free_mb from v$asm_diskgroup;

NAME                                      STATE           TYPE            TOTAL_MB            FREE_MB
------------------------------          -----------             ------                  - ---------               ----------
DATA_AREA                       MOUNTED       EXTERN              10237                  8583
LOG_AREA                         MOUNTED       EXTERN              10237                  10187

SQL> alter diskgroup LOG_AREA add disk '/dev/erpdbtest/asm/rdsk/disk003';
Diskgroup altered.

SQL> select name, path, group_number from v$asm_disk;
NAME                                             PATH                                       GROUP_NUMBER
------------------------------               -----------------------------------                ------------
DATA_AREA_0000                 /dev/erpdbtest/asm/rdsk/disk001                1
LOG_AREA_0000                  /dev/erpdbtest/asm/rdsk/disk002                 2
LOG_AREA_0001                  /dev/erpdbtest/asm/rdsk/disk003                 2

SQL> select name, state, type, total_mb, free_mb from v$asm_diskgroup;
NAME                                   STATE            TYPE            TOTAL_MB          FREE_MB
------------------------------              -----------            ------------         ----------------          ----------------
DATA_AREA                         MOUNTED      EXTERN          10237                    8583
LOG_AREA                           MOUNTED      EXTERN           20474                   20422


==========================  Real Life Example:================================

SQL> select name,path,total_mb from v$asm_disk where name is null;
/dev/test/rdsk/disk38
/dev/test/rdsk/disk39
/dev/test/rdsk/disk40
/dev/test/rdsk/disk41

-- Above 4 disks we will add now to diskgroup DATA_AREA

SQL> show parameter power
asm_power_limit
integer
4

SQL> alter system set asm_power_limit=0 scope=both;

SQL> alter diskgroup DATA_AREA add disk '/dev/fms/rdsk/disk38';
SQL> alter diskgroup DATA_AREA add disk '/dev/fms/rdsk/disk39';
SQL> alter diskgroup DATA_AREA add disk '/dev/fms/rdsk/disk40';
SQL> alter diskgroup DATA_AREA add disk '/dev/fms/rdsk/disk41';

SQL> alter diskgroup DATA_AREA drop disk DATA_AREA_0000;
SQL> alter diskgroup DATA_AREA drop disk DATA_AREA_0001;
SQL> alter diskgroup DATA_AREA drop disk DATA_AREA_0002;
SQL> alter diskgroup DATA_AREA drop disk DATA_AREA_0003;

SQL> alter system set asm_power_limit=5 scope=both;

SQL> select * from v$asm_operation;

SQL> ALTER DISKGROUP DATA_AREA REBALANCE POWER 5;

SQL> select * from v$asm_operation;

=======================================================================

What happens if ASM shutdown immediate when database is up
SQL> shutdown immediate;
ORA-15097: cannot SHUTDOWN ASM instance with connected RDBMS instance

What happens if ASM shutdown abort when database is up
Ans: database also shutdown with asm
SQL> select INSTANCE_NAME from v$instance;

INSTANCE_NAME
----------------
+ASM
SQL> shutdown abort;
ASM instance shutdown
SQL>

What happens when startup database keeping ASM in SHUTDOWN
ORACLE_SID=TEST
SQL> startup
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATA_AREA/GPTEST/spfileTEST.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA_AREA/TEST/spfileTEST.ora
ORA-15077: could not locate ASM instance serving a required diskgroup


.            How to change ASM Sys Password                                         .

Coming ...
=================================== End ================================


Sunday, December 22, 2013

Oracle DB 10g (10.2.0.5.0) Installation in Solaris10


.                                           Required DB Software:                                     .

1.             10gr2_db_sol.cpio                                   (Base release- Oracle Database 10g 10.2.0.1.0)
2.             p8202632_10205_SOLARIS64.zip         (Oracle Database 10g Release 2 Patch Set 4 10.2.0.5.0)
3.             p6880880_102000_SOLARIS64.zip      (OPatch 10.2.0.5.1, the Oracle Interim Patching Tool.)
4.             p11724962_10205_SOLARIS64.zip       (Patch Set Update 10.2.0.5.3



.                                               Pre Installation                                             .

             Login as ROOT user:
  
Checking Hardware Requirements:

RAM
Swap Space
Between 1024 MB and 2048 MB
1.5 times the size of RAM
Between 2049 MB and 8192 MB
Equal to the size of RAM
More than 8192 MB
0.75 times the size of RAM
·         400 MB of disk space in the /tmp directory
·         Minimum 30 GB of local disk space in /u01 mount point for the Oracle software (Recommended to have 68GB LUN)
·         ASM storage as per requirement
1.     To determine the physical RAM size, enter the following command:
                        # /usr/sbin/prtconf | grep "Memory size"
2.     To determine the size of the configured swap space, enter the following command:
                                # /usr/sbin/swap -s
3.     To determine the amount of disk space available in the /tmp directory, enter the following command:
                                 # df -h /tmp 
4.     To determine the amount of free disk space on the system, enter the following command:
                                 # df -h 
5.     To determine whether the system architecture can run the software, enter the following command:
            # /bin/isainfo -kv
 
Note:
The following is the expected output of this command:
                     64-bit sparcv9 kernel modules
If you do not see the expected output, then you cannot install the software on this system.

 

Checking Software Requirements:

Verify that the following software is installed on the system
1.     To determine which version of Solaris is installed, enter the following command:
                                 # uname –r
                                 5.10
2.     To determine whether the required packages are installed, enter a command similar to the following:
                                # pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms                                                                SUNWsprot  SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt
3.     Make sure that system administrators updated the OS with latest patch.


Checking the Network Setup (Configuring Name Resolution)



Verify that the /etc/hosts file is used for name resolution. You can do this by checking the hosts file entry in the nsswitch.conf file as follows: The output of this command should contain an entry for files.
                                 # cat /etc/nsswitch.conf | grep hosts
 
Verify that the host name has been set by using the hostname command as follows:
                                 # hostname
 
Verify that the domain name has not been set dynamically by using the domainname command as follows: This command should not return any results.
                                 # domainname
 
Verify that the hosts file contains the fully qualified host name by using the following command: If the /etc/hosts file does not contain the fully qualified host name, then open the file and make the required changes in it.
                                 # cat /etc/hosts | grep `eval hostname`
For example:
127.0.0.1              localhost                                     localhost.localdomain
192.168.100.16    hostname                                   hostname.mycompany.com
192.168.100.17    hostname-vip                            hostname-vip.mycompany.com  
 



Creating Required Operating System Groups and Users


Create the Oracle Inventory group by entering the following command:
                    # /usr/sbin/groupadd –g 100 oinstall
Create the Oracle OSDBA group by entering the following command:
                    # /usr/sbin/groupadd –g 101 dba
Create the Oracle OSOPER group by entering the following command:
                    # /usr/sbin/groupadd –g 102 oper

Creating the Oracle Software Owner User

1.     To create the oracle user, enter a command similar to the following:
            # /usr/sbin/useradd –u 200 -g oinstall -G dba,oper –d  /export/home/oracle –s /bin/bash oracle
2.     Set the password of the oracle user:
                                # passwd oracle
 
3.     To check oraInventory Location:

                # more /var/opt/oracle/oraInst.loc
            inventory_loc=/u01/oracle/oraInventory
            inst_group=oinstall

Verifying that the User nobody Exists

1.     To determine whether the user exists, enter the following command:
                                # id nobody
If this command displays information about the nobody user, then you do not have to create that user.
2.     If the nobody user does not exist, then enter the following command to create it:
                        # /usr/sbin/useradd nobody


Configuring Kernel Parameters

On Solaris 10, verify that the kernel parameters shown in the following table are set to values greater than or equal to the recommended value shown. The table also contains the resource controls that replace the/etc/system file for a specific kernel parameter.

Parameter
Replaced by Resource Control
Recommended Value
noexec_user_stack
N/A
1
semsys:seminfo_semmni
project.max-sem-ids
256
shmsys:shminfo_shmmax
project.max-shm-memory
4294967295 (Depends on the requirements)
shmsys:shminfo_shmmni
project.max-shm-ids
256

By logging as root user, use the following procedure to create the project & set the required values using resource controls utility:
a.     Create a new project on the system for oracle
# projadd oracle
b.     Add the following line at the end of /etc/user_attr file.
oracle::::project=oracle
c.     Add the following line at the end of /etc/system file.
set noexec_user_stack=1
d.     Run the following commands to put values for resource controls
prctl -n project.max-sem-ids -v 256 -r -i project oracle
projmod -s -K "project.max-sem-ids=(priv,256,deny)" oracle
 
prctl -n project.max-shm-ids -v 256 -r -i project oracle
projmod -s -K "project.max-shm-ids=(priv,256,deny)" oracle
 
prctl -n project.max-shm-memory -v 4gb -r -i project oracle
projmod -s -K "project.max-shm-memory=(priv,4gb,deny)" oracle

Note: prctl is used to do the above tasks online. And projmod is used for persistent settings.
As oracle user, to check the current value of project settings, use the following commands
prctl -n project.max-sem-ids -i project oracle
prctl -n project.max-shm-ids -i project oracle
prctl -n project.max-shm-memory -i project oracle



Creating an Oracle Base & Oracle Home Directory

To create the Oracle Base & Oracle Home directory and specify the correct owner, group, and permissions for it:
1.     Generally, to install Oracle Software, we require /u01 mount point.
2.     Enter commands similar to the following to create the recommended subdirectories in the mount point directory (/u01) and set the appropriate owner, group, and permissions on them:
                    # mkdir -p /u01/oracle/product/10.2.0/db
                    # chown -R oracle:oinstall /u01/oracle
                    # chmod -R 755 /u01/oracle (less secured) OR
                    # chmod -R 750 /u01/oracle (more secured)
 
Note: If there are no OS users who use Oracle Libraries or Clients then the directory should be restricted.
                    


Preparing Disks for an Automatic Storage Management Installation

While requesting disk for ASM from System Administrators ensure that all disks have the following characteristics.
·         All disks should be under location   ->    /dev/rdsk/asm (Recommended, Might Change)
·         Each disk has to be same size LUN->    68GB (Recommended)
·         Each disk owner should like            ->     chown -R oracle:dba dev/rdsk/asm/disk01
·         Each disk mode should be               ->     chmod 660 /dev/rdsk/asm/disk01
Consider the below file characteristics while making decision about RAID LEVEL.
File Type
File Characteristics
Online Redo Log Files
Performance Intensive (Fault Tolerance reduced by multiplexing)
Control Files
Performance Intensive + Fault Tolerance
System Tablespace
High Available
Undo Tablespace
High Available
Other Tablespaces
Optimum fault tolerance and performance
Archive Log Files
Fault Tolerance

 
Note:  Raid 5: General Purpose; applicable for any sized database.
           Raid 1 + 0: Only applicable for small and very critical database.


Configuring the oracle user’s Environment



Before start
Oracle Universal Installer, configure the environment of the oracle user by editing the .bash_profile file as
follows and run the bash profile using command (#. .bash_profile).


.bash_profile sample

unset ORACLE_SID;
unset PATH;
ulimit -n 65535
ulimit -s unlimited
umask 022

EDITOR=vi; export EDITOR;
PERL5LIB=/usr/perl5/5.6.1/lib; export PERL5LIB;
DISPLAY=LOCAL_HOST:0.0; export DISPLAY

#ORACLE_SID=PROD; export ORACLE_SID
ORACLE_BASE=/u01/oracle
ORACLE_ADMIN=/u01/oracle/admin
ORACLE_HOME=/u01/oracle/product/10.2.0/db
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH_64=$ORACLE_HOME/lib
export ORACLE_BASE ORACLE_HOME LD_LIBRARY_PATH LD_LIBRARY_PATH_64 ORACLE_ADMIN

PATH=$PATH:$ORACLE_HOME/bin:/usr/ccs/bin:/usr/bin:/etc:/usr/openwin/bin:/usr/sbin:/usr/ucb/bin:/usr/local/bin/:/usr/sfw/bin:$ORACLE_HOME/OPatch
export PATH

alias sql+="sqlplus '/ as sysdba'"
alias ll="ls -ltr"

PS1='\u@\h($ORACLE_SID):`pwd`# '
export PS1


.                                                 Installation                                             .
                         
To extract the Oracle installation files, enter the following command:
                                $ cpio -idcmv < filename.cpio
 
Change directory to database directory of oracle software and enter the following command:
                                         $ ./runInstaller

Run two scripts during oracle installation with root user














Installing Pathches

It is recommended to install patches before database installation. To extract the Oracle Patch files, enter the following command:
                    $ unzip p5337014_10203_LINUX.zip   -- for 10.2.0.3 version
                    $ p8202632_10205_SOLARIS64.zip      -- for 10.2.0.5 version  (Patch Set 4)
Change directory to Disk1 and enter the following command to install patch.
                $ ./runInstaller










Check installed patch from OS:
oracle@hostname():/u01/Software#
oracle@hostname():/u01/Software# opatch lsinventory
Invoking OPatch 10.2.0.4.9

Oracle Interim Patch Installer version 10.2.0.4.9
Copyright (c) 2009, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/product/10.2.0/db
Central Inventory : /u01/oracle/oraInventory
   from           : /var/opt/oracle/oraInst.loc
OPatch version    : 10.2.0.4.9
OUI version       : 10.2.0.5.0
OUI location      : /u01/oracle/product/10.2.0/db/oui
Log file location : /u01/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch2013-05-20_14-38-59PM.log

Patch history file: /u01/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch_history.txt

Lsinventory Output file location : /u01/oracle/product/10.2.0/db/cfgtoollogs/opatch/lsinv/lsinventory2013-05-20_14-38-59PM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (2):

Oracle Database 10g                                                          10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 4                    10.2.0.5.0
There are 2 products installed in this Oracle Home.


There are no Interim patches installed in this Oracle Home.


--------------------------------------------------------------------------------

OPatch succeeded.
oracle@hostname():/u01/Software#



Configuring Oracle Net Services

Modifying the listener.ora File
Create the listener.ora file with below information to create two listeners LISTENER1 and LISTENER2 for service SID.

Login to Server (using MobaXterm or Exceed utility or any other tool):

# netca















Installation of Latest version of OPATCH Utility

1. copy "p6880880_102000_SOLARIS64.zip" to ORACLE_HOME
2. mv OPatch OPatch.backup
3. unzip  p6880880_102000_SOLARIS64.zip
4. opatch lsinventory
 

Installation of PSU 10.2.0.5.3
 
p11724962_10205_SOLARIS64.zip       (Patch Set Update 10.2.0.5.3)
 

One-off Patch Conflict Detection and Resolution

1.             Determine whether any currently installed one-off  patches conflict with the PSU patch as follows:

unzip p11724962_10205_<platform>.zip
opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./11724962

oracle@hostname():/u01/Software#
oracle@hostname():/u01/Software# opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./11724962
Invoking OPatch 10.2.0.5.1

Oracle Interim Patch Installer version 10.2.0.5.1
Copyright (c) 2010, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/oracle/product/10.2.0/db
Central Inventory : /u01/oracle/oraInventory
   from           : /var/opt/oracle/oraInst.loc
OPatch version    : 10.2.0.5.1
OUI version       : 10.2.0.5.0
OUI location      : /u01/oracle/product/10.2.0/db/oui
Log file location : /u01/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch2013-05-20_15-53-00PM.log

Patch history file: /u01/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch_history.txt

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
oracle@hostname():/u01/Software#

2.             The report will indicate the patches that conflict with PSU 11724962 and the patches for which PSU 11724962 is a superset. Refer to "Patch Set Updates Patch Conflict Resolution" in My Oracle Support Note 854428.1 Patch Set Updates for Oracle Products.

Note that Oracle proactively provides PSU 10.2.0.5.3 one-off patches for common conflicts

3.             Use My Oracle Support Note 1061295.1 Patch Set Updates - One-off Patch Conflict Resolution to determine, for each conflicting patch, whether a conflict resolution patch is already available, and if you need to request a new conflict resolution patch or if the conflict may be ignored

4.             When all the PSU 10.2.0.5.3 one-off patches that you have requested are available at My Oracle Support, proceed with Section 3.2, "Patch Installation Instructions".


Patch Installation

1.  Shutdown all instances and listeners
2.  unzip p11724962_10205_<platform>.zip
3.  cd 11724962
4.  opatch apply

oracle@hostname():/u01/Software/11724962#
oracle@hostname():/u01/Software/11724962# opatch apply
Invoking OPatch 10.2.0.5.1

Oracle Interim Patch Installer version 10.2.0.5.1
Copyright (c) 2010, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/product/10.2.0/db
Central Inventory : /u01/oracle/oraInventory
   from           : /var/opt/oracle/oraInst.loc
OPatch version    : 10.2.0.5.1
OUI version       : 10.2.0.5.0
OUI location      : /u01/oracle/product/10.2.0/db/oui
Log file location : /u01/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch2013-05-20_16-14-57PM.log

Patch history file: /u01/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch_history.txt

ApplySession applying interim patch '11724962' to OH '/u01/oracle/product/10.2.0/db'

Running prerequisite checks...
Patch 11724962: Optional component(s) missing : [ oracle.rdbms.dv, 10.2.0.5.0 ] , [ oracle.rdbms.dv.oc4j, 10.2.0.5.0 ]
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:

You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y

OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.


Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/oracle/product/10.2.0/db')

Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '11724962' for restore. This might take a while...
Backing up files affected by the patch '11724962' for rollback. This might take a while...
Execution of 'sh /u01/Software/11724962/custom/scripts/pre -apply 11724962 ':


Return Code = 0

Patching component oracle.rdbms, 10.2.0.5.0...
Updating archive file "/u01/oracle/product/10.2.0/db/lib/libserver10.a"  with "lib/libserver10.a/kcbl.o"

Copying file to "/u01/oracle/product/10.2.0/db/psu/10.2.0.5.3/catpsu.sql"
Copying file to "/u01/oracle/product/10.2.0/db/psu/10.2.0.5.3/catpsu_rollback.sql"

Patching component oracle.rdbms.rsf, 10.2.0.5.0...
Copying file to "/u01/oracle/product/10.2.0/db/rdbms/mesg/oraus.msb"
Copying file to "/u01/oracle/product/10.2.0/db/rdbms/mesg/oraus.msg"

Patching component oracle.rdbms.dbscripts, 10.2.0.5.0...
Copying file to "/u01/oracle/product/10.2.0/db/rdbms/admin/prvtjob.plb"
Copying file to "/u01/oracle/product/10.2.0/db/cpu/scripts/bug11057369.sql"

Patching component oracle.network.rsf, 10.2.0.5.0...
Updating archive file "/u01/oracle/product/10.2.0/db/lib/libnnz10.a"  with "lib/libnnz10.a/nzu.o"
Copying file to "/u01/oracle/product/10.2.0/db/lib/libnnz10.so"
Copying file to "/u01/oracle/product/10.2.0/db/lib32/libnnz10.so"

Patching component oracle.sysman.bsln, 10.2.0.5.0...
Updating jar file "/u01/oracle/product/10.2.0/db/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/RootCert.class"
Updating jar file "/u01/oracle/product/10.2.0/db/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/SecConstants.class"
Running make for target client_sharedlib
Running make for target ioracle
Running make for target client_sharedlib
ApplySession adding interim patch '11724962' to inventory

Verifying the update...
Inventory check OK: Patch ID 11724962 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 11724962 are present in Oracle Home.

The local system has been patched and can be restarted.


OPatch succeeded.
oracle@ibsreco():/u01/Software/11724962#

===========================================================================

To check from OS:
oracle@hostname():/u01/Software/11724962# opatch lsinventory
Invoking OPatch 10.2.0.5.1

Oracle Interim Patch Installer version 10.2.0.5.1
Copyright (c) 2010, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/product/10.2.0/db
Central Inventory : /u01/oracle/oraInventory
   from           : /var/opt/oracle/oraInst.loc
OPatch version    : 10.2.0.5.1
OUI version       : 10.2.0.5.0
OUI location      : /u01/oracle/product/10.2.0/db/oui
Log file location : /u01/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch2013-05-20_16-21-00PM.log

Patch history file: /u01/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch_history.txt

Lsinventory Output file location : /u01/oracle/product/10.2.0/db/cfgtoollogs/opatch/lsinv/lsinventory2013-05-20_16-21-00PM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (2):

Oracle Database 10g                                                  10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 4                            10.2.0.5.0
There are 2 products installed in this Oracle Home.


Interim patches (1) :

Patch  11724962     : applied on Mon May 20 16:18:40 BDT 2013
Unique Patch ID:  13623473
   Created on 4 Apr 2011, 22:24:50 hrs PST8PDT
   Bugs fixed:
     6402302, 10327190, 9150282, 9659614, 8865718, 9949948, 9024850, 8394351
     10327179, 8546356, 9711859, 9714832, 9952230, 10248542, 9770451, 9020537
     9772888, 8664189, 10091698, 7519406, 9952270, 8771916, 9109487, 9713537
     8350262, 11792865, 10010310, 11724962, 11725006, 9390484, 9963497
     8544696, 9320130, 10249537, 8211733, 8277300, 9548269, 9337325, 9726739
     7602341, 10157402, 8412426



--------------------------------------------------------------------------------

OPatch succeeded.
oracle@hostname():/u01/Software/11724962#



Installing ASM instance and Create Oracle Database

·         Install and run Oracle Cluster Synchronization Service (CSS) by executing the following command as root user, before creating ASM instance using dbca tool.
                $ /u01/oracle/product/10.2.0/db/bin/localconfig add

root@hostname:[/u01/oracle/product/10.2.0/db]# /u01/oracle/product/10.2.0/db/bin/localconfig add

Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configuration for local CSS has been initialized

Adding to inittab
Startup will be queued to init within 30 seconds.
Checking the status of new Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
        ibsreco
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)
root@hostname:[/u01/oracle/product/10.2.0/db]#


·         Use database configuration assistance to install ASM and oracle database.
                To open Database Configuration Assistant enter a command similar to the following
                $dbca


During Database and ASM creation ensure following things:
·         Choose the ASM redundancy level (External Redundancy) for each Automatic Storage Management disk group.
·         Create minimum three ASM Disk Groups e.g. DG01, LOG01 and LOG02.
·         Create five online redo log groups with two members. Each log members must reside in different diskgroups. Each log member size depends on the transaction behavior (Recommended is 1 log switch in every 15-20 Min).
·         Multiplex archive log files in two log areas (LOG01 and LOG02).
Multiplex three Control Files in three different disk groups.

Login to server (using mobiXterm or Exceed)
./dbca







Run DBCA to Create DATABASE









Note: in 10g listener needs to be up to connect to ASM. So before starting DBCA to create database start DB listener.
















End of Installation.