Showing posts with label 10g. Show all posts
Showing posts with label 10g. Show all posts

Monday, March 26, 2012

ORA-39095: Dump file space has been exhausted: Unable to allocate 8192 bytes

ORA-39095: Dump file space has been exhausted: Unable to allocate 8192 bytes error comes up when trying to export with the parallel option.

Most of the solution indicate to attach new dump files or not to use the parallel option. Issue could be resolved with a parametrized dumpfile name. The error was happening only on 10.2.0.1 (base version), on 10.2.0.4 (on RHEL4) and 10.2.0.5 (on RHEL5) expdp executed successfully without using the parametrized name.
$ expdp asa/asa directory=DPDUMPS dumpfile=expx.dmp logfile=expx.log query=table_name:'"where trunc(column_name) >= trunc(systimestamp - 365)"' tables=table_name parallel=2

Export: Release 10.2.0.1.0 - 64bit Production on Sunday, 25 March, 2012 12:05:51

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Starting "asa"."SYS_EXPORT_TABLE_01":  asa/******** directory=DPDUMPS dumpfile=expx.dmp logfile=expx.log query=table_name:"where trunc(column_name) >= trunc(systimestamp - 365)" tables=table_name parallel=2
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 4.031 GB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
ORA-39095: Dump file space has been exhausted: Unable to allocate 8192 bytes
With parameterized dumpfile name
$ expdp asa/asa directory=DPDUMPS dumpfile=expx_%U.dmp logfile=expx_`date +"%Y-%m-%d-%H%M"`.log query=table_name:'"where trunc(column_name) >= trunc(systimestamp - 365)"' tables=table_name parallel=2

Export: Release 10.2.0.1.0 - 64bit Production on Sunday, 25 March, 2012 12:13:12

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Starting "asa"."SYS_EXPORT_TABLE_02":  asa/******** directory=DPDUMPS dumpfile=expx_%U.dmp logfile=expx_2012-03-25-1213.log query=table_name:"where trunc(column_name) >= trunc(systimestamp - 365)" tables=table_name parallel=2
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 4.031 GB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "asa"."table_name"                111.0 MB  884357 rows
Master table "asa"."SYS_EXPORT_TABLE_02" successfully loaded/unloaded
******************************************************************************
Dump file set for asa.SYS_EXPORT_TABLE_02 is:
  /data/dpdumps/expx_01.dmp
  /data/dpdumps/expx_02.dmp
  /data/dpdumps/expx_03.dmp
Job "asa"."SYS_EXPORT_TABLE_02" successfully completed at 12:13:31
This option generate multiple dumpfiles all of which is needed to do the import.
$ impdp test/test directory=DPDUMPS dumpfile=expx_%U.dmp logfile=impl.log full=y remap_schema=asa:test parallel=2

Import: Release 10.2.0.1.0 - 64bit Production on Sunday, 25 March, 2012 12:37:12

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Master table "TEST"."SYS_IMPORT_FULL_02" successfully loaded/unloaded
Starting "TEST"."SYS_IMPORT_FULL_02":  test/******** directory=DPDUMPS dumpfile=expx_%U.dmp logfile=impl.log full=y remap_schema=asa:test parallel=2
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "TEST"."table_name"                    111.0 MB  884357 rows
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT

Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "TEST"."SYS_IMPORT_FULL_02" completed with 1 error(s) at 12:37:59
As said earlier on 10.2.0.5 same could be executed with a single dump file without any error
$ expdp asa/asa directory=dumpdir dumpfile=expx.dmp logfile=expx.log query=table_name2:'"where trunc(column_name) >= trunc(systimestamp - 365)"' tables=table_name2 parallel=2

Export: Release 10.2.0.5.0 - 64bit Production on Monday, 26 March, 2012 16:50:50

Copyright (c) 2003, 2007, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "asa"."SYS_EXPORT_TABLE_01":  asa/******** directory=dumpdir dumpfile=expx.dmp logfile=expx.log 
query=table_name2:"where trunc(column_name) >= trunc(systimestamp - 365)" tables=table_name2 parallel=2
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 136 MB
Processing object type TABLE_EXPORT/TABLE/TABLE
. . exported "asa"."table_name2"               111.2 MB  885542 rows
Master table "asa"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for asa.SYS_EXPORT_TABLE_01 is:
  /ssdoracle/dpdumps/expx.dmp
Job "asa"."SYS_EXPORT_TABLE_01" successfully completed at 16:50:56
Although metalink note says this applies to 10.2 to 11.2 wasn't reproducible in 10.2.0.4 or in 10.2.0.5 which mean error could be happening intermittent (or only on base version). Haven't tried on 11.1 or 11.2 yet!.



Update 23 October 2012
Tested on 11.2.0.3 (PSU 11.2.0.2.0) and parallel option works without the need for a parametrized dump file.
expdp asanga/asa directory=DPDUMPS dumpfile=expx.dmp logfile=expx_`date +"%Y-%m-%d-%H%M"`.log  parallel=4 schemas=asanga

Export: Release 11.2.0.3.0 - Production on Tue Oct 23 10:31:15 2012

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "ASANGA"."SYS_EXPORT_SCHEMA_01":  asanga/******** directory=DPDUMPS dumpfile=expx.dmp logfile=expx_2012-10-23-1031.log parallel=4 schemas=asanga
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 7.312 MB
. . exported "ASANGA"."FULT"                             1.924 MB     251 rows
. . exported "ASANGA"."X"                                1.835 MB   56953 rows
. . exported "ASANGA"."S1"                               5.343 KB       9 rows
. . exported "ASANGA"."S2"                               5.320 KB       8 rows
. . exported "ASANGA"."Y"                                5.015 KB       2 rows
. . exported "ASANGA"."CHAINED_ROWS"                         0 KB       0 rows
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Master table "ASANGA"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for ASANGA.SYS_EXPORT_SCHEMA_01 is:
  /home/oracle/expx.dmp
Job "ASANGA"."SYS_EXPORT_SCHEMA_01" successfully completed at 10:31:46
Useful metalink note
Parallel Export Fails With ORA-39095 If There Are Less Specified Files Than Slaves [ID 433391.1]

Wednesday, March 14, 2012

Upgrade from 10.2.0.5 to 11.2.0.3 (Clusterware, RAC, ASM)

The blog post list the steps for upgrading 10gR2 system (used earlier for 10.2.0.4 to 10.2.0.5 upgrade) to 11gR2 (11.2.0.3). The steps are similar to 11.1.0.7 to 11.2.0.3 upgrade but with some minor differences.

Relevant sections from 11gR2 Upgrade Guide.
Direct upgrade to the new Oracle Database 11g release is supported from 9.2.0.8 or higher, 10.1.0.5 or higher, 10.2.0.2 or higher, and 11.1.0.6 or higher. Note that Oracle Clusterware release 10.2.0.n must be at release 10.2.0.3 (or higher), before you attempt to upgrade it to Oracle Clusterware 11g.

You may need to keep the old Oracle Home for a while after a successful upgrade. However, after you have tested the newly upgraded Oracle database, you will need to remove the old Oracle Home. As the clusterware user on all nodes, enter the following SQL*Plus commands.
Detach OLD_HOME (where OLD_HOME is your pre-upgrade Oracle Home:

$OLD_HOME/oui/bin/runInstaller -detachHome -silent -local
Confirm OLD_HOME is removed from central inventory:

$OLD_HOME/OPatch/opatch lsinventory -all
Remove files in OLD_HOME manually:
/bin/rm -rf $OLD_HOME

From 11gR2 GI Install Guide
Before you start an Oracle RAC or Oracle Database installation on an Oracle Clusterware 11g release 11.2 installation, if you are upgrading from releases 11.1.0.7, 11.1.0.6, and 10.2.0.4, then Oracle recommends that you check for the latest recommended patches for the release you are upgrading from, and install those patches as needed on your existing database installations before upgrading.
For more information on recommended patches, refer to "Oracle Upgrade Companion," which is available through Note 785351.1.

The Cluster runs on RHEL 4
uname -rmi
2.6.9-89.ELsmp x86_64 x86_64
With vote and ocr files in raw devices
crsctl query css votedisk
 0.     0    /dev/raw/raw2

$ ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     107612
         Used space (kbytes)      :       4604
         Available space (kbytes) :     103008
         ID                       :  972426829
         Device/File Name         : /dev/raw/raw1
                                    Device/File integrity check succeeded

                                    Device/File not configured

         Cluster registry integrity check succeeded
The pre-req checks are also similar to that on 11.1.0.7 to 11.2.0.3 checks, ntp check will fail if the ntp.conf file is present and ip_local_port_range will fail as the minimum value is different from 10gR2 to 11gR2. Noteably doesn't require any patches to be applied before the upgrade.
But unlike the ocr disk sharedness check that passed in 11gR1 the raw device sharedness check will fail.
Checking OCR integrity...
Check for compatible storage device for OCR location "/dev/raw/raw1"...

ERROR:
PRVF-10037 : Failed to retrieve storage type for "/dev/raw/raw1" on node "rac2"
Could not get the type of storage

ERROR:
PRVF-10037 : Failed to retrieve storage type for "/dev/raw/raw1" on node "rac1"
Could not get the type of storage

OCR integrity check failed
But this error could be ignored as per Checklist for PRVF-10037 : Failed to retrieve storage type for xx on node xx [ID 1233505.1] by running the ocrcheck manually.

The full output from the cluvfy check is given below.
./runcluvfy.sh stage -pre crsinst -upgrade -n rac1,rac2 -rolling -src_crshome /opt/crs/oracle/product/10.2.0/crs -dest_crshome /opt/app/11.2.0/grid -dest_version 11.2.0.3.0 -fixup -fixupdir /home/oracle/fixupscript -verbose

Performing pre-checks for cluster services setup

Checking node reachability...

Check: Node reachability from node "rac1"
  Destination Node                      Reachable?
  ------------------------------------  ------------------------
  rac2                                  yes
  rac1                                  yes
Result: Node reachability check passed from node "rac1"


Checking user equivalence...

Check: User equivalence for user "oracle"
  Node Name                             Status
  ------------------------------------  ------------------------
  rac2                                  passed
  rac1                                  passed
Result: User equivalence check passed for user "oracle"

Checking CRS user consistency
Result: CRS user consistency check successful

Checking node connectivity...

Checking hosts config file...
  Node Name                             Status
  ------------------------------------  ------------------------
  rac2                                  passed
  rac1                                  passed

Verification of the hosts config file successful


Interface information for node "rac2"
 Name   IP Address      Subnet          Gateway         Def. Gateway    HW Address        MTU
 ------ --------------- --------------- --------------- --------------- ----------------- ------
 eth0   192.168.0.86    192.168.0.0     0.0.0.0         192.168.0.100   08:00:27:90:0E:D3 1500
 eth0   192.168.0.90    192.168.0.0     0.0.0.0         192.168.0.100   08:00:27:90:0E:D3 1500
 eth1   192.168.0.88    192.168.0.0     0.0.0.0         192.168.0.100   08:00:27:C4:DE:3F 1500


Interface information for node "rac1"
 Name   IP Address      Subnet          Gateway         Def. Gateway    HW Address        MTU
 ------ --------------- --------------- --------------- --------------- ----------------- ------
 eth0   192.168.0.85    192.168.0.0     0.0.0.0         192.168.0.100   08:00:27:81:60:F7 1500
 eth0   192.168.0.89    192.168.0.0     0.0.0.0         192.168.0.100   08:00:27:81:60:F7 1500
 eth1   192.168.0.87    192.168.0.0     0.0.0.0         192.168.0.100   08:00:27:C9:FD:D3 1500


Check: Node connectivity for interface "eth0"
  Source                          Destination                     Connected?
  ------------------------------  ------------------------------  ----------------
  rac2[192.168.0.86]              rac2[192.168.0.90]              yes
  rac2[192.168.0.86]              rac2[192.168.0.88]              yes
  rac2[192.168.0.86]              rac1[192.168.0.85]              yes
  rac2[192.168.0.86]              rac1[192.168.0.89]              yes
  rac2[192.168.0.86]              rac1[192.168.0.87]              yes
  rac2[192.168.0.90]              rac2[192.168.0.88]              yes
  rac2[192.168.0.90]              rac1[192.168.0.85]              yes
  rac2[192.168.0.90]              rac1[192.168.0.89]              yes
  rac2[192.168.0.90]              rac1[192.168.0.87]              yes
  rac2[192.168.0.88]              rac1[192.168.0.85]              yes
  rac2[192.168.0.88]              rac1[192.168.0.89]              yes
  rac2[192.168.0.88]              rac1[192.168.0.87]              yes
  rac1[192.168.0.85]              rac1[192.168.0.89]              yes
  rac1[192.168.0.85]              rac1[192.168.0.87]              yes
  rac1[192.168.0.89]              rac1[192.168.0.87]              yes
Result: Node connectivity passed for interface "eth0"

Check: TCP connectivity of subnet "192.168.0.0"
  Source                          Destination                     Connected?
  ------------------------------  ------------------------------  ----------------
  rac1:192.168.0.85               rac2:192.168.0.86               passed
  rac1:192.168.0.85               rac2:192.168.0.90               passed
  rac1:192.168.0.85               rac2:192.168.0.88               passed
  rac1:192.168.0.85               rac1:192.168.0.89               passed
  rac1:192.168.0.85               rac1:192.168.0.87               passed
Result: TCP connectivity check passed for subnet "192.168.0.0"


Check: Node connectivity for interface "eth1"
Checking subnet mask consistency...
Subnet mask consistency check passed for subnet "192.168.0.0".
Subnet mask consistency check passed.

Result: Node connectivity check passed

Checking multicast communication...

Checking subnet "192.168.0.0" for multicast communication with multicast group "230.0.1.0"...
Check of subnet "192.168.0.0" for multicast communication with multicast group "230.0.1.0" passed.

Check of multicast communication passed.

Checking OCR integrity...
Check for compatible storage device for OCR location "/dev/raw/raw1"...

ERROR:
PRVF-10037 : Failed to retrieve storage type for "/dev/raw/raw1" on node "rac2"
Could not get the type of storage

ERROR:
PRVF-10037 : Failed to retrieve storage type for "/dev/raw/raw1" on node "rac1"
Could not get the type of storage

OCR integrity check failed

Checking ASMLib configuration.
  Node Name                             Status
  ------------------------------------  ------------------------
  rac2                                  passed
  rac1                                  passed
Result: Check for ASMLib configuration passed.

Check: Total memory
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          1.9609GB (2056180.0KB)    1.5GB (1572864.0KB)       passed
  rac1          1.9609GB (2056180.0KB)    1.5GB (1572864.0KB)       passed
Result: Total memory check passed

Check: Available memory
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          1.326GB (1390364.0KB)     50MB (51200.0KB)          passed
  rac1          1.1387GB (1194000.0KB)    50MB (51200.0KB)          passed
Result: Available memory check passed

Check: Swap space
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          3.9987GB (4192956.0KB)    2.9414GB (3084270.0KB)    passed
  rac1          3.9987GB (4192956.0KB)    2.9414GB (3084270.0KB)    passed
Result: Swap space check passed

Check: Free disk space for "rac2:/opt/app/11.2.0/grid,rac2:/tmp"
  Path              Node Name     Mount point   Available     Required      Status
  ----------------  ------------  ------------  ------------  ------------  ------------
  /opt/app/11.2.0/grid  rac2          /             13.3779GB     7.5GB         passed
  /tmp              rac2          /             13.3779GB     7.5GB         passed
Result: Free disk space check passed for "rac2:/opt/app/11.2.0/grid,rac2:/tmp"

Check: Free disk space for "rac1:/opt/app/11.2.0/grid,rac1:/tmp"
  Path              Node Name     Mount point   Available     Required      Status
  ----------------  ------------  ------------  ------------  ------------  ------------
  /opt/app/11.2.0/grid  rac1          /             11.3978GB     7.5GB         passed
  /tmp              rac1          /             11.3978GB     7.5GB         passed
Result: Free disk space check passed for "rac1:/opt/app/11.2.0/grid,rac1:/tmp"

Check: User existence for "oracle"
  Node Name     Status                    Comment
  ------------  ------------------------  ------------------------
  rac2          passed                    exists(500)
  rac1          passed                    exists(500)

Checking for multiple users with UID value 500
Result: Check for multiple users with UID value 500 passed
Result: User existence check passed for "oracle"

Check: Group existence for "oinstall"
  Node Name     Status                    Comment
  ------------  ------------------------  ------------------------
  rac2          passed                    exists
  rac1          passed                    exists
Result: Group existence check passed for "oinstall"

Check: Membership of user "oracle" in group "oinstall" [as Primary]
  Node Name         User Exists   Group Exists  User in Group  Primary       Status
  ----------------  ------------  ------------  ------------  ------------  ------------
  rac2              yes           yes           yes           yes           passed
  rac1              yes           yes           yes           yes           passed
Result: Membership check for user "oracle" in group "oinstall" [as Primary] passed

Check: Run level
  Node Name     run level                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          3                         3,5                       passed
  rac1          3                         3,5                       passed
Result: Run level check passed

Check: Hard limits for "maximum open file descriptors"
  Node Name         Type          Available     Required      Status
  ----------------  ------------  ------------  ------------  ----------------
  rac2              hard          65536         65536         passed
  rac1              hard          65536         65536         passed
Result: Hard limits check passed for "maximum open file descriptors"

Check: Soft limits for "maximum open file descriptors"
  Node Name         Type          Available     Required      Status
  ----------------  ------------  ------------  ------------  ----------------
  rac2              soft          1024          1024          passed
  rac1              soft          1024          1024          passed
Result: Soft limits check passed for "maximum open file descriptors"

Check: Hard limits for "maximum user processes"
  Node Name         Type          Available     Required      Status
  ----------------  ------------  ------------  ------------  ----------------
  rac2              hard          16384         16384         passed
  rac1              hard          16384         16384         passed
Result: Hard limits check passed for "maximum user processes"

Check: Soft limits for "maximum user processes"
  Node Name         Type          Available     Required      Status
  ----------------  ------------  ------------  ------------  ----------------
  rac2              soft          2047          2047          passed
  rac1              soft          2047          2047          passed
Result: Soft limits check passed for "maximum user processes"

There are no oracle patches required for home "/opt/crs/oracle/product/10.2.0/crs".

There are no oracle patches required for home "/opt/app/11.2.0/grid".

Check: System architecture
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          x86_64                    x86_64                    passed
  rac1          x86_64                    x86_64                    passed
Result: System architecture check passed

Check: Kernel version
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          2.6.9-89.ELsmp            2.6.9                     passed
  rac1          2.6.9-89.ELsmp            2.6.9                     passed
Result: Kernel version check passed

Check: Kernel parameter for "semmsl"
  Node Name         Current       Configured    Required      Status        Comment
  ----------------  ------------  ------------  ------------  ------------  ------------
  rac2              250           250           250           passed
  rac1              250           250           250           passed
Result: Kernel parameter check passed for "semmsl"

Check: Kernel parameter for "semmns"
  Node Name         Current       Configured    Required      Status        Comment
  ----------------  ------------  ------------  ------------  ------------  ------------
  rac2              32000         32000         32000         passed
  rac1              32000         32000         32000         passed
Result: Kernel parameter check passed for "semmns"

Check: Kernel parameter for "semopm"
  Node Name         Current       Configured    Required      Status        Comment
  ----------------  ------------  ------------  ------------  ------------  ------------
  rac2              100           100           100           passed
  rac1              100           100           100           passed
Result: Kernel parameter check passed for "semopm"

Check: Kernel parameter for "semmni"
  Node Name         Current       Configured    Required      Status        Comment
  ----------------  ------------  ------------  ------------  ------------  ------------
  rac2              128           128           128           passed
  rac1              128           128           128           passed
Result: Kernel parameter check passed for "semmni"

Check: Kernel parameter for "shmmax"
  Node Name         Current       Configured    Required      Status        Comment
  ----------------  ------------  ------------  ------------  ------------  ------------
  rac2              1052764160    1052764160    1052764160    passed
  rac1              1052764160    1052764160    1052764160    passed
Result: Kernel parameter check passed for "shmmax"

Check: Kernel parameter for "shmmni"
  Node Name         Current       Configured    Required      Status        Comment
  ----------------  ------------  ------------  ------------  ------------  ------------
  rac2              4096          4096          4096          passed
  rac1              4096          4096          4096          passed
Result: Kernel parameter check passed for "shmmni"

Check: Kernel parameter for "shmall"
  Node Name         Current       Configured    Required      Status        Comment
  ----------------  ------------  ------------  ------------  ------------  ------------
  rac2              2097152       2097152       2097152       passed
  rac1              2097152       2097152       2097152       passed
Result: Kernel parameter check passed for "shmall"

Check: Kernel parameter for "file-max"
  Node Name         Current       Configured    Required      Status        Comment
  ----------------  ------------  ------------  ------------  ------------  ------------
  rac2              6815744       6815744       6815744       passed
  rac1              6815744       6815744       6815744       passed
Result: Kernel parameter check passed for "file-max"

Check: Kernel parameter for "ip_local_port_range"
  Node Name         Current       Configured    Required      Status        Comment
  ----------------  ------------  ------------  ------------  ------------  ------------
  rac2              between 9000.0 & 65500.0  between 9000.0 & 65500.0  between 9000.0 & 65500.0  passed
  rac1              between 9000.0 & 65500.0  between 9000.0 & 65500.0  between 9000.0 & 65500.0  passed
Result: Kernel parameter check passed for "ip_local_port_range"

Check: Kernel parameter for "rmem_default"
  Node Name         Current       Configured    Required      Status        Comment
  ----------------  ------------  ------------  ------------  ------------  ------------
  rac2              1048576       1048576       262144        passed
  rac1              1048576       1048576       262144        passed
Result: Kernel parameter check passed for "rmem_default"

Check: Kernel parameter for "rmem_max"
  Node Name         Current       Configured    Required      Status        Comment
  ----------------  ------------  ------------  ------------  ------------  ------------
  rac2              4194304       4194304       4194304       passed
  rac1              4194304       4194304       4194304       passed
Result: Kernel parameter check passed for "rmem_max"

Check: Kernel parameter for "wmem_default"
  Node Name         Current       Configured    Required      Status        Comment
  ----------------  ------------  ------------  ------------  ------------  ------------
  rac2              262144        262144        262144        passed
  rac1              262144        262144        262144        passed
Result: Kernel parameter check passed for "wmem_default"

Check: Kernel parameter for "wmem_max"
  Node Name         Current       Configured    Required      Status        Comment
  ----------------  ------------  ------------  ------------  ------------  ------------
  rac2              1048576       1048576       1048576       passed
  rac1              1048576       1048576       1048576       passed
Result: Kernel parameter check passed for "wmem_max"

Check: Kernel parameter for "aio-max-nr"
  Node Name         Current       Configured    Required      Status        Comment
  ----------------  ------------  ------------  ------------  ------------  ------------
  rac2              1048576       1048576       1048576       passed
  rac1              1048576       1048576       1048576       passed
Result: Kernel parameter check passed for "aio-max-nr"

Check: Package existence for "make"
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          make-3.80-7.EL4           make-3.80                 passed
  rac1          make-3.80-7.EL4           make-3.80                 passed
Result: Package existence check passed for "make"

Check: Package existence for "binutils"
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          binutils-2.15.92.0.2-25   binutils-2.15.92.0.2      passed
  rac1          binutils-2.15.92.0.2-25   binutils-2.15.92.0.2      passed
Result: Package existence check passed for "binutils"

Check: Package existence for "gcc(x86_64)"
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          gcc(x86_64)-3.4.6-11      gcc(x86_64)-3.4.6         passed
  rac1          gcc(x86_64)-3.4.6-11      gcc(x86_64)-3.4.6         passed
Result: Package existence check passed for "gcc(x86_64)"

Check: Package existence for "libaio(x86_64)"
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          libaio(x86_64)-0.3.105-2  libaio(x86_64)-0.3.105    passed
  rac1          libaio(x86_64)-0.3.105-2  libaio(x86_64)-0.3.105    passed
Result: Package existence check passed for "libaio(x86_64)"

Check: Package existence for "glibc(x86_64)"
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          glibc(x86_64)-2.3.4-2.43  glibc(x86_64)-2.3.4-2.41  passed
  rac1          glibc(x86_64)-2.3.4-2.43  glibc(x86_64)-2.3.4-2.41  passed
Result: Package existence check passed for "glibc(x86_64)"

Check: Package existence for "compat-libstdc++-33(x86_64)"
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          compat-libstdc++-33(x86_64)-3.2.3-47.3  compat-libstdc++-33(x86_64)-3.2.3  passed
  rac1          compat-libstdc++-33(x86_64)-3.2.3-47.3  compat-libstdc++-33(x86_64)-3.2.3  passed
Result: Package existence check passed for "compat-libstdc++-33(x86_64)"

Check: Package existence for "elfutils-libelf(x86_64)"
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          elfutils-libelf(x86_64)-0.97.1-5  elfutils-libelf(x86_64)-0.97  passed
  rac1          elfutils-libelf(x86_64)-0.97.1-5  elfutils-libelf(x86_64)-0.97  passed
Result: Package existence check passed for "elfutils-libelf(x86_64)"

Check: Package existence for "elfutils-libelf-devel"
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          elfutils-libelf-devel-0.97.1-5  elfutils-libelf-devel-0.97  passed
  rac1          elfutils-libelf-devel-0.97.1-5  elfutils-libelf-devel-0.97  passed
Result: Package existence check passed for "elfutils-libelf-devel"

Check: Package existence for "glibc-common"
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          glibc-common-2.3.4-2.43   glibc-common-2.3.4        passed
  rac1          glibc-common-2.3.4-2.43   glibc-common-2.3.4        passed
Result: Package existence check passed for "glibc-common"

Check: Package existence for "glibc-devel(x86_64)"
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          glibc-devel(x86_64)-2.3.4-2.43  glibc-devel(x86_64)-2.3.4  passed
  rac1          glibc-devel(x86_64)-2.3.4-2.43  glibc-devel(x86_64)-2.3.4  passed
Result: Package existence check passed for "glibc-devel(x86_64)"

Check: Package existence for "glibc-headers"
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          glibc-headers-2.3.4-2.43  glibc-headers-2.3.4       passed
  rac1          glibc-headers-2.3.4-2.43  glibc-headers-2.3.4       passed
Result: Package existence check passed for "glibc-headers"

Check: Package existence for "gcc-c++(x86_64)"
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          gcc-c++(x86_64)-3.4.6-11  gcc-c++(x86_64)-3.4.6     passed
  rac1          gcc-c++(x86_64)-3.4.6-11  gcc-c++(x86_64)-3.4.6     passed
Result: Package existence check passed for "gcc-c++(x86_64)"

Check: Package existence for "libaio-devel(x86_64)"
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          libaio-devel(x86_64)-0.3.105-2  libaio-devel(x86_64)-0.3.105  passed
  rac1          libaio-devel(x86_64)-0.3.105-2  libaio-devel(x86_64)-0.3.105  passed
Result: Package existence check passed for "libaio-devel(x86_64)"

Check: Package existence for "libgcc(x86_64)"
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          libgcc(x86_64)-3.4.6-11   libgcc(x86_64)-3.4.6      passed
  rac1          libgcc(x86_64)-3.4.6-11   libgcc(x86_64)-3.4.6      passed
Result: Package existence check passed for "libgcc(x86_64)"

Check: Package existence for "libstdc++(x86_64)"
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          libstdc++(x86_64)-3.4.6-11  libstdc++(x86_64)-3.4.6   passed
  rac1          libstdc++(x86_64)-3.4.6-11  libstdc++(x86_64)-3.4.6   passed
Result: Package existence check passed for "libstdc++(x86_64)"

Check: Package existence for "libstdc++-devel(x86_64)"
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          libstdc++-devel(x86_64)-3.4.6-11  libstdc++-devel(x86_64)-3.4.6  passed
  rac1          libstdc++-devel(x86_64)-3.4.6-11  libstdc++-devel(x86_64)-3.4.6  passed
Result: Package existence check passed for "libstdc++-devel(x86_64)"

Check: Package existence for "sysstat"
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          sysstat-5.0.5-25.el4      sysstat-5.0.5             passed
  rac1          sysstat-5.0.5-25.el4      sysstat-5.0.5             passed
Result: Package existence check passed for "sysstat"

Check: Package existence for "pdksh"
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          pdksh-5.2.14-30.6         pdksh-5.2.14              passed
  rac1          pdksh-5.2.14-30.6         pdksh-5.2.14              passed
Result: Package existence check passed for "pdksh"

Check: Package existence for "expat(x86_64)"
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  rac2          expat(x86_64)-1.95.7-4    expat(x86_64)-1.95.7      passed
  rac1          expat(x86_64)-1.95.7-4    expat(x86_64)-1.95.7      passed
Result: Package existence check passed for "expat(x86_64)"

Checking for multiple users with UID value 0
Result: Check for multiple users with UID value 0 passed

Check: Current group ID
Result: Current group ID check passed

Starting check for consistency of primary group of root user
  Node Name                             Status
  ------------------------------------  ------------------------
  rac2                                  passed
  rac1                                  passed

Check for consistency of root user's primary group passed

Starting Clock synchronization checks using Network Time Protocol(NTP)...

NTP Configuration file check started...
Network Time Protocol(NTP) configuration file not found on any of the nodes. Oracle Cluster Time Synchronization Service(CTSS) can be used instead of NTP for time synchronization on the cluster nodes
No NTP Daemons or Services were found to be running

Result: Clock synchronization check using Network Time Protocol(NTP) passed

Checking Core file name pattern consistency...
Core file name pattern consistency check passed.

Checking to make sure user "oracle" is not in "root" group
  Node Name     Status                    Comment
  ------------  ------------------------  ------------------------
  rac2          passed                    does not exist
  rac1          passed                    does not exist
Result: User "oracle" is not part of "root" group. Check passed

Check default user file creation mask
  Node Name     Available                 Required                  Comment
  ------------  ------------------------  ------------------------  ----------
  rac2          0022                      0022                      passed
  rac1          0022                      0022                      passed
Result: Default user file creation mask check passed
Checking consistency of file "/etc/resolv.conf" across nodes

Checking the file "/etc/resolv.conf" to make sure only one of domain and search entries is defined
File "/etc/resolv.conf" does not have both domain and search entries defined
Checking if domain entry in file "/etc/resolv.conf" is consistent across the nodes...
domain entry in file "/etc/resolv.conf" is consistent across nodes
Checking if search entry in file "/etc/resolv.conf" is consistent across the nodes...
search entry in file "/etc/resolv.conf" is consistent across nodes
Checking DNS response time for an unreachable node
  Node Name                             Status
  ------------------------------------  ------------------------
  rac2                                  passed
  rac1                                  passed
The DNS response time for an unreachable node is within acceptable limit on all nodes

File "/etc/resolv.conf" is consistent across nodes


UDev attributes check for OCR locations started...
Result: UDev attributes check passed for OCR locations

UDev attributes check for Voting Disk locations started...
Result: UDev attributes check passed for Voting Disk locations

Check: Time zone consistency
Result: Time zone consistency check passed
Checking VIP configuration.
Checking VIP Subnet configuration.
Check for VIP Subnet configuration passed.
Checking VIP reachability
Check for VIP reachability passed.

Checking Oracle Cluster Voting Disk configuration...
Oracle Cluster Voting Disk configuration check passed
Clusterware version consistency passed
Pre-check for cluster services setup was unsuccessful on all the nodes.
Pre-check is unsuccessful because of the above mentioned check.

Configure a SCAN IP to be used with 11gR2 GI upgrade.

Create the new asm admin groups.
groupadd asmadmin
groupadd asmdba
groupadd asmoper
Modify the Oracle user from
id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),503(oper)
To
usermod -g oinstall -G dba,oper,asmdba,asmoper,asmadmin oracle
id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),503(oper),504(asmadmin),505(asmdba),506(asmoper)

Start the clusterware upgrade while the cluster stack is up
crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora....SM1.asm application    ONLINE    ONLINE    rac1
ora....C1.lsnr application    ONLINE    ONLINE    rac1
ora.rac1.gsd   application    ONLINE    ONLINE    rac1
ora.rac1.ons   application    ONLINE    ONLINE    rac1
ora.rac1.vip   application    ONLINE    ONLINE    rac1
ora.rac10g2.db application    ONLINE    ONLINE    rac1
ora....21.inst application    ONLINE    ONLINE    rac1
ora....22.inst application    ONLINE    ONLINE    rac2
ora....SM2.asm application    ONLINE    ONLINE    rac2
ora....C2.lsnr application    ONLINE    ONLINE    rac2
ora.rac2.gsd   application    ONLINE    ONLINE    rac2
ora.rac2.ons   application    ONLINE    ONLINE    rac2
ora.rac2.vip   application    ONLINE    ONLINE    rac2
Execute runInstaller

Select all nodes and ASM upgrade.

It is not possible to do a rolling ASM upgrade with 10gR2. When it is time to do a ASM upgrade all database instance will be shutdown. But the GI install and configuration will happen in a rolling manner.

Specify the new scan ip

Password for less privilege ASMSNMP user. Used to monitor ASM.

Specify new ASM admin groups

New location for GI used in the out-of-place upgrade.

Manually verify the failed check by checking the ignoreall check box.

Upgrade Summary


Execute rootupgrade.sh script one node at a time. Database and ASM will be brought down and back up again once the script has finished executing.

Running rootupgrade.sh on first node (rac1)
# /opt/app/11.2.0/grid/rootupgrade.sh
Performing root user operation for Oracle 11g

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /opt/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /opt/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
OLR initialization - successful
  root wallet
  root wallet cert
  root cert export
  peer wallet
  profile reader wallet
  pa wallet
  peer wallet keys
  pa wallet keys
  peer cert request
  pa cert request
  peer cert
  pa cert
  peer root cert TP
  profile reader root cert TP
  pa root cert TP
  peer pa cert TP
  pa peer cert TP
  profile reader pa cert TP
  profile reader peer cert TP
  peer user cert
  pa user cert
Replacing Clusterware entries in inittab
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
Software version is upgrade but active version remain 10.2.0.5 until all nodes are upgraded
crsctl query crs activeversion
CRS active version on the cluster is [10.2.0.5.0]

crsctl query crs softwareversion
CRS software version on node [rac1] is [11.2.0.3.0]
Running rootupgrade.sh on second node (rac2)
# /opt/app/11.2.0/grid/rootupgrade.sh
Performing root user operation for Oracle 11g

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /opt/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /opt/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
OLR initialization - successful
Replacing Clusterware entries in inittab
clscfg: EXISTING configuration version 5 detected.
clscfg: version 5 is 11g Release 2.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Start upgrade invoked..
Started to upgrade the Oracle Clusterware. This operation may take a few minutes.
Started to upgrade the OCR.
Started to upgrade the CSS.
Started to upgrade the CRS.
The CRS was successfully upgraded.
Oracle Clusterware operating version was successfully set to 11.2.0.3.0
Preparing packages for installation...
cvuqdisk-1.0.9-1
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
Active version is upgraded to 11.2.0.3
crsctl query crs activeversion
CRS active version on the cluster is [11.2.0.3.0]
When the OK button is clicked on Execute Configuration Script dialog other configuration tasks starts. During ASM upgrade all database instances will be brought down automatically and once ASM is upgraded will be brought up.

This conclude the clusterware upgrade to grid infrastructure and GI will be using the raw devices for ocr and vote disk.
crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   a3b3d5071afb7fc0ffb0f7bc4a90fd43 (/dev/raw/raw2) []
Located 1 voting disk(s).

ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     103596
         Used space (kbytes)      :       6032
         Available space (kbytes) :      97564
         ID                       :  972426829
         Device/File Name         : /dev/raw/raw1
                                    Device/File integrity check succeeded

                                    Device/File not configured
                                    Device/File not configured
                                    Device/File not configured
                                    Device/File not configured
         Cluster registry integrity check succeeded
         Logical corruption check succeeded
Some resource types will have auto start option set never. These could be changed as required
Resource Name                       Type                      Auto Start State
-----------                         ------                    ----------------
ora.DATA.dg                         ora.diskgroup.type        never
ora.FLASH.dg                        ora.diskgroup.type        never
ora.LISTENER.lsnr                   ora.listener.type         restore
ora.LISTENER_SCAN1.lsnr             ora.scan_listener.type    restore
ora.asm                             ora.asm.type              never
ora.cvu                             ora.cvu.type              restore
ora.gsd                             ora.gsd.type              always
ora.net1.network                    ora.network.type          restore
ora.oc4j                            ora.oc4j.type             restore
ora.ons                             ora.ons.type              always
ora.rac1.vip                        ora.cluster_vip_net1.type restore
ora.rac10g2.db                      application               restore
ora.rac10g2.rac10g21.inst           application               1
ora.rac10g2.rac10g22.inst           application               1
ora.rac2.vip                        ora.cluster_vip_net1.type restore
ora.scan1.vip                       ora.scan_vip.type         restore
Script to get the above output is available in 11.1.0.7 to 11.2.0.3 post and how to modify the option availablehere.




Next step is to upgrade the RAC software and upgrade the database. As per 1358166.1 there's no pre-patch required if the timezone is 4 on 10gR2 but it's advised to upgrade the timezone to 14 after the upgrade. This could be done while upgrading the database. Current timezone is 4
SQL>  SELECT version FROM v$timezone_file;

   VERSION
----------
         4
Execute runInstaller from database software location.

Select all nodes part of the RAC

New location for out-of-place upgrade.

OS groups for database administration.

Summary

Execute root.sh on all nodes

End of root.sh and clicking OK button will result in start of DBUA. All but one instance will be brought down, upgrade will continue on the instance that is up and once completed all instance will be brought up.


Upgrade timezone during the database upgrade

Pre-upgrade summary

Upgrade result

Conclude the RAC software and database upgrade

Similar to 11.1.0.7 to 11.2.0.3 remote listener entry will have both tnsnames.ora entries from 10gR2 and scan ip
remote_listener                      string      LISTENERS_RAC10G2, rac-scan:1521

Even though 10gR2 RAC had Jan 2012 PSU applied and _external_scn_rejection_threshold_hours set it was commented during upgrade and was not present after the upgrade.

Create an application service for FCF.

Useful metalink notes
Checklist for PRVF-10037 : Failed to retrieve storage type for xx on node xx [ID 1233505.1]
ASM upgrade failure from 10.2.0.4 to 11.2.0.2 [ID 1336812.1]
Alternative Way To Upgrade An ASM RAC Configuration From Release 10.2 Or 11.1 To Release 11.2 [ID 1422415.1]
Actions For DST Updates When Upgrading To Or Applying The 11.2.0.3 Patchset [ID 1358166.1]
Things to Consider Before Upgrading to 11.2.0.3 to Avoid Poor Performance or Wrong Results [ID 1392633.1]
Oracle 11gR2 Upgrade Companion [ID 785351.1]

Saturday, February 25, 2012

Upgrading from 10.2.0.4 to 10.2.0.5 (Clusterware, RAC, ASM)

Two node cluster (node names rac1 and rac2) running 10.2.0.4 on RHEL 4 (kernel 2.6.9-89). The 10.2.0.4 has PSU January 2012 applied on the Oracle homes. The accompanying patch set note describe the steps needed to apply the patch set (unlike 11gR2 where information has to found from multiple sources).

One of the pre-reqs is time zone value
SQL> SELECT version FROM v$timezone_file;
   VERSION
----------
         4
If this query reports version 4 (as in this case), no action is required. If this reports a version lower or higher than 4, see 1086400.1 for more information.
Current clusterware version
$ crsctl query crs activeversion
CRS active version on the cluster is [10.2.0.4.0]
$ crsctl query crs softwareversion
CRS software version on node [rac1] is [10.2.0.4.0]
10gR2 clusterware could be upgraded in a rolling manner even though it's an in-place upgrade but as the Oracle home in-place upgrades does requires database to be shutdown. If not following warning will be shown.

1. Before the start of the clusterware upgrade all cluster applications are online.
crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora....SM1.asm application    ONLINE    ONLINE    rac1
ora....C1.lsnr application    ONLINE    ONLINE    rac1
ora.rac1.gsd   application    ONLINE    ONLINE    rac1
ora.rac1.ons   application    ONLINE    ONLINE    rac1
ora.rac1.vip   application    ONLINE    ONLINE    rac1
ora.rac10g2.db application    ONLINE    ONLINE    rac2
ora....21.inst application    ONLINE    ONLINE    rac1
ora....22.inst application    ONLINE    ONLINE    rac2
ora....SM2.asm application    ONLINE    ONLINE    rac2
ora....C2.lsnr application    ONLINE    ONLINE    rac2
ora.rac2.gsd   application    ONLINE    ONLINE    rac2
ora.rac2.ons   application    ONLINE    ONLINE    rac2
ora.rac2.vip   application    ONLINE    ONLINE    rac2
2. Start the clusterware upgrade by executing runInstaller
Even though it is a rolling upgrade all nodes are selected by default.



When the installation has finished it will ask to run the root script on each node. This is where the rolling upgrade happens.

3. Stop the clusterware stack on first node
stop on first node
crsctl stop crs
Stopping resources. This could take several minutes.
Successfully stopped CRS resources.
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Cluster stack is running on other node(s) and could be used by applications.
rac2 ~]$ crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora....SM1.asm application    ONLINE    OFFLINE
ora....C1.lsnr application    ONLINE    OFFLINE
ora.rac1.gsd   application    ONLINE    OFFLINE
ora.rac1.ons   application    ONLINE    OFFLINE
ora.rac1.vip   application    ONLINE    ONLINE    rac2
ora.rac10g2.db application    ONLINE    ONLINE    rac2
ora....21.inst application    ONLINE    OFFLINE
ora....22.inst application    ONLINE    ONLINE    rac2
ora....SM2.asm application    ONLINE    ONLINE    rac2
ora....C2.lsnr application    ONLINE    ONLINE    rac2
ora.rac2.gsd   application    ONLINE    ONLINE    rac2
ora.rac2.ons   application    ONLINE    ONLINE    rac2
ora.rac2.vip   application    ONLINE    ONLINE    rac2
4. Run the root102.sh on first node
# /opt/crs/oracle/product/10.2.0/crs/install/root102.sh
Creating pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to /opt/crs/oracle/product/10.2.0/crs
Relinking some shared libraries.
Relinking of patched files is complete.
Preparing to recopy patched init and RC scripts.
Recopying init and RC scripts.
Startup will be queued to init within 30 seconds.
Starting up the CRS daemons.
Waiting for the patched CRS daemons to start.
  This may take a while on some systems.
.
10205 patch successfully applied.
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Successfully deleted 1 values from OCR.
Successfully deleted 1 keys from OCR.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :   
node 1: rac1 rac1-pvt rac1
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
clscfg -upgrade completed successfully
Creating '/opt/crs/oracle/product/10.2.0/crs/install/paramfile.crs' with data used for CRS configuration
Setting CRS configuration values in /opt/crs/oracle/product/10.2.0/crs/install/paramfile.crs
At the end of this clusterware stack will be up and running on this node (rac1) and will be available for use while root script is run on other nodes.
rac1 oracle]# crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora....SM1.asm application    ONLINE    ONLINE    rac1
ora....C1.lsnr application    ONLINE    ONLINE    rac1
ora.rac1.gsd   application    ONLINE    ONLINE    rac1
ora.rac1.ons   application    ONLINE    ONLINE    rac1
ora.rac1.vip   application    ONLINE    ONLINE    rac1
ora.rac10g2.db application    ONLINE    ONLINE    rac2
ora....21.inst application    ONLINE    ONLINE    rac1
ora....22.inst application    ONLINE    ONLINE    rac2
ora....SM2.asm application    ONLINE    ONLINE    rac2
ora....C2.lsnr application    ONLINE    ONLINE    rac2
ora.rac2.gsd   application    ONLINE    ONLINE    rac2
ora.rac2.ons   application    ONLINE    ONLINE    rac2
ora.rac2.vip   application    ONLINE    ONLINE    rac2
5. Carry out the same steps on other node(s) (rac2)
$ crsctl stop crs
Stopping resources. This could take several minutes.
Successfully stopped CRS resources.
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Run root102.sh
[root@rac2 oracle]# /opt/crs/oracle/product/10.2.0/crs/install/root102.sh
Creating pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to /opt/crs/oracle/product/10.2.0/crs
Relinking some shared libraries.
Relinking of patched files is complete.
Preparing to recopy patched init and RC scripts.
Recopying init and RC scripts.
Startup will be queued to init within 30 seconds.
Starting up the CRS daemons.
Waiting for the patched CRS daemons to start.
  This may take a while on some systems.
.
10205 patch successfully applied.
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Successfully deleted 1 values from OCR.
Successfully deleted 1 keys from OCR.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :   
node 2: rac2 rac2-pvt rac2
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
clscfg -upgrade completed successfully
Creating '/opt/crs/oracle/product/10.2.0/crs/install/paramfile.crs' with data used for CRS configuration
Setting CRS configuration values in /opt/crs/oracle/product/10.2.0/crs/install/paramfile.crs
6. Verify clusterware is upgraded
$ crsctl query crs activeversion
CRS active version on the cluster is [10.2.0.5.0]
$ crsctl query crs softwareversion
CRS software version on node [rac2] is [10.2.0.5.0]
7. After the upgrade opatch exhbit an error which could be resolved by installing the latest version of opatch.



8. Create a pfile of the database before the Oracle Home is upgraded. Shutdown all applications running out of the Oracle home before Oracle home ugprades
[oracle@rac1 ~]$ srvctl stop database -d rac10g2
[oracle@rac1 ~]$ srvctl stop asm -n rac1
[oracle@rac1 ~]$ srvctl stop asm -n rac2
[oracle@rac1 ~]$ srvctl stop nodeapps -n rac2
[oracle@rac1 ~]$ srvctl stop nodeapps -n rac1
9. Execute runInstaller and upgrade Oracle Home across the cluster


10. From the 10g Upgrade guide
The DBUA provides support for Real Application Clusters (RAC) and Automatic Storage Management (ASM). Support for Real Application Clusters In a Real Application Clusters (RAC) environment, the DBUA upgrades all the database and configuration files on all nodes in the cluster.

Support for Automatic Storage Management The DBUA supports upgrades of databases that use Automatic Storage Management (ASM). If an ASM instance is detected, you have the choice of updating both the database and ASM or only the ASM instance.


In this ASM is upgrade is not necessary.

11. Database upgrade could be done manually or using DBUA. If database upgrade is done manually then set cluster_database=false before starting the database in upgrade mode. If DBUA is used setting cluster_database=false will be done by DBUA itself.

Since the 10.2.0.4 database and Oracle home had the PSU Jan 2012 applied and a new initialization parameter (_external_scn_rejection_threshold_hours) was introduced.

As the newly upgrade 10.2.0.5 home doesn't have this patch (PSU Jan 2012) yet trying to start the database for upgrade could be a problem.
SQL> startup nomount
ORA-01078: failure in processing system parameters
LRM-00101: unknown parameter name '_external_scn_rejection_threshold_hours'
This could be resolved with either by starting the database with the pfile created earlier (step 8) or applying the PSU Jan 2012 on the new 10.2.0.5 homes before running the DBUA.

In this case the latter option was selected. After the PSU Jan 2012 was applied on 10.2.0.5 DBUA ran without an issue.



12. After the upgrade has finished apply the post installation script of the PSU. This concludes the 10.2.0.4 to 10.2.0.5 upgrade.

Useful metalink notes
Oracle Clusterware (CRS or GI) Rolling Upgrades [ID 338706.1]

Thursday, January 19, 2012

2012 January PSU and the growth in the System Change Number (SCN) bug.

With 2012 January PSU/CPU Oracle has patched the SCN growth bug, the case when a database is having a high rate change for SCN. Computer world has an comprehensive article about this issue.

Following metalink notes provides means to test if the database is affected by this bug.
Information on the System Change Number (SCN) and how it is used in the Oracle Database [ID 1376995.1]
Installing, Executing and Interpreting output from the "scnhealthcheck.sql" script [ID 1393363.1]
Evidence to collect when reporting "high SCN rate" issues to Oracle Support [ID 1388639.1]

scnhealthcheck.sql mentioned in 1393363.1 could be used to verify if the database is affected.
SQL> @scnhealthcheck.sql
--------------------------------------------------------------
ScnHealthCheck
--------------------------------------------------------------
Current Date: 2012/01/19 10:39:57
Current SCN:  4165911
Version:      11.2.0.3.0
--------------------------------------------------------------
Result: A - SCN Headroom is good
Apply the latest recommended patches
based on your maintenance schedule
For further information review MOS document id 1393363.1
--------------------------------------------------------------
Recommendations are if the output is Result: A - SCN Headroom is good then system SCN health is good apply the recommended patches (756671.1) during the normal maintenance schedule.

If the output is Result: B - SCN Headroom is low then apply the recommended patches immediately outside the normal maintenance schedule and continue to monitor the SCN health. Once patched headroom will increase overtime (could take days or weeks) to script to report Result: A - SCN Headroom is good.

If the output is Result: C - SCN Headroom is low then apply the recommended patches immediately and collect required information listed on 1388639.1 and raise a SR so additional advice could be given.

With this PSU a new hidden parameter called "_external_scn_rejection_threshold_hours" has been introduced in connection with this bug. Once the patch is applied Oracle recommend setting this to 24 on 10g and 11gR1 systems. Value of _external_scn_rejection_threshold_hours after patched applied on 11gR1 (11.1.0.7)
To set the value to 24
alter system set "_external_scn_rejection_threshold_hours" = 24 
   comment='Set threshold on dd/mon/yyyy - See MOS Document 1393363.1' 
   scope=spfile ;
On 11gR2 systems this set to 24 by default once the patch is applied.
Apart from the the test cases mentioned in 1376995.1 IOUG newsletter mentioned another "way to test is to look at the backups with a restore process to validate SCN values and recoverability which is part of a best practice for database administrators. With these tests and test plans for applying the Patch Set Updates (PSU) or traditional Critical Patch Update patches, the vulnerabilities can be validated with appropriate fixes of the environment."

More clarifications on the issue from computer world

Tuesday, January 10, 2012

KFOD - ASM Tool

KFOD tool available in ASM Home (Grid Home) in 11gR2 and Oracle Home in other versions (11gR1 and 10gR2) gives a view of disks from the operating systems point of view. This is useful in diagnosting disk access errors in ASM.

Options available wth KFOD
kfod help=y
_asm_a/llow_only_raw_disks              KFOD allow only raw devices [_asm_allow_only_raw_disks=TRUE/(FALSE)]
_asm_l/ibraries         ASM Libraries[_asm_libraries=lib1,lib2,...]
_asms/id                ASM Instance[_asmsid=sid]
a/sm_diskstring         ASM Diskstring [asm_diskstring=discoverystring, discoverystring ...]
c/luster                KFOD cluster [cluster=TRUE/(FALSE)]
db/_unique_name         db_unique_name for ASM instance[db_unique_name=dbname]
di/sks          Disks to discover [disks=raw,asm,all]
ds/cvgroup              Include group name [dscvgroup=TRUE/(FALSE)]
g/roup          Disks in diskgroup [group=diskgroup]
h/ostlist               hostlist[hostlist=host1,host2,...]
metadata_a/usize                AU Size for Metadata Size Calculation
metadata_c/lients               Client Count for Metadata Size Calculation
metadata_d/isks         Disk Count for Metadata Size Calculation
metadata_n/odes         Node Count for Metadata Size Calculation
metadata_r/edundancy            Redundancy for Metadata Size Calculation
n/ohdr          KFOD header suppression [nohdr=TRUE/(FALSE)]
o/p             KFOD options type [OP=DISKS/CANDIDATES/MISSING/GROUPS/INSTS/VERSION/CLIENTS/RM/RMVERS/DFLTDSTR/GPNPDSTR/METADATA/ALL]
p/file          ASM parameter file [pfile=parameterfile]
s/tatus         Include disk header status [status=TRUE/(FALSE)]
v/erbose                KFOD verbose errors [verbose=TRUE/(FALSE)]

More on metalink note ASM tool to check access to ASM disks [ID 1359873.1]

Thursday, December 1, 2011

Upgrading from 10.2.0.4 to 11.2.0.3

There's a earlier blog about upgrading from 10g to 11gR2. This blog is to add some missing points in the previous blog and additional information with regard to upgrading from 10.2.0.4 to 11.2.0.3. Another post is available with upgrading RAC environments from 10.2.0.5 to 11.2.0.3

Following metalink notes are useful for this upgrade processes.
Upgrade Advisor: Database from 10.2 to 11.2 [ID 251.1]
Complete Checklist to Upgrade the Database to 11gR2 using DBUA [ID 870814.1]
Complete Checklist for Manual Upgrades to 11gR2 [ID 837570.1]
Oracle Database Upgrade Path Reference List [ID 730365.1]
Things to Consider Before Upgrading to 11.2.0.3 to Avoid Poor Performance or Wrong Results [ID 1392633.1]

The database to upgrade is a 10.2.0.4 with CPU 2009 July being the latest CPU that has been applied on it. In other words no CPU or PSU released after July 2009 has been applied on this database.

Secondly it's a standard edition database with the following registry components.
COMP_NAME                           STATUS
----------------------------------- -------
OLAP Analytic Workspace             INVALID
OLAP Catalog                        INVALID
Oracle OLAP API                     INVALID
JServer JAVA Virtual Machine        VALID
Oracle Data Mining                  VALID
Oracle Database Catalog Views       VALID
Oracle Database Java Packages       VALID
Oracle Database Packages and Types  VALID
Oracle Enterprise Manager           VALID
Oracle Expression Filter            VALID
Oracle Rules Manager                VALID
Oracle Text                         VALID
Oracle Workspace Manager            VALID
Oracle XDK                          VALID
Oracle XML Database                 VALID
Oracle interMedia                   VALID
Spatial                             VALID
Running utlrp.sql gives the following output as the number of invalid objects
OBJECTS WITH ERRORS
-------------------
                  8
DOC> The following query reports the number of errors caught during
..
ERRORS DURING RECOMPILATION
---------------------------
                          0
4 OLAPSYS packages and 4 public role synonyms are the objects with errors in this case.
OLAP* and several other components are not valid options on a standard edition database. In this case only OLAP* components are invalid but spatial, intermedia, data mining are all not valid for a standard edition database. But the registry will be valid on a fresh installation but after installing CPU or revoking execute on utl* packages for public and etc some of these will become invalid. The earlier blog was of such a fresh installation of 10gR2 that didn't have any components invalid.

Following metalink notes could be used to install/deinstall various components that are not valid in standard edition (if they were install initially).
How To Find Out If OLAP Is Being Used And How To Remove OLAP [ID 739032.1]
Remove Invalid OLAP Objects From SYS And OLAPSYS Schemas [ID 565773.1]
Steps for Manual De-installation of Oracle Spatial [ID 179472.1]
Removed Spatial Option But Spatial Still Appears In V$Option [ID 273573.1]
Where to Find the Information to Install, Upgrade, Downgrade and Deinstall interMedia/Oracle Multimedia? [ID 337415.1](on 10gR2 deinstall $OH/ord/im/admin/imdinst.sql, on 11gR2 $OH/rdbms/admin/catcmprm.sql ORDIM )

Trying to uninstall all non valid components could result in more objects with errors which caused problems during a test upgrade and made the upgrade to fail. If it is decided to remove all the components that are not valid in standard edition it is advisable to make sure that there are no invalid objects prior to upgrade. In this case the upgrade will continue with these three OLAP* components invalid.

The pre-upgrade information tool's output is as follows
SQL> @utlu112i.sql
Oracle Database 11.2 Pre-Upgrade Information Tool 11-29-2011 16:14:13
Script Version: 11.2.0.3.0 Build: 001
.
**********************************************************************
Database:
**********************************************************************
--> name:          stdb1
--> version:       10.2.0.4.0
--> compatible:    10.2.0.3.0
--> blocksize:     8192
--> platform:      Linux x86 64-bit
--> timezone file: V4
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 725 MB
--> UNDOTBS1 tablespace is adequate for the upgrade.
.... minimum required size: 400 MB
--> SYSAUX tablespace is adequate for the upgrade.
.... minimum required size: 461 MB
--> TEMP tablespace is adequate for the upgrade.
.... minimum required size: 60 MB
.
**********************************************************************
Flashback: OFF
**********************************************************************
**********************************************************************
Update Parameters: [Update Oracle Database 11.2 init.ora or spfile]
Note: Pre-upgrade tool was run on a lower version 64-bit database.
**********************************************************************
--> If Target Oracle is 32-Bit, refer here for Update Parameters:
-- No update parameter changes are required.
.

--> If Target Oracle is 64-Bit, refer here for Update Parameters:
-- No update parameter changes are required.
.
**********************************************************************
Renamed Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
-- No renamed parameters found. No changes are required.
.
**********************************************************************
Obsolete/Deprecated Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
--> background_dump_dest         11.1       DEPRECATED   replaced by  "diagnostic_dest"
--> user_dump_dest               11.1       DEPRECATED   replaced by  "diagnostic_dest"
.

**********************************************************************
Components: [The following database components will be upgraded or installed]
**********************************************************************
--> Oracle Catalog Views         [upgrade]  VALID
--> Oracle Packages and Types    [upgrade]  VALID
--> JServer JAVA Virtual Machine [upgrade]  VALID
--> Oracle XDK for Java          [upgrade]  VALID
--> Oracle Workspace Manager     [upgrade]  VALID
--> OLAP Analytic Workspace      [upgrade]  INVALID
--> OLAP Catalog                 [upgrade]  INVALID
--> EM Repository                [upgrade]  VALID
--> Oracle Text                  [upgrade]  VALID
--> Oracle XML Database          [upgrade]  VALID
--> Oracle Java Packages         [upgrade]  VALID
--> Oracle interMedia            [upgrade]  VALID
--> Spatial                      [upgrade]  VALID
--> Data Mining                  [upgrade]  VALID
--> Expression Filter            [upgrade]  VALID
--> Rule Manager                 [upgrade]  VALID
--> Oracle OLAP API              [upgrade]  INVALID
.
**********************************************************************
Miscellaneous Warnings
**********************************************************************
WARNING: --> Database is using a timezone file older than version 14.
.... After the release migration, it is recommended that DBMS_DST package
.... be used to upgrade the 10.2.0.4.0 database timezone version
.... to the latest version which comes with the new release.
WARNING: --> Database contains INVALID objects prior to upgrade.
.... The list of invalid SYS/SYSTEM objects was written to
.... registry$sys_inv_objs.
.... The list of non-SYS/SYSTEM objects was written to
.... registry$nonsys_inv_objs.
.... Use utluiobj.sql after the upgrade to identify any new invalid
.... objects due to the upgrade.
.... USER OLAPSYS has 4 INVALID objects.
.... USER PUBLIC has 4 INVALID objects.
WARNING: --> EM Database Control Repository exists in the database.
.... Direct downgrade of EM Database Control is not supported. Refer to the
.... Upgrade Guide for instructions to save the EM data prior to upgrade.
WARNING: --> Your recycle bin is turned on and currently contains no objects.
.... Because it is REQUIRED that the recycle bin be empty prior to upgrading
.... and your recycle bin is turned on, you may need to execute the command:
        PURGE DBA_RECYCLEBIN
.... prior to executing your upgrade to confirm the recycle bin is empty.
.
**********************************************************************
Recommendations
**********************************************************************
Oracle recommends gathering dictionary statistics prior to
upgrading the database.
To gather dictionary statistics execute the following command
while connected as SYSDBA:

    EXECUTE dbms_stats.gather_dictionary_stats;

**********************************************************************
Oracle recommends reviewing any defined events prior to upgrading.

To view existing non-default events execute the following commands
while connected AS SYSDBA:
  Events:
    SELECT (translate(value,chr(13)||chr(10),' ')) FROM sys.v$parameter2
      WHERE  UPPER(name) ='EVENT' AND  isdefault='FALSE'

  Trace Events:
    SELECT (translate(value,chr(13)||chr(10),' ')) from sys.v$parameter2
      WHERE UPPER(name) = '_TRACE_EVENTS' AND isdefault='FALSE'

Changes will need to be made in the init.ora or spfile.

**********************************************************************
Carry out the steps recommended by this tool such as gathering dictionary and schema statistics and etc. More steps available on 837570.1 which are not relevant on this upgrade so they are not listed.

Another key difference is that 11.2.0.3 provides a way to upgrade the timezone at the same time the database is upgrade. Which was not there on the base 11gR2 release. Compare the 5th picture on the previous blog with the picture below which gives the option to upgrade the timezone.

There are several metalink notes related to timezone upgrade.
Updating the RDBMS DST version in 11gR2 (11.2.0.1 and up) using DBMS_DST [ID 977512.1]
Actions For DST Updates When Upgrading To Or Applying The 11.2.0.3 Patchset [ID 1358166.1]
Before the upgrade the timezone file version was
upgrade 
SQL> select version from v$timezone_file;

   VERSION
----------
         4
Key points relevant to this are (quoting from the metalink note 1358166.1)If this reports a timezone version lower then 14 please see point B.3) in this document.

B.3) If your current timezone version is lower than 14 (typically 4):

B.3b) When upgrading from 10.1.0.x , 10.2.0.x or 11.1.0.x to 11.2.0.3:
For 10.2.0.2 , 10.2.0.3 , 10.2.0.4 or 10.2.0.5 there is no need to apply any patchset before upgrading to 11.2.0.3

Upgrade to 11.2.0.3.No need to apply DST patches on the 10.2.0.2 , 10.2.0.3 , 10.2.0.4 or 10.2.0.5 side first. You can skip any DST related upgrade instructions.
The 11.2.0.3 RDBMS DST version after the upgrade to 11.2.0.3 will be the same DST version as used in 10.2.0.2 , 10.2.0.3 , 10.2.0.4 or 10.2.0.5.

After the upgrade to 11.2.0.3 you can:
(recommended) update the 11.2.0.3 database(s) to DSTv14 (standard DST version of 11.2.0.3) by following Note 977512.1 Updating the RDBMS DST version in 11gR2 (11.2.0.1 and up) using DBMS_DST from step 3a) onwards, when going to DSTv14 there is no need to apply any DST patch to the 11.2.0.3 home

(optional) update to a higher DST than 14 version if this is needed.
Apply the latest 11.2.0.3 DST update patch after the upgrade to 11.2.0.3 and use DDBMS_DST.

The lastest DST patch and related note on how to apply this is found in Note 412160.1 Updated Time Zones in Oracle Time Zone File patches under "C) Notes covering the current DST available updates". Simply follow the note for the latest DST update
. If decided it is possible to upgrade the database's timezone after the database upgrade by following the above metalink notes. In this case timezone was upgraded at the same time database was upgraded.




Save the em control incase later on it is decided to downgrade back to 10g.
Create a TNS name entry in the 10g Oracle Home (network/admin) with the same name as the SID before running the above
/opt/app/oracle/product/11.2.0/dbhome_1/bin/emdwgrd -save -sid stdb1 -path /home/oracle/emdctl
Enter sys password for database stdb1?

Database Unique Name : stdb1
Tue Nov 29 17:01:29 2011 - Validating DB Connection to stdb1 ... pass
Tue Nov 29 17:01:29 2011 - Verify EM DB Control files ... pass
ENV var EM_REMCP not defined, check if rcp or scp is configured.
RCP = /usr/bin/rcp -rp, REMSH = /usr/bin/rsh
shared = 0
Tue Nov 29 17:01:29 2011 - Creating directory ... created
Tue Nov 29 17:01:30 2011 - Stopping DB Control ... stopped
Tue Nov 29 17:01:35 2011 - Saving DB Control files
 ... saved
Tue Nov 29 17:01:35 2011 - Recompiling invalid objects ... recompiled
Tue Nov 29 17:01:36 2011 - Exporting sysman schema for stdb1 ... exported
Tue Nov 29 17:01:59 2011 - DB Control was saved successfully.
Tue Nov 29 17:01:59 2011 - Starting DB Control ... started
Tue Nov 29 17:03:33 2011 - Dump directory was dropped successfully.
Disable all batch and cron jobs.

Take a full backup of the database. (Better if it's a cold backup, not necessary)

Stop the 10g listener and create a listener on 11gR2 home and start it.

Set ORACLE_BASE ,ORACLE_HOME and PATH environment variable pointing to the 11gr2 home and run dbua from the 11gR2 home's bin. Upgrade summary is given below.

Upgrade process will omit some of the components from the upgrade process.

This is also mentioned when selecting the database to upgrade.



During the upgrade it could be seen that some of the components are not upgraded. These components are not valid on standard edition. Also note timezone upgrade.

Upgrade results



Verifying the timezone upgrade
SQL> select version from v$timezone_file;

   VERSION
----------
        14
Components status in the database registry
COMP_NAME                                     VERSION                        STATUS
--------------------------------------------- ------------------------------ -----------
Oracle Multimedia                             11.2.0.3.0                     INVALID
OLAP Analytic Workspace                       10.2.0.4.0                     OPTION OFF
OLAP Catalog                                  10.2.0.4.0                     OPTION OFF
Oracle Data Mining                            10.2.0.4.0                     OPTION OFF
Oracle OLAP API                               10.2.0.4.0                     OPTION OFF
Spatial                                       10.2.0.4.0                     OPTION OFF
JServer JAVA Virtual Machine                  11.2.0.3.0                     VALID
Oracle Database Catalog Views                 11.2.0.3.0                     VALID
Oracle Database Java Packages                 11.2.0.3.0                     VALID
Oracle Database Packages and Types            11.2.0.3.0                     VALID
Oracle Enterprise Manager                     11.2.0.3.0                     VALID
Oracle Expression Filter                      11.2.0.3.0                     VALID
Oracle Rules Manager                          11.2.0.3.0                     VALID
Oracle Text                                   11.2.0.3.0                     VALID
Oracle Workspace Manager                      11.2.0.3.0                     VALID
Oracle XDK                                    11.2.0.3.0                     VALID
Oracle XML Database                           11.2.0.3.0                     VALID

17 rows selected.
Oracle Multimedia(Oracle interMedia in 10g) is invalid after the upgrade. Following two metalink notes help identifying the reason for this
Things To Check When Oracle Multimedia/interMedia Is INVALID In DBA_REGISTRY Or The Version Is Not The Same As The Database Version [ID 1065954.1]
Verifying an Installed Version of Oracle Multimedia [ID 458228.1]

Running the validate_ordim gives the following errors
SQL> set serveroutput on
SQL> execute validate_ordim;
Locator INVALID OBJECTS: PRVT_IDX - 5 - 11
Locator INVALID OBJECTS: SDO_GEOM - 5 - 11
Locator INVALID OBJECTS: SAMCLUST_IMP_T - 5 - 14

PL/SQL procedure successfully completed.
From the output it seems that some of the spatial component related objects are invalid (since spatial option is off after the upgrade) thus oracle media that depends on it also becomes invalid. Remove the Oracle media component with (which also removes spatial component which is depends on media)
SQL> @?/rdbms/admin/catcmprm.sql ORDIM
About to remove Oracle Multimedia.
Checking to see if anyone is using Oracle Multimedia.

Oracle Multimedia is not being used
PL/SQL procedure successfully completed.

Are you sure you want to remove Oracle Multimedia (Y/N): y
PL/SQL procedure successfully completed.

Removing Oracle Multimedia
PL/SQL procedure successfully completed.
After remove dba registry status
COMP_NAME                           VERSION                        STATUS
----------------------------------- ------------------------------ --------------------------------------------
OLAP Analytic Workspace             10.2.0.4.0                     OPTION OFF
OLAP Catalog                        10.2.0.4.0                     OPTION OFF
Oracle Data Mining                  10.2.0.4.0                     OPTION OFF
Oracle OLAP API                     10.2.0.4.0                     OPTION OFF
JServer JAVA Virtual Machine        11.2.0.3.0                     VALID
Oracle Database Catalog Views       11.2.0.3.0                     VALID
Oracle Database Java Packages       11.2.0.3.0                     VALID
Oracle Database Packages and Types  11.2.0.3.0                     VALID
Oracle Enterprise Manager           11.2.0.3.0                     VALID
Oracle Expression Filter            11.2.0.3.0                     VALID
Oracle Rules Manager                11.2.0.3.0                     VALID
Oracle Text                         11.2.0.3.0                     VALID
Oracle Workspace Manager            11.2.0.3.0                     VALID
Oracle XDK                          11.2.0.3.0                     VALID
Oracle XML Database                 11.2.0.3.0                     VALID

15 rows selected.
This will increase the number of invalid objects but these will be OLAP related objects and has no impact on the rest of the database operation.
SQL>select owner,object_type,count(*) from dba_objects where status='INVALID' group by owner,object_type order by owner,object_type ;

OWNER                          OBJECT_TYPE           COUNT(*)
------------------------------ ------------------- ----------
OLAPSYS                        PACKAGE BODY                 3
OLAPSYS                        VIEW                        25
PUBLIC                         SYNONYM                     25
It is possible to drop the olapsys user and also drop remaining public synonyms.
DROP USER OLAPSYS CASCADE;
select 'drop '||object_type||' '||substr(object_name,1,40) ||';' from  dba_objects where status='INVALID';
After this expdp/impdp could run into following error
ORA-39127: unexpected error from call to "SYS"."DBMS_CUBE_EXP"."INSTANCE_EXTENDED_INFO_EXP"
ORA-44002: invalid object name
ORA-06512: at "SYS.DBMS_ASSERT", line 316
ORA-06512: at "SYS.DBMS_METADATA", line 9114
Metalink notes How To Remove or De-activate OLAP After Migrating From 9i To 10g or 11g [ID 467643.1] and ORA-39127 SYS.DBMS_CUBE_EXP.INSTANCE_EXTENDED_INFO_EXP ORA-44002 On Expdp After Upgrade To 11.2.0.2 [ID 1353491.1] explains the solution for this, which is If the OLAP option is not used delete DBMS_CUBE_EXP OLAP package from the export view as follows
SQL> select PACKAGE,SCHEMA,class from exppkgact$ where (schema,package) not in (select owner,object_name from dba_objects where object_type='PACKAGE');

PACKAGE                        SCHEMA                              CLASS
------------------------------ ------------------------------ ----------
DBMS_CUBE_EXP                  SYS                                     4

SQL> delete from sys.exppkgact$ where package = 'DBMS_CUBE_EXP' and schema= 'SYS';
1 row deleted.
SQL> commit;
Commit complete.
After this export will work as expected and there will no invalid objects nor any invalid database components
@?/rdbms/admin/utlrp
OBJECTS WITH ERRORS
-------------------
                  0

DOC> The following query reports the number of errors caught during
..
ERRORS DURING RECOMPILATION
---------------------------
                          0

SQL> select comp_name,version,status from dba_registry order by 3,1,2;

COMP_NAME                           VERSION                        STATUS
----------------------------------- ------------------------------ -----------
OLAP Analytic Workspace             10.2.0.4.0                     OPTION OFF
Oracle Data Mining                  10.2.0.4.0                     OPTION OFF
Oracle OLAP API                     10.2.0.4.0                     OPTION OFF
JServer JAVA Virtual Machine        11.2.0.3.0                     VALID
Oracle Database Catalog Views       11.2.0.3.0                     VALID
Oracle Database Java Packages       11.2.0.3.0                     VALID
Oracle Database Packages and Types  11.2.0.3.0                     VALID
Oracle Enterprise Manager           11.2.0.3.0                     VALID
Oracle Expression Filter            11.2.0.3.0                     VALID
Oracle Rules Manager                11.2.0.3.0                     VALID
Oracle Text                         11.2.0.3.0                     VALID
Oracle Workspace Manager            11.2.0.3.0                     VALID
Oracle XDK                          11.2.0.3.0                     VALID
Oracle XML Database                 11.2.0.3.0                     VALID

14 rows selected.

This concluded the ugprade to 11.2.0.3. After the upgrade the database will exhibit three shared segment behavior that is only found on 11.2.0.3.