November 7, 2012

Step by step oracle database upgrade from 10.2.0.2 to 10.2.0.4




oracle database upgrade from 10.2.0.2 to 10.2.0.4 :-

Required Software and Installable are available in “ */*/Patch” directory
$HOME = /oracle/SAM
$ORACLE_HOME = /oracle/SAM/102_64

1. 10.2.0.4 Patchset (patchset file is already extracted)

2. OPatch version 10.2.0.5.0

 3. MOPatch version 2.1.7

Note:- All Required Software are kept in $HOME/Patch Directory and extract files in following order

1) Mopatch-2-1-7.zip in $ORACLE_HOME directory Note:- Unzip After 10.2.0.4 patchset installation.

2) OPatch10205_Generic_v0.zip file in $ORACLE_HOME directory Note:- Unzip After 10.2.0.4 patchset installation.

3) Patchset_10204.zip file in current directory i.e. in Patch Path

Step 1:- Check up-gradation prerequisites:

1.1 Stop SAP. (No need while applying on BCV)

1.2:- check oratab and ora inventory location at “/var/opt/oracle” and entry of “SAM:/oracle/SAM/102_64: N” in oratab file, If not make an entry in oratab file.

1.3 :- To check invalid objects and Table space prerequisites Sql> @?/rdbms/admin/utlu102i.sql (? Sign indicates ORACLE_HOME path) Sql> @?/rdbms/admin/utlu102i.sql (? Sign indicates ORACLE_HOME path)

Important Note:- After running prerequisites script you seen some public objects are invalid in SYS schema and other schemas (SAPSR3). Here we are only concern about SYS objects. Which  is known and need to be compiled. Next step to run utlrp script to get compiled invalid objects.

1.2:- Run utlrp.sql to validate invalid objects.

Purpose:- To ensure there is no object invalid found in SYS schema otherwise probabilities patch up gradation failed.  Run below scripts
 Sql>@?/rdbms/admin/utlrp.sql

Result:- In most cases result should report 0 in SYS schemas.( invalid objects). IF NOT ABORT OR STOP INSTALLATION PROCESS

Again Run Prerequisites script

Sql>@?/rdbms/admin/utlu102i.sql (? Sign indicates ORACLE_HOME path)

Note:- No Objects are invalid in SYS and SAPSR3 Schemas and DB is Ready for Upgradation. Next step to Shutdown Database and related Components.

Step 2:- Shutdown database listener,OEM and all component related to Oracle

2.1 Gracefully stop Database instance and Listener process (Don’t use abort or kill Oracle process)

2.2 OEM is not valid when you test in BCV server as this is not configured for same but in Production you have to gracefully stop.
Sql>shutdown immediate;
Log off from sql prompt
Orap22>lsnrctl stop
Check the oracle processes by executing command ps –ef |grep -i ora_
Check the listener process by executing command ps –ef |grep -i LIS

Step 3:- Run OPatch

Run OPatch ls inventory to ensure ora inventory location

Orap22>/oracle/SAM/102_64/OPatch/opatch ls inventory

Step 4:-  start 10.2.0.4 Patch Binary upgradation process.

Go to Patch directory in Disk1 directory

4.1   Start XBrowser

4.2   Set Display Env type command “export DISPLAY=your Desktop/Laptop IP:0.0”

4.3   ./oracle/SAM/Patch/Disk1/runInstaller

4.4 Verified ORACLE_HOME

Purpose:- To Validate correct ORACLE_HOME where 10.2.0.4 binary is going to update.

Workaround:- If not seen correct ORACLE_HOME abort and verify oraInventory location

4.5 Installaler summary

4.6 sh /oracle/SAM/102_64/root.sh from another session as root user

  Go to ORACLE_HOME run command from $ Prompt sh root.sh

Step 5:-  Run MOPatch for CPU patches(SBP)

5.1) Unzip Mopatch-2-1-7.zip in $ORACLE_HOME directory from Patch location
Orap22>unzip /oracle/SAM/Patch/Mopatch-2-1-7.zip /oracle/SAM/102_64/.

5.2) Unzip OPatch 10205_Generic_v0.zip file in $ORACLE_HOME directory Patch location
Orap22>unzip /oracle/SAM/Patch/OPatch10205_Generic_v0.zip  /oracle/SAM/102_64/.

Note:-  Run OPatch version to confirm OPatch version 10.2.0.5.0 which is required to run SAP Supplied Bundle Patch

CAUTION:- Before running mopatch ensure OPatch version:10.2.0.5.0
Otherwise MOpatch run but some patch failed which required OUI version 10.2.0.5.0

Verified OPatch ls inventory

Purpose:-  To Ensure Inventory of Patches which we applied recently. Next Step to Upgrade Database.
Orap22>Sh /oracle/SAM/102_64/MOPatch/mopatch.sh –v –s SAP_102048_201105_SOL64.zip

Step 6:- Upgrade Database

6.1 startup database in upgrade mode
Sql>startup upgrade
 check oracle version 10.2.0.4 after login into sql prompt.

6.2 Run catupgrd.sql
Execute SQL from sql command prompt
Sql>spool catupgrd.log
Sql> @?/rdbms/admin/catupgrd.sql

Step 7:- Shutdown Database and restart in normal mode.

Sql>shutdown immediate;
Sql>startup

Step 8:- Run utlrp to validate any invalid object while upgrading

Sql> @?/rdbms/admin/utlrp.sql

Step 9:- Shutdown and restart database to take new parameter in effects.

Step 10:- Start listener and OEM Test and release to user.




No comments:

Post a Comment