//
you're reading...
Oracle Database Upgrade

Database Upgrade from Oracle 9i R2 (9.2.0.7) HP-UX to 11g R2 (11.2.0.4) OEL cross platform – section2

There are two approaches we can upgrade the database from Oracle 9i R2 (HP UX) to 11g R2 (Oracle Enterprise Linux)

The first approach, use the database import (imp) and export (emp). This approach is the simplest way to upgrade the database, but also the most time consuming approach. If your main business application is not able to afford lots of down time, this approach is not suitable.

The second approach involve the two main steps

  1. In-Place upgrade the oracle base version from Oracle 9i R2 to 10g R2 (10.2.0.5), so we can take advantage the ‘data pump’.
  2. Use the ‘data pump’ transfer the database from the 10g R2 database to 11g R2 database.

This approach are more complex to operate compare with the first approach, but it will save significant amount of down time for business.

This article I will only use the second approach.

Before we start the upgrade process, let’s overview the database environment.

Server Name Operation System Database Version Database Role Database Home
newzoneprod01 HP UX 11.23 Oracle 9i (9.2.0.7) Primary /opt/app/oracle/product/9.2
newzoneprod02 HP UX 11.23 Oracle 9i (9.2.0.7) Standby /opt/app/oracle/product/9.2
newzonetest01 HP UX 11.23 Oracle 9i (9.2.0.7) Primary /opt/app/oracle/product/9.2
newzonetest02 HP UX 11.23 Oracle 9i (9.2.0.7) Standby /opt/app/oracle/product/9.2

After the database upgrade from Oracle 9i R2 to 10g R2, the database environment should be.

Server Name Operation System Database Version Database Role Database Home
newzoneprod01 HP UX 11.23 Oracle 10g R2 (10.2.0.5) Primary /u01/app/oracle/product/10.2
newzoneprod02 HP UX 11.23 Oracle 10g R2 (10.2.0.5) Standby /u01/app/oracle/product/10.2
newzonetest01 HP UX 11.23 Oracle 10g R2 (10.2.0.5) Primary /u01/app/oracle/product/10.2
newzonetest02 HP UX 11.23 Oracle 10g R2 (10.2.0.5) Standby /u01/app/oracle/product/10.2

newzoneprod01 is the primary database server for main application, and newzoneprod02 is the standby database server

Log shipping between newzoneprod01 and newzoneprod02 is every 45mins.

newzonetest01 and newzonetest02 are same copy of the newzoneprod01 and newzoneprod02, just used different name.

Before we apply any changes on production, make sure do the change on test enviroment first. So following upgrade process will be done on the newzonetest01 instead of the newzoneprod01

Step1, Install New Oracle Database Software Home for Oracle 10g R2

for Oracle GUI Installation we have to use the xmanager, set the external display for HP UX

– For csh:

setenv DISPLAY <your local ip address>:0.0

– For sh, ksh and bash:

DISPLAY=<your local ip address>:0.0; export DISPLAY

Login as user ‘root’, create the new Oracle 10g home

root@newzonetest01> mkdir –p /u01/app/oracle/product/10.2
root@newzonetest01>cd /u01
root@newzonetest01> chown –R oracle:dba /app
root@newzonetest01> chmod –R 775 /app

List all kernel parmaeters for HP UX

newzonetest01:/> /usr/sbin/kctune
Tunable                       Value  Expression    Changes
NSTREVENT                        50  Default
NSTRPUSH                         16  Default
NSTRSCHED                         0  Default
STRCTLSZ                       1024  Default
STRMSGSZ                          0  Default
acctresume                        4  Default
acctsuspend                       2  Default
aio_listio_max                  256  Default       Immed
aio_max_ops                    2048  Default       Immed
aio_monitor_run_sec              30  Default       Immed
aio_physmem_pct                  10  Default
aio_prio_delta_max               20  Default       Immed
aio_proc_thread_pct              70  Default       Immed
aio_proc_threads               1024  Default       Immed
aio_req_per_thread                1  Default       Immed
allocate_fs_swapmap               0  Default
alwaysdump                        0  Default       Immed
chanq_hash_locks                256  Default
core_addshmem_read                0  Default       Immed
core_addshmem_write               0  Default       Immed
create_fastlinks                  0  Default
dbc_max_pct                      50  Default       Immed
dbc_min_pct                       5  Default       Immed
default_disk_ir                   0  Default
disksort_seconds                  0  Default
dma32_pool_size           268435456  Default
dmp_rootdev_is_vol                0  Default
dmp_swapdev_is_vol                0  Default
dnlc_hash_locks                 512  Default
dontdump                          0  Default       Immed
dst                               1  Default
dump_compress_on                  1  Default       Immed
enable_idds                       0  Default
eqmemsize                        15  Default
executable_stack                  0  Default       Immed
fr_statemax                  800000  Default       Immed
fr_tcpidletimeout             86400  Default       Immed
fs_async                          0  Default
fs_symlinks                      20  Default       Immed
ftable_hash_locks                64  Default
hp_hfs_mtra_enabled               1  Default
intr_strobe_ics_pct             100  Default       Auto
io_ports_hash_locks              64  Default
ioforw_timeout                    0  Default       Auto
ksi_alloc_max                 33600  Default       Immed
ksi_send_max                     32  Default
max_acct_file_size          2560000  Default       Immed
max_async_ports                  50  Default
max_mem_window                    0  Default
max_thread_proc                3000  3000          Immed
maxdsiz                  2063835136  2063835136    Immed
maxdsiz_64bit            4294967296  Default       Immed
maxfiles                       2048  Default
maxfiles_lim                   4096  Default       Immed
maxrsessiz                  8388608  Default
maxrsessiz_64bit            8388608  Default
maxssiz                   134217728  134217728     Immed
maxssiz_64bit            1073741824  1073741824    Immed
maxtsiz                   100663296  Default       Immed
maxtsiz_64bit            1073741824  Default       Immed
maxuprc                        4195  4195          Immed
maxvgs                           10  Default
msgmap                         4197  4197
msgmax                         8192  Default       Immed
msgmnb                        16384  Default       Immed
msgmni                         4200  nproc
msgseg                        32767  32767
msgssz                           96  Default
msgtql                         4200  nproc
ncdnode                         150  Default
nclist                         8292  Default
ncsize                         8976  Default
nfile                         30000  30000         Imm (auto disabled)
nflocks                        4096  Default       Auto
ninode                        35648  8*nproc+2048
nkthread                       8416  Default       Immed
nproc                          4200  Default       Immed
npty                             60  Default
nstrpty                          60  60
nstrtel                          60  Default
nswapdev                         10  Default
nswapfs                          10  Default
nsysmap                        8400  Default
nsysmap64                      8400  Default
o_sync_is_o_dsync                 0  Default
pa_maxssiz_32bit           83648512  Default
pa_maxssiz_64bit          536870912  Default
pagezero_daemon_enabled           1  Default       Immed
pfdat_hash_locks                128  Default
physical_io_buffers             768  Default       Auto
region_hash_locks               128  Default
remote_nfs_swap                   0  Default
rng_bitvals              9876543210  Default
rng_sleeptime                     2  Default
rtsched_numpri                   32  Default
scroll_lines                    100  Default
scsi_max_qdepth                   8  Default       Immed
scsi_maxphys                1048576  Default
secure_sid_scripts                1  Default       Immed
semaem                        16384  Default
semmni                         8400  8400
semmns                        16800  16800
semmnu                         4000  4000
semmsl                         2048  Default       Immed
semume                          100  Default
semvmx                        32767  Default
sendfile_max                      0  Default
shmmax                   6442450944  6442450944    Immed
shmmni                          512  512           Immed
shmseg                          300  Default       Immed
st_ats_enabled                    0  Default
st_fail_overruns                  0  Default
st_large_recs                     0  Default
st_san_safe                       0  Default       Immed
streampipes                       0  Default
swapmem_on                        1  Default
swchunk                        2048  Default
sysv_hash_locks                 128  Default
tcphashsz                      2048  Default
timeslice                        10  Default
timezone                        420  Default
unlockable_mem                    0  Default
vnode_cd_hash_locks             128  Default
vnode_hash_locks                128  Default
vol_checkpt_default           10240  Default
vol_dcm_replay_size          262144  Default
vol_default_iodelay              50  Default
vol_fmr_logsz                     4  Default
vol_max_bchain                   32  Default
vol_max_nconfigs                 20  Default
vol_max_nlogs                    20  Default
vol_max_nmpool_sz           4194304  Default       Immed
vol_max_prm_dgs                1024  Default
vol_max_rdback_sz           4194304  Default       Immed
vol_max_vol                 8388608  Default
vol_max_wrspool_sz          4194304  Default       Immed
vol_maxio                       256  Default
vol_maxioctl                  32768  Default
vol_maxkiocount                2048  Default
vol_maxparallelio               256  Default
vol_maxspecialio                256  Default
vol_maxstablebufsize            256  Default
vol_min_lowmem_sz            532480  Default       Immed
vol_mvr_maxround                256  Default
vol_nm_hb_timeout                10  Default
vol_rootdev_is_vol                0  Default
vol_rvio_maxpool_sz         4194304  Default       Immed
vol_subdisk_num                4096  Default
vol_swapdev_is_vol                0  Default
vol_vvr_transport                 1  Default
vol_vvr_use_nat                   0  Default
volcvm_cluster_size              16  Default
volcvm_smartsync                  1  Default
voldrl_max_drtregs             2048  Default
voldrl_min_regionsz             512  Default
voliomem_chunk_size           65536  Default
voliomem_maxpool_sz         4194304  Default
voliot_errbuf_dflt            16384  Default
voliot_iobuf_default           8192  Default
voliot_iobuf_limit           131072  Default
voliot_iobuf_max              65536  Default
voliot_max_open                  32  Default
volpagemod_max_memsz           6144  Default       Immed
volraid_rsrtransmax               1  Default
vps_ceiling                      16  Default
vps_chatr_ceiling           1048576  Default
vps_pagesize                      4  Default
vx_maxlink                    32767  Default
vx_ninode                         0  Default
vxfs_bc_bufhwm                    0  Default
vxfs_ifree_timelag                0  Default       Immed
vxtask_max_monitors              32  Default

Modify the kernel parameters for HP UX

newzonetest01:/>kctune ncsize=34816
NOTE:    The configuration being loaded contains the following change(s)
         that cannot be applied immediately and which will be held for
         the next boot:
      -- The tunable ncsize cannot be changed in a dynamic fashion.
WARNING: The automatic 'backup' configuration currently contains the
         configuration that was in use before the last reboot of this
         system.
     ==> Do you wish to update it to contain the current configuration
         before making the requested change?
         Please answer 'yes' or 'no'.
     ==> Do you wish to update it to contain the current configuration
         before making the requested change? yes
       * The automatic 'backup' configuration has been updated.
       * The requested changes have been saved, and will take effect at
         next boot.
Tunable               Value  Expression
ncsize   (now)         8976  Default
         (next boot)  34816  34816

newzonetest01:/>kctune nfile=63488
       * The automatic 'backup' configuration has been updated.
       * The requested changes have been applied to the currently
         running system.
Tunable            Value  Expression  Changes
nfile    (before)  30000  30000       Imm (auto disabled)
         (now)     63488  63488

newzonetest01:/>kctune semmnu=4092
NOTE:    The configuration being loaded contains the following change(s)
         that cannot be applied immediately and which will be held for
         the next boot:
      -- The tunable semmnu cannot be changed in a dynamic fashion.
       * The automatic 'backup' configuration has been updated.
       * The requested changes have been saved, and will take effect at
         next boot.
Tunable               Value  Expression
ncsize   (now)         8976  Default
         (next boot)  34816  34816
semmnu   (now)         4000  4000
         (next boot)   4092  4092

newzonetest01:/>kctune vps_ceiling=64
NOTE:    The configuration being loaded contains the following change(s)
         that cannot be applied immediately and which will be held for
         the next boot:
      -- The tunable vps_ceiling cannot be changed in a dynamic fashion.
       * The automatic 'backup' configuration has been updated.
       * The requested changes have been saved, and will take effect at
         next boot.
Tunable                   Value  Expression
ncsize       (now)         8976  Default
             (next boot)  34816  34816
semmnu       (now)         4000  4000
             (next boot)   4092  4092
vps_ceiling  (now)           16  Default
             (next boot)     64  64



newzonetest01:/>kctune -u semmap=4098
WARNING: The automatic 'backup' configuration currently contains the
         configuration that was in use before the last reboot of this
         system.
     ==> Do you wish to update it to contain the current configuration
         before making the requested change? yes
       * The automatic 'backup' configuration has been updated.
       * The requested changes have been applied to the currently
         running system.
Tunable             Value  Expression
semmap   (before)  (none)  Default
         (now)       4098  4098


newzonetest01:/>kctune -u maxswapchunks=16384
WARNING: The automatic 'backup' configuration currently contains the
         configuration that was in use before the last reboot of this
         system.
     ==> Do you wish to update it to contain the current configuration
         before making the requested change?
         Please answer 'yes' or 'no'.
     ==> Do you wish to update it to contain the current configuration
         before making the requested change? yes
       * The automatic 'backup' configuration has been updated.
       * The requested changes have been applied to the currently
         running system.
Tunable                   Value  Expression
maxswapchunks  (before)  (none)  Default
               (now)      16384  16384

Step2, Install the Oracle 10g R2 Database Software

$ pwd
/DBSoftwares
$ ll
total 24
drwxrwxrwx   6 oracle     dba           4096 Oct  7  2014 HPUX_10.2
drwxr-xr-x   3 oracle     dba           4096 Nov 24 15:01 p8202632_10205_HPUX-IA64
$ cd HPUX_10.2/database
$ ll
$ ll
total 72
drwxrwxrwx   9 oracle     dba           4096 Jan 28  2006 doc
drwxrwxrwx   4 oracle     dba           4096 Feb  7  2006 install
drwxrwxrwx   2 oracle     dba           4096 Feb  7  2006 response
-rwxrwxrwx   1 oracle     dba           1363 Feb  7  2006 runInstaller
drwxrwxrwx   8 oracle     dba          12288 Feb  7  2006 stage
-rwxrwxrwx   1 oracle     dba           5267 Jan 28  2006 welcome.html
$ ./runInstaller
Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be B.11.23.    Actual B.11.23
                                      Passed

Checking swap space: must be greater than 250 MB.   Actual 4079 MB    Passed
Checking Temp space: must be greater than 250 MB.   Actual 568 MB    Passed

All installer requirements met.

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-12-09_10-32-01AM. Please wait ...

Oracle_10g_Install_1

Oracle_10g_Install_2

Oracle_10g_Install_3

 

On the Product Specific Prerequisite check

Oracle_10g_Install_4

Checking operating system requirements ...
Expected result: One of 11.23
Actual Result: 11.23
Check complete. The overall result of this check is: Passed
=======================================================================

Checking recommended operating system patches
Checking for PHSS_31850; found PHSS_31850.	Passed
Checking for PHSS_31851; found PHSS_31851.	Passed
Checking for PHSS_31854; found Not found.	Failed <<<<
Checking for PHSS_31855; found PHSS_31855.	Passed
Checking for PHSS_33275; found PHSS_33275.	Passed
Checking for PHSS_33276; found PHSS_33276.	Passed
Checking for PHSS_33278; found Not found.	Failed <<<<
Checking for PHSS_33279; found Not found.	Failed <<<<
Checking for PHSS_33277; found Not found.	Failed <<<<
Checking for PHSS_33279; found Not found.	Failed <<<<
Checking for PHSS_32213; found PHSS_32213.	Passed
Checking for PHCO_32426; found PHCO_32426.	Passed
Checking for PHCO_31553; found PHCO_31553.	Passed
Checking for PHKL_33552; found PHKL_33552.	Passed
Checking for PHKL_32645; found PHKL_32645.	Passed
Checking for PHKL_32646; found PHKL_32646.	Passed
Checking for PHKL_32632; found PHKL_32632.	Passed
Checking for PHKL_33552; found PHKL_33552.	Passed
Checking for PHKL_32645; found PHKL_32645.	Passed
Checking for PHKL_32646; found PHKL_32646.	Passed
Checking for PHKL_32632; found PHKL_32632.	Passed
Checking for PHKL_32646; found PHKL_32646.	Passed
Checking for PHKL_33552; found PHKL_33552.	Passed
Checking for PHKL_32645; found PHKL_32645.	Passed
Checking for PHKL_32632; found PHKL_32632.	Passed
Checking for PHKL_31500; found PHKL_31500.	Passed
Check complete. The overall result of this check is: Failed <<<<
Problem: Some recommended patches are missing (see above).
Recommendation: You may actually have installed patches which have obsoleted these, in which case you can  successfully continue with the install. If you have not, it is recommended that you do not continue. Refer to the readme to find out how to get the missing patches.
=======================================================================

Checking kernel parameters
Checking for ksi_alloc_max=32768; found ksi_alloc_max=33600.	Passed
Checking for max_thread_proc=256; found max_thread_proc=3000.	Passed
Checking for maxdsiz=1073741824; found maxdsiz=2063835136.	Passed
Checking for maxdsiz_64bit=2147483648; found maxdsiz_64bit=4294967296.	Passed
Checking for maxssiz=134217728; found maxssiz=134217728.	Passed
Checking for maxssiz_64bit=1073741824; found maxssiz_64bit=1073741824.	Passed
Checking for maxswapchunks=16384; found maxswapchunks=16384.	Passed
Checking for maxuprc=3687; found maxuprc=4195.	Passed
Checking for msgmap=4098; found msgmap=4197.	Passed
Checking for msgmni=4096; found msgmni=4200.	Passed
Checking for msgseg=32767; found msgseg=32767.	Passed
Checking for msgtql=4096; found msgtql=4200.	Passed
Checking for ncsize=34816; found ncsize=34816.	Passed
Checking for nfile=63488; found nfile=63488.	Passed
Checking for nflocks=4096; found nflocks=4096.	Passed
Checking for ninode=34816; found ninode=35648.	Passed
Checking for nkthread=7184; found nkthread=8416.	Passed
Checking for nproc=4096; found nproc=4200.	Passed
Checking for semmap=4098; found semmap=4098.	Passed
Checking for semmni=4096; found semmni=8400.	Passed
Checking for semmns=8192; found semmns=16800.	Passed
Checking for semmnu=4092; found semmnu=4092.	Passed
Checking for semvmx=32767; found semvmx=32767.	Passed
Checking for shmmax=1073741824; found shmmax=6442450944.	Passed
Checking for shmmni=512; found shmmni=512.	Passed
Checking for shmseg=120; found shmseg=300.	Passed
Checking for vps_ceiling=64; found vps_ceiling=64.	Passed
Check complete. The overall result of this check is: Passed
=======================================================================

Validating ORACLE_BASE location (if set) ...
Check complete. The overall result of this check is: Passed
=======================================================================

Checking Oracle Home path for spaces...
Check complete. The overall result of this check is: Passed
=======================================================================

Checking for proper system clean-up....
Check complete. The overall result of this check is: Passed
=======================================================================

Checking for Oracle Home incompatibilities ....
Check complete. The overall result of this check is: Failed <<<<
Problem: Oracle Database 10g Release 2 can only be installed in a new Oracle Home
Recommendation: Choose a new Oracle Home for installing this product.
=======================================================================

There are 5 HP UX Patches missed depend on the error message

Checking for PHSS_31854; found Not found.	Failed <<<<
Checking for PHSS_33278; found Not found.	Failed <<<<
Checking for PHSS_33279; found Not found.	Failed <<<<
Checking for PHSS_33277; found Not found.	Failed <<<<
Checking for PHSS_33279; found Not found.	Failed <<<<

Depend on the HP, these errors can be ignored. Ticket the error box and click Next to continue the installation

Oracle_10g_Install_4

On the summary page, click ‘Install’ to continue the installation.

Oracle_10g_Install_5

At the end of the installation, the OUI will ask the user to run ‘root.sh’ scipt. Before run the ‘root.sh’, backup the ‘dbhome’, ‘oraenv’ and ‘coraenv’ files.

$ cp dbhome dbhome.bak.9ir2.07122015
$ cp oraenv oraenv.bak.9ir2.07122015
$ cp coraenv coraenv.bak.9ir2.07122015

Step3, Patch the Oracle 10g R2 Database Software to 10.2.0.5

$ pwd
/backup01
$ ll
total 24
drwxrwxrwx   6 oracle     dba           4096 Oct  7  2014 HPUX_10.2_Install
drwxr-xr-x   3 oracle     dba           4096 Nov 24 15:01 p8202632_10205_HPUX-IA64
$ cd p8202632_10205_HPUX-IA64
$ ll
total 376
drwxr-xr-x   5 oracle     dba           4096 Nov 24 15:01 Disk1
-rwxr-xr-x   1 oracle     dba         181836 Jun  3  2010 README.html
$ cd Disk1
$ ll
total 400
drwxr-xr-x   4 oracle     dba           4096 May 17  2010 install
-rwxrwxrwx   1 oracle     dba         181836 May 27  2010 patch_note.htm
drwxr-xr-x   2 oracle     dba           4096 May 17  2010 response
-rwxr-xr-x   1 oracle     dba           3927 May 17  2010 runInstaller
drwxr-xr-x  11 oracle     dba           4096 May 17  2010 stage
$ ./runInstaller
Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be B.11.23 or B.11.31.    Actual B.11.23
                                      Passed

Checking swap space: must be greater than 250 MB.   Actual 4079 MB    Passed
Checking Temp space: must be greater than 250 MB.   Actual 531 MB    Passed

All installer requirements met.

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-12-09_11-00-37AM. Please wait ...

Oracle_10g_Install_6

Oracle_10g_Install_7

Oracle_10g_Install_8

On the summary page, click ‘Install’ to continue the installation. At the end of the installation run the root.sh scripts to complete the installation

$ cp dbhome dbhome.bak.10gr2.07122015
$ cp oraenv oraenv.bak.10gr2.07122015
$ cp coraenv coraenv.bak.10gr2.07122015
Advertisements

About daviewning

I am an Oracle DBA

Discussion

No comments yet.

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

%d bloggers like this: