Quantcast
Channel: A! Help
Viewing all 315 articles
Browse latest View live

ORA-06512: ORACLE_OCM.MGMT_DB_LL_METRICS on Alert Log

$
0
0
On a new install 11.2.0.3 following could be observed on the alert log
Errors in file /opt/app/oracle/diag/rdbms/db/db1/trace/db1_j004_5824.trc:
ORA-12012: error on auto execute of job "ORACLE_OCM"."MGMT_CONFIG_JOB_2_1"
ORA-29280: invalid directory path
ORA-06512: at "ORACLE_OCM.MGMT_DB_LL_METRICS", line 2436
ORA-06512: at line 1
This is because the OCM is trying to write a directory that doesn't exists and to resolve this the out of the box OCM that comes with installer need further configuration. If OCM is not used drop the OCM user and the default directory setup. This does not affect any other database components.
SQL> drop user ORACLE_OCM cascade;
User dropped.

SQL> drop directory ORACLE_OCM_CONFIG_DIR;
Directory dropped.
If OCM is used then configure it by following "Oracle Configuration Manager Installation and Administration Guide".



Useful metalink notes
How to deinstall OCM [ID 761313.1]
Oracle Configuration Manager FAQ [ID 369111.5]
How To Manually Remove ORACLE_OCM From Database [ID 859113.1]
"ORA-12012: error on auto execute of job ORACLE_OCM.MGMT_CONFIG_JOB_2_1" And "ORA-29280: invalid directory path" In Database AlertLog [ID 1453959.1]

ORA-04063: package body "XDB.DBMS_CSX_INT" has errors

$
0
0
Following could be observed in the database alert log (11.2.0.3) during a schema export.
Errors in file /opt/app/oracle/diag/rdbms/db/db/trace/db_dw00_5669.trc:
ORA-00604: error occurred at recursive SQL level 3
ORA-04063: package body "XDB.DBMS_CSX_INT" has errors
XDB SGA reset to NULL.
This is a consequence of revoking execute privilege on utl_file from public. More on revoking execute privilege from public on some packages is available on 247093.1,797706.1,1165830.1.
To resolve the issue with the expdp grant the revoke execute privilege back to public or explicitly to the xdb user.


Useful metalink notes
Data Pump Export (expdp) = ORA-39126 ORA-39127 ORA-4063 (on XDB.DBMS_XDBUTIL_INT & XDB.DBMS_XDBZ0) ORA-6508 RESOURCE_VIEW Query = ORA-4063 [ID 1526443.1]
ORA-20011 Approximate NDV failed ORA-04063 package body XDB.DBMS_CSX_INT has errors [ID 1356250.1]

Related to revoking execute privilege on certain packages from Public
Problems After Revoking Execute On DBMS_SQL, DBMS_JOB, DBMS_LOB, DBMS_RANDOM, and DBMS_OBFUSCATION_TOOLKIT From PUBLIC [ID 1165830.1]
Be Cautious When Revoking Privileges Granted to PUBLIC [ID 247093.1]
Invalid Objects After Revoking EXECUTE Privilege From PUBLIC [ID 797706.1]

Upgrading RHEL 6 OS in a 11gR2 RAC Environment

$
0
0
This post upgrade the RHEL 6 OS on severs which are running 11gR2 RAC. Current kernel is
$ uname -r
2.6.32-220.el6.x86_64
and the database patch level is
opatch lsinventory -local | grep Patch
Oracle Interim Patch Installer version 11.2.0.3.0
OPatch version : 11.2.0.3.0
Patch 14275605 : applied on Thu Nov 15 14:21:27 GMT 2012
Unique Patch ID: 15379762
Patch description: "Database Patch Set Update : 11.2.0.3.4 (14275605)"
Sub-patch 13923374; "Database Patch Set Update : 11.2.0.3.3 (13923374)"
Sub-patch 13696216; "Database Patch Set Update : 11.2.0.3.2 (13696216)"
Sub-patch 13343438; "Database Patch Set Update : 11.2.0.3.1 (13343438)"
Patch 14275572 : applied on Thu Nov 15 14:20:32 GMT 2012
Unique Patch ID: 15379762
Patch description: "Grid Infrastructure Patch Set Update : 11.2.0.3.4 (14275572)"
OPatch succeeded.
The database software is running standard edition.
The steps are similar to that of upgrading RHEL 5 OS running 11gR2 RAC with few minor differences. This RAC system does not use ASMLibs.
1. Current kernel version
$ uname -r
2.6.32-220.el6.x86_64
2. Stop all the cluster components
crsctl stop cluster -all
and stop disable start of crs after reboot
crsctl stop crs
crsctl disable crs
3. In RHEL 6 inittab is depreciated and the spawning process file is located in /etc/init with the name oracle-ohasd.conf
More on this is available on Troubleshoot Grid Infrastructure Startup Issues [ID 1050908.1]
cat oracle-ohasd.conf
# Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
#
# Oracle OHASD startup

start on runlevel [35]
stop on runlevel [!35]
respawn
exec /etc/init.d/init.ohasd run >/dev/null 2>&1 </dev/null
As root comment last two lines
#respawn
#exec /etc/init.d/init.ohasd run >/dev/null 2>&1 </dev/null
4. Upgrade the OS (only few screenshots shown)

5. New kernel version after upgrade
uname -r
2.6.32-279.el6.x86_64
6. Stop oracle-ohasd
initctl stop oracle-ohasd
oracle-ohasd stop/waiting
7. Un-comment the last two lines on /etc/init/oracle-ohasd that was commented earlier
start on runlevel [35]
stop on runlevel [!35]
respawn
exec /etc/init.d/init.ohasd run >/dev/null 2>&1 </dev/null
8. Enable crs on startup
crsctl enable crs
CRS-4622: Oracle High Availability Services autostart is enabled.
9. Relink the Oracle Home binaries as the oracle software owner
which relink
/opt/app/oracle/product/11.2.0/dbhome_1/bin/relink
$ cd $ORACLE_HOME/bin
$ ./relink all
writing relink log to: /opt/app/oracle/product/11.2.0/dbhome_1/install/relink.log
The relink will end with following on the log
test ! -f /opt/app/oracle/product/11.2.0/dbhome_1/bin/oracle ||\
mv -f /opt/app/oracle/product/11.2.0/dbhome_1/bin/oracle /opt/app/oracle/product/11.2.0/dbhome_1/bin/oracleO
mv /opt/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/oracle /opt/app/oracle/product/11.2.0/dbhome_1/bin/oracle
chmod 6751 /opt/app/oracle/product/11.2.0/dbhome_1/bin/oracle



9. Unlock the permission on the grid software as root
# cd $GI_HOME/crs/install

# perl rootcrs.pl -unlock
Using configuration parameter file: ./crsconfig_params
CRS-4544: Unable to connect to OHAS
CRS-4000: Command Stop failed, or completed with errors.
Successfully unlock /opt/app/11.2.0/grid
10. As the grid software owner (gird in this case) relink the grid software
[grid@rhel6m1 ~]$ export ORACLE_HOME=$GI_HOME
[grid@rhel6m1 ~]$ export PATH=$ORACLE_HOME/bin:$PATH
[grid@rhel6m1 ~]$ which relink
/opt/app/11.2.0/grid/bin/relink
[grid@rhel6m1 ~]$ $GI_HOME/bin/relink
writing relink log to: /opt/app/11.2.0/grid/install/relink.log
The relink ends with
test ! -f /opt/app/11.2.0/grid/bin/oracle ||\
mv -f /opt/app/11.2.0/grid/bin/oracle /opt/app/11.2.0/grid/bin/oracleO
mv /opt/app/11.2.0/grid/rdbms/lib/oracle /opt/app/11.2.0/grid/bin/oracle
chmod 6751 /opt/app/11.2.0/grid/bin/oracle
11. Run the post relink script. rootcrs.pl -patch takes a while to complete and ends with an error as shown below
# cd $GI_HOME/rdbms/install
# ./rootadd_rdbms.sh

# cd $GI_HOME/crs/install
# perl rootcrs.pl -patch
Using configuration parameter file: ./crsconfig_params
CRS-4124: Oracle High Availability Services startup failed.
CRS-4000: Command Start failed, or completed with errors.
Failed to write the checkpoint:'' with status:FAIL.Error code is 256
Oracle Grid Infrastructure stack start initiated but failed to complete at crsconfig_lib.pm line 11545.
After an SR it was confirmed that this error is ignorable and crs could be started with "init 3" or by rebooting the server. Reason that above error happen is that since "ohasd run" line was commented on oracle-ohasd file there's no "ohasd run" process active when the kernel is upgraded and server is rebooted. Without "ohasd run" active the crsctl start crs (issued during the rootcrs.pl -patch) will fail to start the clusterware stack. This has no effect on the actual relink. This is also mentioned in 1050908.1
For metalink notes related to Upgrading OS and relinking clusterware and oracle binaries after OS upgrade refer the related post given below.

Related Posts
Upgrading OS in 11gR2 RAC Environment (RHEL 5)
Upgrading ASMLib and OS in 11gR1 RAC Environment

ONS Client Connections

$
0
0
On 11gR2 the onsctl debug output shows the clients IP subscribe to ONS in the client connection section (unlike in 11gR1). The IP is listed in ipv6 format.
Client connections:

ID CONNECTION ADDRESS PORT FLAGS SENDQ REF SUB W
-------- --------------------------------------- ----- ------ ----- --- --- -
1 internal 0 01008a 00000 001 002
2 127.0.0.1 6100 01001a 00000 001 001
5 127.0.0.1 6100 01001a 00000 001 000
10b3 0000:0000:0000:0000:0000:ffff:c0a8:0042 6200 09002a 00000 001 000
request 127.0.0.1 6100 03201a 00000 001 000
Converting above connecting IP into IPv4 gives 192.168.0.66. If the connecting client IP is known to be of IPv4 then use last 8 values to find the IPv4 by grouping them into groups of two and converting from hexadecimal to decimal.
c0a8:0042  <-- Last 8 values
c0 | a8 | 00 | 42 <-- group into blocks of two
192 | 168 | 0 | 66 <-- converted from hexadecimal to decimal
This is useful in identifying FCF related issues to know if clients are indeed subscribed to ONS or not


Useful metalink notes
The ONS Daemon Explained In Oracle Clusterware/RAC Environment [ID 759895.1]

Moving 11gR2 RAC to New Set of ASM Diskgroups

$
0
0
This post is for a situation that require moving the RAC components from current set of ASM disk groups to new set of ASM disk group. Situation could arise in the form of moving to higher redundancy disk group than current ASM disk group redundancy or migrating to a new SAN. The steps required to move are actually a collection of previous posts and will be referenced throughout. The post uses setup created with11gR2 RAC installation on RHEL6.
The current setup has 3 ASM diskgroups CLUSTER_DG (Quorum disk group), DATA and FLASH. The new diskgroups are named NEWCLUSTERDG, NEWDATA and NEWFLASH. If the asm_diskstring is different for example if old asm_diskstring is /dev/emcpower* and new asm_diskstring is /dev/mapper/mpath* then asm_diskstring must be edited to include both (old and new) asm_diskstring until all relevant files are moved out of the old set of ASM diskgroup. Once completed asm_diskstring could be edited to include only the currently valid set of disks. If ASMLib is used then this step could be omitted as asm_diskstring would not change (ORCL:* for all). This step is not shown and it is assumed that ASM disk groups could be created without any issue.
The main steps include
1. Moving cluster related files that are in ASM to new ASM diskgroup
2. Moving database related files to new ASM diskgroup

1. Moving cluster related files that are in ASM to new ASM diskgroup
This could be further itemized as follows
1.1. Moving OCR to new ASM diskgroup
1.2. Moving Vote disks to new ASM diskgroup
1.3. Moving server side ASM SPfile to new ASM diskgroup
Same diskgroup will be used for all these files types (OCR,Vote and ASM SPfile) and this disk group is created as a quorum diskgroup.
create diskgroup newclusterdg quorum 
failgroup fail1 disk '/dev/sdg1'
failgroup fail2 disk '/dev/sdh1'
failgroup fail3 disk '/dev/sdi1'
attribute 'compatible.asm'='11.2';

SQL> select name,state from v$asm_diskgroup;

NAME STATE
------------------------------ -----------
CLUSTER_DG MOUNTED
DATA MOUNTED
FLASH MOUNTED
NEWCLUSTERDG MOUNTED <-- used for moving the cluster files
Once created the diskgroup is only mounted on the node it's created.
crsctl status resource ora.NEWCLUSTERDG.dg
NAME=ora.NEWCLUSTERDG.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE , OFFLINE
STATE=ONLINE on rhel6m1, OFFLINE
It must be mounted on other nodes as well before continuing with the cluster file moving. Run the following on each node to mount the new diskgroup
 alter diskgroup NEWCLUSTERDG mount;
or mount it accross the cluster with
# crsctl start resource ora.NEWCLUSTERDG.dg
CRS-2672: Attempting to start 'ora.NEWCLUSTERDG.dg' on 'rhel6m2'
CRS-2676: Start of 'ora.NEWCLUSTERDG.dg' on 'rhel6m2' succeeded

crsctl status resource ora.NEWCLUSTERDG.dg
NAME=ora.NEWCLUSTERDG.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE , ONLINE
STATE=ONLINE on rhel6m1, ONLINE on rhel6m2
or by instance using srvctl
srvctl start diskgroup  -g newclusterdg -n rhel6m2

srvctl status diskgroup -g newclusterdg -n "rhel6m1,rhel6m2" -a
Disk Group data is running on rhel6m1,rhel6m2
Disk Group data is enabled on rhel6m1,rhel6m2

1.1. Moving OCR to new ASM diskgroup
OCR could be moved to new ASM disk either using the add/delete method or replace option. However when there's only one OCR file (no OCR mirror) then replace option cannot be used. OCR add/delete must be run as root.
ocrcheck  (# current configuration)
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3328
Available space (kbytes) : 258792
ID : 1487892601
Device/File Name : +CLUSTER_DG
Device/File integrity check succeeded

# ocrconfig -replace +CLUSTER_DG -replacement +NEWCLUSTERDG
PROT-28: Cannot delete or replace the only configured Oracle Cluster Registry location
First the new ASM diskgroup must be added and this will appear as the OCRMirror. Afterwards OCR location in the old diskgroup is removed (this will make the ocrmirror to become the ocr).
# ocrconfig -add +NEWCLUSTERDG

# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3344
Available space (kbytes) : 258776
ID : 1487892601
Device/File Name : +CLUSTER_DG
Device/File integrity check succeeded
Device/File Name : +NEWCLUSTERDG
Device/File integrity check succeeded


# ocrconfig -delete +CLUSTER_DG

# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3344
Available space (kbytes) : 258776
ID : 1487892601
Device/File Name : +NEWCLUSTERDG
Device/File integrity check succeeded
This concludes the moving of OCR to new ASM diskgroup.
Related Post: Migrating OCR to ASM in 11gR2 Clusterware
Related metalink note : OCR / Vote disk Maintenance Operations: (ADD/REMOVE/REPLACE/MOVE) [ID 428681.1]

1.2. Moving Vote disks to new ASM diskgroup
The vote disk could be moved with the replace option using crsctl. Unlike previous versions (10.2, 11.1) in 11.2 the vote disk replace could be run as grid user. Current vote disk configuration
$ crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 2c90c4f4a0fb4faebfb264244a836b96 (/dev/sdb1) [CLUSTER_DG]
2. ONLINE 1d7890a346284fa4bf0e278b2f3b1d3d (/dev/sdc1) [CLUSTER_DG]
3. ONLINE 433f41571bf44fcebfe636a97d94777a (/dev/sdd1) [CLUSTER_DG]
Located 3 voting disk(s).
Run replace command
$ crsctl replace votedisk +NEWCLUSTERDG
Successful addition of voting disk 58e2e7ab4cdc4fc1bf98b745437a5082.
Successful addition of voting disk 1fb2f493ec644ffdbfaca24bbbf41864.
Successful addition of voting disk 74048ba14f1b4f8dbf677abb76f929c1.
Successful deletion of voting disk 2c90c4f4a0fb4faebfb264244a836b96.
Successful deletion of voting disk 1d7890a346284fa4bf0e278b2f3b1d3d.
Successful deletion of voting disk 433f41571bf44fcebfe636a97d94777a.
Successfully replaced voting disk group with +NEWCLUSTERDG.
CRS-4266: Voting file(s) successfully replaced
New vote disk configuration
$ crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 58e2e7ab4cdc4fc1bf98b745437a5082 (/dev/sdg1) [NEWCLUSTERDG]
2. ONLINE 1fb2f493ec644ffdbfaca24bbbf41864 (/dev/sdh1) [NEWCLUSTERDG]
3. ONLINE 74048ba14f1b4f8dbf677abb76f929c1 (/dev/sdi1) [NEWCLUSTERDG]
Located 3 voting disk(s).
That concludes the moving of vote disk to new ASM diskgroup
Related Post: Migrating Voting Disk to ASM in 11gR2 Clusterware
Related metalink note : OCR / Vote disk Maintenance Operations: (ADD/REMOVE/REPLACE/MOVE) [ID 428681.1]

1.3. Moving server side ASM SPfile to new ASM diskgroup
In 11gR2 RAC and Standalone (Restart) the ASM SPfile reside in the ASM disk group itself. Current location of the ASM Spfile could be obtained in number of ways. Show parameter command (running it on ASM instance)
SQL> show parameter spfile;

NAME TYPE VALUE
--------- ----------- ------------------------------------------------------------------
spfile string +CLUSTER_DG/rhel6m-cluster/asmparameterfile/registry.253.785350531
It's also visible in the ASM alert log
Machine:        x86_64
Using parameter settings in server-side spfile +CLUSTER_DG/rhel6m-cluster/asmparameterfile/registry.253.785350531
System parameters with non-default values
and with spget on ASMCMD
ASMCMD> spget
+CLUSTER_DG/rhel6m-cluster/asmparameterfile/registry.253.785350531
To move the ASM SPfile to new ASM diskgroup create ASM pfile from the current spfile
SQL> create pfile='/home/grid/asmpfile.ora' from spfile;
Create ASM SPfile in the new ASM diskgroup location using the earlier created pfile
SQL> create spfile='+newclusterdg' from pfile='/home/grid/asmpfile.ora';
New SPfile location will be logged on the ASM alert log
NOTE: updated gpnp profile ASM SPFILE to +NEWCLUSTERDG/rhel6m-cluster/asmparameterfile/registry.253.806083655
This commands update the gpnp profile and during the next restart ASM will use the new SPFile. This could be verified using the ASM alert log or asmcmd spget command. To explicitly set the SPFile location use ASMCMD's spset command (this step is not necessary)
ASMCMD> spset +NEWCLUSTERDG/rhel6m-cluster/asmparameterfile/registry.253.806083655
Using parameter settings in server-side spfile +NEWCLUSTERDG/rhel6m-cluster/asmparameterfile/registry.253.806083655
This concludes the moving of ASM SPfile to new ASM diskgroup
Related metalink note : How to move ASM spfile to a different disk group [ID 1082943.1]

The ASM diskgroup that stores cluster files could be dropped now. However since copies of various files (OCR, ASMSPfile) still reside in it trying to drop without content clause would throw an error
SQL> drop diskgroup cluster_dg;
drop diskgroup cluster_dg
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15053: diskgroup "CLUSTER_DG" contains existing files
It is also important that before dropping the diskgroup is dismounted from all other ASM instances in the cluster, if not an error will be thrown
SQL> drop diskgroup cluster_dg including contents;
drop diskgroup cluster_dg including contents
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15073: diskgroup CLUSTER_DG is mounted by another ASM instance

SQL> alter diskgroup cluster_dg dismount; <-- run on all ASM instances except one
At times trying to dismount could throw the following error
SQL> alter diskgroup newclusterdg dismount;
alter diskgroup newclusterdg dismount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15027: active use of diskgroup "CLUSTER_DG" precludes its dismount
This could be due to file reference still opened even though they are not used. In such cases restart of OHAS on the nodes where dismount fails could resolve this issue.
Once dismounted drop the ASM diskgroup.
SQL> drop diskgroup cluster_dg including contents;
Diskgroup dropped.


2. Moving database related files to new ASM diskgroup

This step could be further itemized as
2.1. Moving control files to new ASM diskgroup
2.2. Moving SPfile to new ASM diskgroup
2.3. Moving data files to new ASM diskgroup
2.4. Moving temp files to new ASM diskgroup
2.5. Moving online redo log files to new ASM diskgroup
2.6. Moving backup files to new ASM diskgroup
Create new disk groups used for data files and fast recovery area and mount them across all the ASM instances
SQL> create diskgroup newdata external redundancy disk '/dev/sdj1';
Diskgroup created.

SQL> create diskgroup newflash external redundancy disk '/dev/sdk1';
Diskgroup created.

SQL> alter diskgroup newdata mount;
Diskgroup altered.

SQL> alter diskgroup newflash mount;
Diskgroup altered.
Metalink note How To Move The Database To Different Diskgroup (Change Diskgroup Redundancy) [ID 438580.1] shows how to move a database from one diskgroup to another using backup database as copy. This is also a valid option to move the database from asm-to-asm. In this post steps are shown to move each individual file type related to the database from one asm disk to another.

2.1. Moving control files to new ASM diskgroup
Currently the system has two control files in two diskgroups
SQL> show parameter control

NAME TYPE VALUE
------------- ------ ------------------------------
control_files string +DATA/std11g2/controlfile/current.256.785694741,
+FLASH/std11g2/controlfile/current.256.785694743
Before cloning the control files create a pfile from the current SPFile. This pfile will also be used for moving the SPFile as well.
SQL> create pfile='/home/oracle/pfile.ora' from spfile;
File created.
Update the control file locations on the SPFile by specifying the new ASM diskgroups.
SQL> alter system set control_files='+NEWDATA','+NEWFLASH' scope=spfile sid='*';
System altered.
Stop the database and start one instance in nomount mode.
srvctl stop database -d std11g2
srvctl start instance -d std11g2 -i std11g22 -o nomount
Restore control files to new location using the current control file.
rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Wed Jan 30 16:56:16 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: STD11G2 (not mounted)

RMAN> restore controlfile from '+DATA/std11g2/controlfile/current.256.785694741';

Starting restore at 30-JAN-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=141 instance=std11g22 device type=DISK

channel ORA_DISK_1: copied control file copy
output file name=+NEWDATA/std11g2/controlfile/current.256.806086607
output file name=+NEWFLASH/std11g2/controlfile/current.256.806086609
Finished restore at 30-JAN-13
Mount and open the database and verify the new control file locations

SQL> alter database mount;
Database altered.

SQL> alter database open;
Database altered.


SQL> show parameter control

NAME TYPE VALUE
------------- ------ ------------------------------
control_files string +NEWDATA/std11g2/controlfile/current.256.806086607,
+NEWFLASH/std11g2/controlfile/current.256.806086609
This concludes the moving of control files to new ASM disk groups.
Related Post : Cloning/Duplicating controlfile between ASM diskgroups
Related metalink note : How to duplicate a controlfile when ASM is involved [ID 345180.1]
Useful metalink note : How To Move The Database To Different Diskgroup (Change Diskgroup Redundancy) [ID 438580.1]

2.2. Moving SPfile to new ASM diskgroup
If the earlier created pfile is used for creating the spfile in this section modify the control_files parameter value in the pfile to reflect the new locations, otherwise create a new pfile from the spfile which will have the new control files location. Create a spfile in the new asm disk using the pfile (again it's important that control file locations reflect the new values. Modify pfile before creating spfile)
SQL> create spfile='+newdata' FROM PFILE='/home/oracle/pfile.ora';
File created.
Replacing the SPFile involves creating a alias to new spfile and updating the database configuration. Loging to ASM using ASMCMD (as grid user) and create the spfile alias
ASMCMD> mkalias +NEWDATA/STD11G2/PARAMETERFILE/spfile.257.806088197 spfilestd11g2.ora
ASMCMD> ls -l
Type Redund Striped Time Sys Name
Y CONTROLFILE/
Y PARAMETERFILE/
N spfilestd11g2.ora => +NEWDATA/STD11G2/PARAMETERFILE/spfile.257.806088197

srvctl config database -d std11g2
Database unique name: std11g2
Database name: std11g2
Oracle home: /opt/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/std11g2/spfilestd11g2.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: std11g2
Database instances: std11g21,std11g22
Disk Groups: DATA,FLASH,NEWDATA,NEWFLASH
Mount point paths:
Services: myservice
Type: RAC
Database is administrator managed

$ srvctl modify database -d std11g2 -p +NEWDATA/std11g2/spfilestd11g2.ora

$ srvctl config database -d std11g2
Database unique name: std11g2
Database name: std11g2
Oracle home: /opt/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile: +NEWDATA/std11g2/spfilestd11g2.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: std11g2
Database instances: std11g21,std11g22
Disk Groups: DATA,FLASH,NEWDATA,NEWFLASH
Mount point paths:
Services: myservice
Type: RAC
Database is administrator managed
Modify the pfiles that give reference to the SPFile in $ORACLE_HOME/dbs
cat /opt/app/oracle/product/11.2.0/dbhome_1/dbs/initstd11g22.ora

SPFILE='+NEWDATA/std11g2/spfilestd11g2.ora'
Restart the database and SPFile parameter will reflect the new SPFile location.
SQL> show parameter spfile

NAME TYPE VALUE
-------- ----------- --------------------------------
spfile string +DATA/std11g2/spfilestd11g2.ora
After DB restart
SQL> show parameter spfile

NAME TYPE VALUE
-------- ----------- --------------------------------
spfile string +NEWDATA/std11g2/spfilestd11g2.ora
This concludes the moving of SPFile to new ASM diskgroup.
Related Post : Replacing spfile in ASM
Related Post : Oracle 11gR2 RAC SPfile Issue

2.3. Moving data files to new ASM diskgroup
Moving data files from one ASM disk group to another involves creating a backup of the data file as a copy in the new asm diskgroup and switching to the data file copy. Following SQL could be used to generate the backup as copy rman commands for all the data files
SQL> select 'backup as copy datafile '||file#||' format ''+NEWDATA'';' from v$datafile;
Run a RMAN session using the commands generated above (output is truncated)
RMAN> run{
2> backup as copy datafile 1 format '+NEWDATA';
3> backup as copy datafile 2 format '+NEWDATA';
4> backup as copy datafile 3 format '+NEWDATA';
5> backup as copy datafile 4 format '+NEWDATA';
6> backup as copy datafile 5 format '+NEWDATA';
7> backup as copy datafile 6 format '+NEWDATA';
8> backup as copy datafile 7 format '+NEWDATA';
9> }

Starting backup at 31-JAN-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=17 instance=std11g21 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=+DATA/std11g2/datafile/system.259.785694749
output file name=+NEWDATA/std11g2/datafile/system.258.806151043 tag=TAG20130131T105042 RECID=2 STAMP=806151061
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:26
Finished backup at 31-JAN-13
...
...
Shutdown all database instances and start one instance in mount mode
srvctl stop database -d std11g2
srvctl start instance -d std11g2 -i std11g21 -o mount
Use this instance to run the switch to copy command. Following SQL could be used to generate the switch command for all the data files
SQL> select 'switch datafile '||file#||' to copy;' from v$datafile;
Run the switch command from a RMAN session (output is truncated)
switch datafile 1 to copy;
switch datafile 2 to copy;
switch datafile 3 to copy;
switch datafile 4 to copy;
switch datafile 5 to copy;
switch datafile 6 to copy;
switch datafile 7 to copy;

RMAN>datafile 1 switched to datafile copy "+NEWDATA/std11g2/datafile/system.258.806151043"

RMAN>datafile 2 switched to datafile copy "+NEWDATA/std11g2/datafile/sysaux.259.806151073"
...
...
Recover each datafile. Following SQL could be used to generate the recover commands
select 'recover datafile '||file#||';' from v$datafile;
Run a RMAN session to recover the datafiles (output is truncated)
recover datafile 1;
recover datafile 2;
recover datafile 3;
recover datafile 4;
recover datafile 5;
recover datafile 6;
recover datafile 7;

RMAN>
Starting recover at 31-JAN-13
using channel ORA_DISK_1

starting media recovery
media recovery complete, elapsed time: 00:00:01

Finished recover at 31-JAN-13
...
...
Once the recovery is completed open the database and bring up the other instances
SQL> alter database open;
Take a full backup of the database and delete the data file copies
RMAN> delete datafilecopy all;

using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 instance=std11g21 device type=DISK
List of Datafile Copies
=======================

Key File S Completion Time Ckp SCN Ckp Time
------- ---- - --------------- ---------- ---------------
9 1 A 31-JAN-13 36408130 31-JAN-13
Name: +DATA/std11g2/datafile/system.259.785694749

10 2 A 31-JAN-13 36408130 31-JAN-13
Name: +DATA/std11g2/datafile/sysaux.260.785694765

11 3 A 31-JAN-13 36408130 31-JAN-13
Name: +DATA/std11g2/datafile/undotbs1.261.785694779

12 4 A 31-JAN-13 36408130 31-JAN-13
Name: +DATA/std11g2/datafile/undotbs2.263.785694797

13 5 A 31-JAN-13 36408130 31-JAN-13
Name: +DATA/std11g2/datafile/users.264.785694801

14 6 A 31-JAN-13 36408130 31-JAN-13
Name: +DATA/std11g2/datafile/example.268.785857285

15 7 A 31-JAN-13 36408130 31-JAN-13
Name: +DATA/std11g2/datafile/test.269.785857289


Do you really want to delete the above objects (enter YES or NO)? yes
deleted datafile copy
datafile copy file name=+DATA/std11g2/datafile/system.259.785694749 RECID=9 STAMP=806151523
deleted datafile copy
datafile copy file name=+DATA/std11g2/datafile/sysaux.260.785694765 RECID=10 STAMP=806151524
deleted datafile copy
...
...
This concludes the moving of data files to new ASM diskgroup.
Related Post : Moving Datafiles Between ASM Disk Groups
Related Post : Moving Datafiles to new location
Useful metalink note : How to move a datafile from ASM to the file system [ID 390416.1]

2.4. Moving temp files to new ASM diskgroup
To move the temp file, add a new temp file to the temporary tablespace by giving the new asm diskgroup as the location. Once the new temp file is in place remove the existing temp file.
SQL> alter tablespace temp add tempfile '+newdata(tempfile)';
Tablespace altered.

SQL> alter tablespace temp drop tempfile '+DATA/std11g2/tempfile/temp.262.785694783';
Tablespace altered.
This concludes the moving of temp file to new asm diskgroup.

2.5. Moving online redo log files to new ASM diskgroup
Moving online diskgroups could be done in two ways. One is to drop the current online redo log groups and add new online redo log groups in the new disks groups. Second option is to add new log files with new ASM diskgroup locations into the existing diskgroups and then removing log files that reside in the current (about to be removed) location. The second option is shown below. Current log files
SQL> select group#,member from v$logfile;

GROUP# MEMBER
---------- --------------------------------------------------
1 +DATA/std11g2/onlinelog/group_1.257.785694743
1 +FLASH/std11g2/onlinelog/group_1.257.785694745
2 +DATA/std11g2/onlinelog/group_2.258.785694747
2 +FLASH/std11g2/onlinelog/group_2.258.785694747
3 +DATA/std11g2/onlinelog/group_3.265.785696921
3 +FLASH/std11g2/onlinelog/group_3.259.785696923
4 +DATA/std11g2/onlinelog/group_4.266.785696925
4 +FLASH/std11g2/onlinelog/group_4.260.785696927
Add log file members using the new ASM diskgroups
SQL> alter database add logfile member '+newdata','+newflash' to group 1;

SQL> select group#,member from v$logfile order by 1;

GROUP# MEMBER
---------- --------------------------------------------------
1 +DATA/std11g2/onlinelog/group_1.257.785694743
1 +FLASH/std11g2/onlinelog/group_1.257.785694745
1 +NEWDATA/std11g2/onlinelog/group_1.266.806152613
1 +NEWFLASH/std11g2/onlinelog/group_1.257.806152615

2 +FLASH/std11g2/onlinelog/group_2.258.785694747
2 +DATA/std11g2/onlinelog/group_2.258.785694747
3 +DATA/std11g2/onlinelog/group_3.265.785696921
3 +FLASH/std11g2/onlinelog/group_3.259.785696923
4 +FLASH/std11g2/onlinelog/group_4.260.785696927
4 +DATA/std11g2/onlinelog/group_4.266.785696925
Group 1 now has 4 log files. Add log files to all other groups as well. Switch through all the groups so that newly created log files members also get written to by executing "archive current logs"
SQL> alter system archive log current;
This has to be done until all the log files groups have done a switch and an archive. If not trying to remove the second log file member will result in an error.
SQL> alter database drop logfile member '+DATA/std11g2/onlinelog/group_1.257.785694743';
Database altered. <--- first member removed without an issue

SQL> alter database drop logfile member '+FLASH/std11g2/onlinelog/group_1.257.785694745';
alter database drop logfile member '+FLASH/std11g2/onlinelog/group_1.257.785694745' <--- trying remove second member gives an error.
*
ERROR at line 1:
ORA-00362: member is required to form a valid logfile in group 1
ORA-01517: log member: '+FLASH/std11g2/onlinelog/group_1.257.785694745'
This is because newly added log files are missing the redo records of the existing log files. If both of them were dropped prior to archive recovery will not find required redo records therefore a full log switch must be performed for all the log file groups before issuing the drop redo command. Once removed only redo log files with the new location will remain
SQL> select group#,member from v$logfile order by 1;

GROUP# MEMBER
---------- --------------------------------------------------
1 +NEWFLASH/std11g2/onlinelog/group_1.257.806152615
1 +NEWDATA/std11g2/onlinelog/group_1.266.806152613
2 +NEWFLASH/std11g2/onlinelog/group_2.258.806152855
2 +NEWDATA/std11g2/onlinelog/group_2.267.806152853
3 +NEWDATA/std11g2/onlinelog/group_3.268.806152859
3 +NEWFLASH/std11g2/onlinelog/group_3.259.806152859
4 +NEWDATA/std11g2/onlinelog/group_4.269.806152863
4 +NEWFLASH/std11g2/onlinelog/group_4.260.806152863
This concludes the moving of online redo log files to new location.
Useful metalink notes : How To Move The Database To Different Diskgroup (Change Diskgroup Redundancy) [ID 438580.1]
Useful metalink notes : How to Change The Location Of Redo Log Files [ID 395062.1]

Related to data files, online redo files there are several database parameters that must be changed. Change db_recovery_file_dest (used as an archive log location among other things)and db_create_file_dest (default datafile location)
NAME      TYPE     VALUE
----------------------- -------- -------
db_recovery_file_dest string +FLASH
db_create_file_dest string +DATA

SQL> alter system set db_recovery_file_dest='+NEWFLASH' scope=both sid='*';
System altered.

SQL> alter system set db_create_file_dest='+newdata' scope=both sid='*';
System altered.

NAME TYPE VALUE
----------------------- -------- -------
db_recovery_file_dest string +NEWFLASH
db_create_file_dest string +NEWDATA
Change the db_create_online_log_dest* location as well
SQL> alter system set db_create_online_log_dest_1='+newdata' SCOPE=BOTH SID='*';
System altered.

SQL> alter system set db_create_online_log_dest_2='+newflash' SCOPE=BOTH SID='*';
System altered.
Archive the current log files and verify they archive to new location (if only recovery file dest is used for archive logs)
SQL> alter system archive log current;
SQL> select max(sequence#),thread# from v$archived_log group by thread#;

MAX(SEQUENCE#) THREAD#
-------------- ----------
200 1
151 2

SQL> select name from v$archived_log where (sequence#=200 and thread#=1) or (sequence#=151 and thread#=2);

NAME
----------------------------------------------------------------------
+NEWFLASH/std11g2/archivelog/2013_01_31/thread_1_seq_200.261.806153191
+NEWFLASH/std11g2/archivelog/2013_01_31/thread_2_seq_151.262.806153193
Create a tablespace without specifying the datafile clause and see if db create file dest uses new location
SQL> create tablespace abc;
Tablespace created.

SQL> select tablespace_name,file_name from dba_data_files where tablespace_name='ABC';

TABLESPACE_NAME FILE_NAME
------------------------------ --------------------------------------------------
ABC +NEWDATA/std11g2/datafile/abc.270.806153661
Query following views v$controlfile,v$datafile,v$tempfile,v$logfile (also v$block_change_tracking if block tracking is enabled) to verify that no file exists in the ASM diskgroup about to be dropped. Querying ASM views show what type of files remain in the ASM diskgroups
SQL> select ag.name,af.type from v$asm_diskgroup ag,v$asm_file af where ag.group_number=af.group_number and af.group_number=2;

NAME TYPE
----- ---------------
DATA CONTROLFILE
DATA PARAMETERFILE
Since control file and SPFile both moved out this ASM diskgroup could be dropped. Unmount the diskgroup from all nodes except one and drop it from there.
SQL> alter diskgroup data dismount;
Diskgroup altered.

SQL> drop diskgroup data including contents;
Diskgroup dropped.

2.6. Moving backup files to new ASM diskgroup
In this setup the only backup related parameter was the db_recovery_file_dest parameter which was modified in the 2.5 to reflect the new ASM diskgroup name. Therefore subsequent backups will use this new ASM diskgroup. If the existing backups could be discarded then there's no more steps required and the old ASM diskgroup could be dropped. However if the existing backups need to be moved to the new ASM diskgroup location then further steps are needed.
To clear any archive logs that still remains in the ASM diskgroup that will be dropped, backup and delete the archive logs with
backup archivelog all delete input;
Find out the file types that are in the backup related disk group (in this case flash).
SQL> select distinct af.type,ag.name from v$asm_diskgroup ag,v$asm_file af where ag.group_number=af.group_number and af.group_number=3;

NAME TYPE
-------------------- --------------------
FLASH CONTROLFILE
FLASH BACKUPSET
FLASH AUTOBACKUP
Using ASMCMD create a new directory structure in the new ASM diskgroup similar to existing backup files directory structure.
ASMCMD> cd +newflash/std11g2/
ASMCMD> mkdir backupset
ASMCMD> cd backupset
ASMCMD> mkdir 2013_01_31
Remember to copy the files without file number of incarnation. (Explained in ASMCMD cp command fails with ORA-15046 [ID 452158.1])
ASMCMD> cp +flash/std11g2/backupset/2013_01_31/annnf0_TAG20130131T114145_0.266.806154115 +newflash/std11g2/backupset/2013_01_31/annnf0_TAG20130131T114145
copying +flash/std11g2/backupset/2013_01_31/annnf0_TAG20130131T114145_0.266.806154115 -> +newflash/std11g2/backupset/2013_01_31/annnf0_TAG20130131T114145
ASMCMD> ls +newflash/std11g2/backupset/2013_01_31
annnf0_TAG20130131T114145
...
ASMCMD> cp +flash/std11g2/autobackup/2013_01_31/s_806158183.279.806158185 +newflash/std11g2/autobackup/2013_01_31/s_806158183
Once all the backup files are copied over catalog the recovery area
RMAN> catalog recovery area;

using target database control file instead of recovery catalog
searching for all files in the recovery area

List of Files Unknown to the Database
=====================================
File Name: +newflash/STD11G2/backupset/2013_01_31/annnf0_TAG20130131T114145
File Name: +newflash/STD11G2/AUTOBACKUP/2013_01_31/s_806158183

Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: +newflash/STD11G2/backupset/2013_01_31/annnf0_TAG20130131T114145
File Name: +newflash/STD11G2/AUTOBACKUP/2013_01_31/s_806158183

List of files in Recovery Area not managed by the database
==========================================================
File Name: +NEWFLASH/std11g2/controlfile/current.256.806086609
RMAN-07527: Reason: File was not created using DB_RECOVERY_FILE_DEST initialization parameter
File Name: +NEWFLASH/std11g2/onlinelog/group_1.257.806152615
RMAN-07527: Reason: File was not created using DB_RECOVERY_FILE_DEST initialization parameter
File Name: +NEWFLASH/std11g2/onlinelog/group_2.258.806152855
RMAN-07527: Reason: File was not created using DB_RECOVERY_FILE_DEST initialization parameter
File Name: +NEWFLASH/std11g2/onlinelog/group_3.259.806152859
RMAN-07527: Reason: File was not created using DB_RECOVERY_FILE_DEST initialization parameter
File Name: +NEWFLASH/std11g2/onlinelog/group_4.260.806152863
RMAN-07527: Reason: File was not created using DB_RECOVERY_FILE_DEST initialization parameter

number of files not managed by recovery area is 5, totaling 217.84MB
Message "RMAN-07527: Reason: File was not created using DB_RECOVERY_FILE_DEST initialization parameter" has been explained in Ora-19816 raised in alert log after creating new log group in FRA [ID 1100416.1]
Delete backup files in the ASM diskgroup to be removed with
RMAN> delete backup COMPLETED BEFORE 'sysdate -2';
or using backup file specific tag.
RMAN> delete backup tag 'TAG20130131T114145';
It is also possible to drop the backup related files along with the disk group if removing backups files one at a time is not convenient. Verify the types of files in the ASM diskgroup all have been migrated to new ASM diskgroups
SQL> select distinct af.type,ag.name from v$asm_diskgroup ag,v$asm_file af where ag.group_number=af.group_number and af.group_number=3;

TYPE NAME
--------------- ------------------------------
AUTOBACKUP FLASH
BACKUPSET FLASH
CONTROLFILE FLASH
In this case controflile was migrated and backup files were copied over and remaining files will be dropped along with the disk group. Dismount the disk group being dropped from all ASM instances except one.
SQL> alter diskgroup flash dismount;
Diskgroup altered.
Drop the ASM diskgroup from the ASM instance where it is still mounted
SQL> drop diskgroup flash including contents;
Diskgroup dropped.
With this step the entire RAC is now running on the new set of ASM diskgroups
SQL> select name from v$asm_diskgroup;

NAME
-------------
NEWCLUSTERDG
NEWDATA
NEWFLASH

Changing Public IP, VIP and SCAN IP in 11gR2 RAC

$
0
0
The post list the steps for changing the public IP, VIP and SCAN IP. It must be mentioned that only the IPs are changed in this case. The subnet mask, the public and VIP interface all remain the same. Also private interconnect is not part of the change. Steps were tested on the 11gR2 RAC on RHEL 6
The IP change is as follows. The SCAN IP is set up in /etc/hosts (not supported by Oracle).
NameOld IPNew IP
rhel6m1192.168.0.85192.168.0.93
rhel6m2192.168.0.86192.168.0.94
rhel6m-scan192.168.0.91192.168.0.92
The steps could be done parallel (on all nodes) or in a rolling fashion on each node. Steps executed on one node is shown here and changes were done parallel on all nodes. Since the information modified is stored in OCR it is better to take a manual backup of the OCR before proceeding.
1. First step is to change the VIP configuration. Current VIP configuration is
srvctl config nodeapps
Network exists: 1/192.168.0.0/255.255.255.0/eth0, type static
VIP exists: /rhel6m1-vip/192.168.0.89/192.168.0.0/255.255.255.0/eth0, hosting node rhel6m1
VIP exists: /rhel6m2-vip/192.168.0.90/192.168.0.0/255.255.255.0/eth0, hosting node rhel6m2
2. Stop the database instance and the VIP resource
[oracle@rhel6m1 ~]$ srvctl stop instance -d std11g2 -i std11g21
[grid@rhel6m1 ~]$ srvctl stop vip -n `hostname -s` -f
3. Verify VIP resource is down by using ifconfig on the OS and using crsctl
crsctl stat res -t 

ora.rhel6m1.vip
1 OFFLINE OFFLINE
ora.rhel6m2.vip
1 OFFLINE OFFLINE
4. Add the new IP information to /etc/hosts (and DNS) and proceed to modifying the VIP. The modify command must be run as root user
[root@rhel6m1 grid]# srvctl modify nodeapps -n rhel6m1 -A 192.168.0.97/255.255.255.0/eth0
Verify that changes are taken effect
[grid@rhel6m2 ~]$ srvctl config nodeapps -a
Network exists: 1/192.168.0.0/255.255.255.0/eth0, type static
VIP exists: /rhel6m1-vip/192.168.0.97/192.168.0.0/255.255.255.0/eth0, hosting node rhel6m1
VIP exists: /rhel6m2-vip/192.168.0.98/192.168.0.0/255.255.255.0/eth0, hosting node rhel6m2
If the VIP is now on a different network then do not start VIP until public IP and SCAN IP is also changed into the same network.




5. Next is to update the SCAN IP information. Current SCAN IP configuration
srvctl config scan
SCAN name: rhel6m-scan, Network: 1/192.168.0.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /rhel6m-scan/192.168.0.91
6. Stop the SCAN IP and the scan lister and verify it is stopped.
[root@rhel6m1 grid]# srvctl stop scan_listener

[root@rhel6m1 grid]# srvctl stop scan

[root@rhel6m1 grid]# srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is not running

[root@rhel6m1 grid]# srvctl status scan_listener
SCAN Listener MYLISTENER_SCAN1 is enabled
SCAN listener MYLISTENER_SCAN1 is not running
7. Modify the SCAN IP by executing the modify command as root user with the same SCAN name. (It is assumed that if DNS is used, the SCAN name now resolve to new IPs) This will pick up the new IP and update cluster records with the new SCAN IP.
[root@rhel6m1 grid]# srvctl modify scan -n rhel6m-scan
8. Verify the changes have taken effect
[root@rhel6m1 grid]# srvctl config scan
SCAN name: rhel6m-scan, Network: 1/192.168.0.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /rhel6m-scan/192.168.0.92
If the SCAN IP is now on a different network than the public IP then don't start the SCAN IP until the pubilc IP is also changed.

9. Updating public IP requires no cluster related work. Shutdown the cluster stack
[root@rhel6m1 grid]# crsctl stop crs
10. Change IP address on OS (eg. editing ifcfg-eth*) files and restart the network for the changes to take effect. Once the IP changes are made it maybe worthwhile to do ssh between nodes using the new IP so it is added to known host list and no prompts are shown during the ssh between the nodes. As the final step restart the cluster stack with
# crsctl start crs
Useful metalink notes
How to update the IP address of the SCAN VIP resources (ora.scan.vip) [ID 952903.1]
Modifying the VIP or VIP Hostname of a 10g or 11g Oracle Clusterware Node [ID 276434.1]
How to Modify Public Network Information including VIP in Oracle Clusterware [ID 276434.1]

Related Posts
Changing Listener and SCAN Listener Port in 11gR2 RAC
Changing Listener and SCAN Listener Name in 11gR2 RAC

ORA-31693: Table data object failed to load/unload and ORA-01031: insufficient privileges when using expdp

$
0
0
ORA-31693 and ORA-01031 could be seen when exporting the full schema with flashback_time clause.
ORA-31693: Table data object "SCHEMA"."Table_name" failed to load/unload and is being skipped due to error:
ORA-01031: insufficient privileges
Database version is 11.1.0.7. The error only appears intermittently and only for some tables. Metalink note 13715680.8 says the issue is also confirmed on 11.2.0.2 and 11.2.0.3
This is caused by user doing the export not having the flash back privileges. Granting flashback any table privilege to the user doing the export resolves the issue (confirmed on 11.1.0.7).




Useful metalink notes
Getting ORA-39127 ORA-1031 Error With DataPump Export (EXPDP) [ID 414996.1]
Bug 13715680 - Import fails with ORA-1031 for some TIMESTAMP data [ID 13715680.8]
Ora-01031: Insufficient Privileges, When Using The Flashback_time Option with EXPDP/IMPDP Network_link [ID 436106.1]

Related Post
Using flashback time with expdp

April 2013 PSU (11.2.0.3) Manual Steps for Apply/Rollback Patch

$
0
0
April PSU for 11.2 also follows the same pattern as the January PSU when it comes to manual steps for applying the patch. The document ID listed for manual steps (1494646.1) is same one listed for January PSU and it is not updated with the information for the April PSU. This leaves the question of identifying which is the "GI_Components_number" and which is the "DB_PSU_number". There's no information in the GI PSU read me file to help with this fact. However there are indirect ways of identifying the GI component number and the DB PSU number.
1. When the April GI PSU (16083653 - 11.2.0.6) is extracted it will have two patch directories (16056266 and 16315641). One will have the same ID as the (unbundled) April DB PSU (16056266 - 11.2.0.6). Once this is identified then the other one is the GI component number (in this case it is 16315641). For this approach before manually applying the GI PSU one must also refer the unbundled DB PSU to get the DB PSU number (even though this is not needed in GI environment as it's bundled with the GI PSU patch).



2. Another method is to useopatch query -get_base_bug to identify the GI PSU component. This command only works with the GI component part of the patch and will return an error with the DB portion of the patch. For example running against the DB portion of the patch
$ORACLE_HOME/OPatch/opatch query -get_base_bug /usr/local/patches/16056266/
Oracle Interim Patch Installer version 11.2.0.3.4
...
Failed to load the patch object. Possible causes are:
The specified path is not an interim Patch shiphome
Meta-data files are missing from the patch area
Patch location = /usr/local/patches/16056266/
Details = Input metadata files are missing.

Patch Location "/usr/local/patches/16056266/" doesn't point to a valid patch area.

OPatch failed with error code 75
However running against the GI component part of the patch will give the GI component number.
 $ORACLE_HOME/OPatch/opatch query -get_base_bug /usr/local/patches/16315641
Oracle Interim Patch Installer version 11.2.0.3.4
...
--------------------------------------------------------------------------------

List of bugs to be fixed:
16315641: GRID INFRASTRUCTURE PATCH SET UPDATE 11.2.0.3.6 (GI COMPONENTS)
15876003: GRID INFRASTRUCTURE PATCH SET UPDATE 11.2.0.3.5 (GI COMPONENTS)
14275572: GRID INFRASTRUCTURE PATCH SET UPDATE 11.2.0.3.4 (INCLUDES DB PSU 11.2.0.3.4)
13919095: GRID INFRASTRUCTURE PATCH SET UPDATE 11.2.0.3.3 (INCLUDES DB PSU 11.2.0.3.3)
13696251: GRID INFRASTRUCTURE PATCH SET UPDATE 11.2.0.3.2 (INCLUDES DB PSU 11.2.0.3.2)
13348650: GRID INFRASTRUCTURE PATCH SET UPDATE 11.2.0.3.1 (INCLUDES DB PSU 11.2.0.3.1)
12659561: INSTANCE DOES NOT REGISTER SERVICES WHEN SCAN FAILOVERED
14305980: IMPROVE CRSD RESOURCE AUTO START PROCESSING
14277586: INCORRECT SHUTDOWN REASON CODE IN FAN EVENTS - BREAKING CLIENTS
...
...
Once the GI component is known the remaining directory's number is the DB PSU number.

Related Post
January 2013 PSU (11.2.0.3) Manual Steps for Apply/Rollback Patch vs OPatch Auto

RMAN-06025: no backup of archived log for thread X with sequence Y and starting SCN of Z found to restore

$
0
0
"Restore validate" command could be used to determine if the backups are intact and could be used for a restore operation without any issue. The command could be used to validate database restore as well as archive log restore.
During archivelog restore it is possible to encounter errors such as below
RMAN> restore archivelog all validate;

Starting restore at 25-APR-13
using channel ORA_DISK_1

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/25/2013 16:18:21
RMAN-06026: some targets not found - aborting restore
RMAN-06025: no backup of archived log for thread 1 with sequence 1714 and starting SCN of 43439995 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 1713 and starting SCN of 43408508 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 1712 and starting SCN of 43389822 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 1711 and starting SCN of 43364551 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 1710 and starting SCN of 43333559 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 1709 and starting SCN of 43240943 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 1708 and starting SCN of 43203417 found to restore
The reason for this error is that "archive all" try to validate restore of all archivelogs and doesn't consider the retention policy.



Solution for this is to restore archivelog within the retention period. In this case retention period was
RMAN> show all;
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 2 DAYS;
Use the retention period in the validate command as
RMAN>  restore archivelog from time='sysdate - 2' validate;

Starting restore at 25-APR-13
using channel ORA_DISK_1

channel ORA_DISK_1: scanning archived log /data/flash_recovery/ENT11G2/archivelog/2013_04_24/o1_mf_1_1_8qjkzmll_.arc
channel ORA_DISK_1: scanning archived log /data/flash_recovery/ENT11G2/archivelog/2013_04_25/o1_mf_1_2_8qkj6mv6_.arc
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece /data/flash_recovery/ENT11G2/backupset/2013_04_24/o1_mf_annnn_TAG20130424T161933_8qhy05yr_.bkp
channel ORA_DISK_1: piece handle=/data/flash_recovery/ENT11G2/backupset/2013_04_24/o1_mf_annnn_TAG20130424T161933_8qhy05yr_.bkp tag=TAG20130424T161933
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece /data/flash_recovery/ENT11G2/backupset/2013_04_24/o1_mf_annnn_TAG20130424T162300_8qhy6njm_.bkp
channel ORA_DISK_1: piece handle=/data/flash_recovery/ENT11G2/backupset/2013_04_24/o1_mf_annnn_TAG20130424T162300_8qhy6njm_.bkp tag=TAG20130424T162300
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
Finished restore at 25-APR-13

RMAN> restore archivelog from time='sysdate - 4' validate;

Starting restore at 25-APR-13
using channel ORA_DISK_1

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/25/2013 16:23:51
RMAN-06026: some targets not found - aborting restore
RMAN-06025: no backup of archived log for thread 1 with sequence 1714 and starting SCN of 43439995 found to restore

Useful metalink notes
OERR: RMAN-6025 { Message text depends on version } [ID 48184.1]
No Backup Of Log Thread 1 Seq 4079 Scn 6508223992 Found To Restore Rman-6025 [ID 308289.1]
RMAN RESTORE ARCHIVELOG ALL VALIDATE fails with RMAN-06025: no backup of log [ID 1391263.1]

Script For Listing 11gR2 Cluster Resource Status in CRS_STAT Output Format

$
0
0
crs_stat -t is depreciated in 11gR2 and replaced with crsctl stat res -t. Following script could be used to generate resource status output in a format that is similar to crs_stat -t in 11gR1.
#!/bin/sh
# Sample 11gR2 CRS resource status query script
# gives output similar to crs_stat -t in 11gR1
# Asanga Pradeep

awk \
'BEGIN {printf "%-35s %-25s %-18s %-18s\n", "Resource Name", "Type", "Target","State";
printf "%-35s %-25s %-18s %-18s\n", "-----------", "------", "-------","--------";}'
crsctl stat res | egrep -w "NAME|TYPE|TARGET|STATE" | sed -e "s/ / /g" | awk \
'BEGIN { FS="="; state = 0; }
$1~/NAME/ {appname = $2; state=1};
state == 0 {next;}
$1~/TYPE/ && state == 1 {apptype = $2; state=2;}
$1~/TARGET/ && state == 2 {apptarget = $2; state=3;}
$1~/STATE/ && state == 3 {appstate = $2; state=4;}
state == 4 {
split(apptarget,targetarray,", ");
x=length(targetarray);
split(appstate,statearray,", ");
for(ix=1;ix<=x;ix++)
printf "%-35s %-25s %-18s %-18s\n", appname, apptype,targetarray[ix], statearray[ix]; state=0;}'




Output
Resource Name                       Type                      Target             State
----------- ------ ------- --------
ora.CLUSTERDG.dg ora.diskgroup.type ONLINE ONLINE on rac4
ora.CLUSTERDG.dg ora.diskgroup.type ONLINE ONLINE on rac5
ora.DATA.dg ora.diskgroup.type ONLINE ONLINE on rac4
ora.DATA.dg ora.diskgroup.type ONLINE ONLINE on rac5
ora.FLASH.dg ora.diskgroup.type ONLINE ONLINE on rac4
ora.FLASH.dg ora.diskgroup.type ONLINE ONLINE on rac5
ora.LISTENER.lsnr ora.listener.type ONLINE ONLINE on rac4
ora.LISTENER.lsnr ora.listener.type ONLINE ONLINE on rac5
ora.LISTENER_SCAN1.lsnr ora.scan_listener.type ONLINE ONLINE on rac5
ora.asm ora.asm.type ONLINE ONLINE on rac4
ora.asm ora.asm.type ONLINE ONLINE on rac5
ora.cvu ora.cvu.type OFFLINE OFFLINE
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora.net1.network ora.network.type ONLINE ONLINE on rac4
ora.net1.network ora.network.type ONLINE ONLINE on rac5
ora.oc4j ora.oc4j.type OFFLINE OFFLINE
ora.ons ora.ons.type ONLINE ONLINE on rac4
ora.ons ora.ons.type ONLINE ONLINE on rac5
ora.rac11g2.db ora.database.type ONLINE ONLINE on rac4
ora.rac11g2.db ora.database.type ONLINE ONLINE on rac5
ora.rac11g2.test.svc ora.service.type ONLINE ONLINE on rac4
ora.rac11g2.test.svc ora.service.type ONLINE ONLINE on rac5
ora.rac4.vip ora.cluster_vip_net1.type ONLINE ONLINE on rac4
ora.rac5.vip ora.cluster_vip_net1.type ONLINE ONLINE on rac5
ora.registry.acfs ora.registry.acfs.type ONLINE ONLINE on rac4
ora.registry.acfs ora.registry.acfs.type ONLINE ONLINE on rac5
ora.scan1.vip ora.scan_vip.type ONLINE ONLINE on rac5

Related Post
Script to get full name of the resources from crs_stat

Unsupported Bind Variable Syntax in PreparedStatments and 10.2/11.1/11.2 JDBC Drivers

$
0
0
Oracle supports two kind of bind variable placeholder syntax in Java PreparedStatments. A bind variable placeholder could be denoted with a colon and a number ":1" or with a question mark "?". However there are situation where developers may use a syntax such as question mark followed by a number "?1". Though this syntax is not supported in Oracle, when using JDBC drivers 10.2 and 11.1 the Java code would execute without an error and returns results as expected. But with 11.2 JDBC driver this will give the error ORA-00933: SQL command not properly ended and java code would not execute as before. So as part of database upgrade if JDBC driver is also upgraded and if java code has the syntax similar to "?1" etc then code that previously worked would not work anymore.
The problem here lies in using the unsupported bind variable placeholders. According to Oracle the fact that it works with previous version of JDBC driver is a merer accident and not the expected behavior. If it's not possible to modify the code the easiest option to remedy to the situation is to downgrade the JDBC driver to 11.1. As the issue comes as a result of the JDBC driver not because of the database
Java code given at the end of the post could be used to test the unsupported syntax against various databases and JDBC drivers. Following table list summary of findings from running the test code with 10.2/11.1/11.2 JDBC drivers and databases.

JDBC Driver VersionDatabase Version"?1" Works
10.2.0.510.2.0.5YES
10.2.0.511.1.0.7YES
10.2.0.511.2.0.3YES
11.1.0.710.2.0.5YES
11.1.0.711.1.0.7YES
11.1.0.711.2.0.3YES
11.2.0.310.2.0.5NO
11.2.0.311.1.0.7NO
11.2.0.311.2.0.3NO




Create and populate table used in the test code
SQL> create table x (a varchar2(10), b number);

Table created.

SQL> begin
2 for i in 1 .. 20
3 loop
4 insert into x values('abc'||i,i);
5 end loop;
6 end;
7 /

PL/SQL procedure successfully completed.

SQL> commit;

Commit complete.
Test code

OracleDataSource ds = new OracleDataSource();
ds.setUser("asanga");
ds.setPassword("asa");
ds.setURL("jdbc:oracle:thin:@192.168.0.66:1521:ent11g2");

Connection con = ds.getConnection();
DatabaseMetaData meta = con.getMetaData();

System.out.println("Driver Name " + meta.getDriverName());
System.out.println("Driver Version " + meta.getDriverVersion());
System.out.println("Driver Major Version " + meta.getDriverMajorVersion());
System.out.println("Driver Minor Version " + meta.getDriverMinorVersion());
System.out.println("Database Major Version " + meta.getDatabaseMajorVersion());
System.out.println("Database Minor Version " + meta.getDatabaseMinorVersion());
System.out.println("Database Product Name " + meta.getDatabaseProductName());
System.out.println("Database Product Version " + meta.getDatabaseProductVersion());

String SQL = "select * from x where b = ?1"; // works on 10gR2, 11gR1 jdbc driver but not on 11gR2 jdbc driver
// String SQL = "select * from x where b = ?"; // works on all drivers

PreparedStatement pr = con.prepareStatement(SQL);
pr.setInt(1, 10);
ResultSet rs = pr.executeQuery();

while(rs.next()){

System.out.println(rs.getString("A")+" "+rs.getInt("B"));
}

rs.close();
pr.close();
con.close();

Useful metalink notes
ORA-00933 When Using Bind Variables in JDBC 11.2 [ID 1304235.1]

Migrating Stored Outlines

$
0
0
11gR2 provides a function to migrate stored outline in to SQL plan baselines. In 1359841.1 oracle says stored outline "will be desupported in a future release in favor of SQL plan management" but (still) outline migration only works with enterprise edition (what will happen to standard edition systems?). This post list steps to migrate stored outlines created in earlier posts.

Current outlines
SQL> select name,sql_text,migrated from  user_outlines;
NAME SQL_TEXT MIGRATED
------------ ------------------------------------------------------ -------------
WITH_INDEX select count(*) from big_table where p_id=:"SYS_B_0" NOT-MIGRATED
JDBC_OUTLINE select count(*) from big_table where p_id=:1 NOT-MIGRATED
Execute DBMS_SPM.MIGRATE_STORED_OUTLINE function to migrate a particular outline
var migrate_output clob
SQL> exec :migrate_output := dbms_spm.MIGRATE_STORED_OUTLINE(attribute_name => 'outline_name',
attribute_value => 'JDBC_OUTLINE',
fixed => 'NO');
PL/SQL procedure successfully completed.
Once migrated the outline view shows plant status as migrated
SQL> select name,sql_text,migrated from  user_outlines;
NAME SQL_TEXT MIGRATED
------------ ------------------------------------------------------ -------------
WITH_INDEX select count(*) from big_table where p_id=:"SYS_B_0" NOT-MIGRATED
JDBC_OUTLINE select count(*) from big_table where p_id=:1 MIGRATED
Query plan base line view to verify outline is migrated into a SQL plan base line.
SQL> select sql_handle,sql_text,plan_name,origin,enabled,accepted from dba_sql_plan_baselines;

SQL_HANDLE SQL_TEXT PLAN_NAME ORIGIN ENA ACC
-------------------- --------------------------------------------- ------------- -------------- --- ----
SQL_fcd5bfb6b7986086 select count(*) from big_table where p_id=:1 JDBC_OUTLINE STORED-OUTLINE YES YES
Origin column indicates that plan baseline was created from a stored outline. Run the SQL query if plan base line is used
SQL> select * from table(dbms_xplan.display_cursor('4x4krrt8vq3js',0,'ALLSTATS OUTLINE'));
SQL_ID 4x4krrt8vq3js, child number 0
-------------------------------------
select count(*) from big_table where p_id=:1

Plan hash value: 3425075646

---------------------------------------------------------
| Id | Operation | Name | E-Rows |
---------------------------------------------------------
| 0 | SELECT STATEMENT | | |
| 1 | SORT AGGREGATE | | 1 |
|* 2 | TABLE ACCESS FULL| big_table | 21352 |
---------------------------------------------------------

Outline Data
-------------

/*+
BEGIN_OUTLINE_DATA
IGNORE_OPTIM_EMBEDDED_HINTS
OPTIMIZER_FEATURES_ENABLE('11.2.0.3')
DB_VERSION('11.2.0.3')
OPT_PARAM('optimizer_index_cost_adj' 25)
OPT_PARAM('optimizer_index_caching' 90)
FIRST_ROWS(1000)
OUTLINE_LEAF(@"SEL$1")
FULL(@"SEL$1" "big_table"@"SEL$1")
END_OUTLINE_DATA
*/

Predicate Information (identified by operation id):
---------------------------------------------------

2 - filter("p_id"=:1)

Note
-----
- SQL plan baseline JDBC_OUTLINE used for this statement
- Warning: basic plan statistics not available. These are only collected when:
* hint 'gather_plan_statistics' is used for the statement or
* parameter 'statistics_level' is set to 'ALL', at session or system level



Outline takes precedence over plan baseline (see 1524658.1 for more). Once migrated outline is not use even though the enabled column says "ENABLED" in the outline view. But if the outline was to be recreated again then instead of SQL plan baseline , the stored outline will be used. To recreate the outline that was migrated create a private outline and refresh from it.

SQL> create private outline myjdbc from jdbc_outline;
Outline created.

SQL> execute dbms_outln_edit.refresh_private_outline('MYJDBC');
PL/SQL procedure successfully completed.

SQL> create or replace outline jdbc_outline from private MYJDBC;
Outline created.
After this the migrated status would be changed to not-migrated
SQL> select name,sql_text,migrated from  user_outlines;
NAME SQL_TEXT MIGRATED
------------ ------------------------------------------------------ -------------
WITH_INDEX select count(*) from big_table where p_id=:"SYS_B_0" NOT-MIGRATED
JDBC_OUTLINE select count(*) from big_table where p_id=:1 NOT-MIGRATED
and outline will take precedence over the existing plan baseline.

Related Posts
Changing Execution Plan Using Stored Outline
Moving Stored Outlines From One Database To Another

DB CPU Greater Than DB Time

$
0
0
According to Oracle documentation DB CPU is a child of DB Time. The document says that parent child relationship of these values is for containment only and child may not add up to the parent. But can the opposite happen? Child values exceed the parent value?
That's what has been happening on several 11gR2 Standard Edition RACs. (with PSU 11.2.0.3.4 and 11.2.0.3.5 applied). The statspack reports shows DB CPU greater than DB Time.
Example 1: 
Time Model System Stats DB/Inst: TRAVEL/travel1 Snaps: 1735-1746
-> Ordered by % of DB time desc, Statistic name

Statistic Time (s) % DB time
----------------------------------- -------------------- ---------
DB CPU 72.3 116.3
sql execute elapsed time 30.4 48.9
connection management call elapsed 7.7 12.4
parse time elapsed 1.5 2.4
PL/SQL execution elapsed time 0.8 1.3
hard parse elapsed time 0.3 .5
hard parse (sharing criteria) elaps 0.1 .1
sequence load elapsed time 0.1 .1
hard parse (bind mismatch) elapsed 0.0 .0
repeated bind elapsed time 0.0 .0
DB time 62.2
background elapsed time 81.7
background cpu time 21.9
-------------------------------------------------------------

Example 2:
Time Model System Stats DB/Inst: TRAVEL/travel1 Snaps: 1969-1970
-> Ordered by % of DB time desc, Statistic name

Statistic Time (s) % DB time
----------------------------------- -------------------- ---------
DB CPU 109.3 104.6
sql execute elapsed time 58.5 56.0
connection management call elapsed 7.3 7.0
parse time elapsed 3.8 3.6
PL/SQL execution elapsed time 2.4 2.3
hard parse elapsed time 1.3 1.2
hard parse (sharing criteria) elaps 1.3 1.2
sequence load elapsed time 0.2 .2
PL/SQL compilation elapsed time 0.0 .0
repeated bind elapsed time 0.0 .0
hard parse (bind mismatch) elapsed 0.0 .0
DB time 104.5
background elapsed time 95.3
background cpu time 26.2
-------------------------------------------------------------
DB CPU exceeding DB Time has been happening intermittently for while. Following graphs show the different between DB CPU and DB Time and values below 0 indicate instances where DB CPU greater than DB Time.

After raising a SR Oracle has created "Bug 16300155 STATSPACK REPORTS SHOW DB CPU GREATER THAN DB TIME" and still investigating.



Similar observation was also made on a Enterprise Edition RAC as well.

This had been known to Oracle and already had a bug number (Bug 12713813: DB CPU LOOKS OVER-ESTIMATED) assigned to investigating this. However it was mentioned by Oracle that this bug hasn't been progressed because Oracle couldn't reproduce the issue. For the observed values it was said that DB Time is too little and to raise a SR (for awr related issue) if it's observed again at higher DB Times, although the Oracle engineer agreed that this an oddity and impossibility (that DB CPU is greater than DB Time no matter how small the observed values are).

Update 05 July 2013
AWR related SR was reopened as DB CPU higher than DB Time was observed during high activity time.

Installing Oracle 12c Database in RHEL 6

$
0
0
Oracle has released the 12c database software and could be downloaded from https://edelivery.oracle.com/. This blog post goes through the installation of 12c in RHEL 6 and highlights any differences to that of installing 11gR2 in RHEL 6
The linux system used in this case is 2.6.32-358.el6.x86_64. The minimum requirements for installing 12c on RHEL 6 could be found on Oracle documentation. However the issue of database software not recognizing the environment (issue that was there when installing 11gR2 on RHEL 6) is still there on 12c as well. After step 2 has passed the OUI complains system doesn't meet the minimum requirements and prompt to exit. This could be ignored and continued but then prerequisite checks are not carried out. Following text could be seen in the error log
ID: oracle.install.commons.util.exception.DefaultErrorAdvisor:389
oracle.cluster.verification.PreReqNotSupportedException: Reference data is not available for verifying
prerequisites on this operating system distribution
Changing the cvu_config file entry CV_ASSUME_DISTID value to OEL6 resolved this issue (same as in installing 11gR2 on RHEL 6)(update 15/07/2013 Oracle has a note on this 1567127.1)
Once this is done execute runInstaller to start the installation process.

Installing of software steps are similar to previous versions of Oracle. Pre-installation tasks are not shown here.

With 12c Oracle has introduce extended user groups for job role separation. These groups are OSBAKCUPDBA group (created in linux as backupdba) which is to manage backup and recovery jobs. OSDGDBA group to administer and monitor data guard broker (on linux dgdba group) and finally group for key management called OSKMDBA (created on linux as kmdba).

Prerequisite Checks

Summary page and beginning of the installation.

Once the software installation is complete create a listener using NETCA similar to previous versions of Oracle.



One of the key features of 12c is the mulch-tenancy databases where one container database (CDB) can hold multiple pluggable databases (PDB). However it is still possible to create non container databases with 12c. The database created here is a non-container database.

With 12c the Enterprise Manager Database Control is deprecated and Enterprise Manager Database Express 12c has been introduced instead.
If a listener was not created using NETCA a new listener could be created using DBCA.

Starting with 12c Oracle Label Security and Database Vault are installed by default and could be enabled or disabled during the database creation or afterwards using SQL.

From the DBCA itself the alert log could be viewed while the database is being created.
EM Express URL is listed similar to EM Console URL at the end of the installation.

Few sample pages from Database Express 12c


Update 15 July 2013
Useful metalink notes
Requirements for Installing Oracle Database 12.1 on RHEL6 or OL6 64-bit (x86-64) [ID 1529864.1]
Requirements for Installing Oracle Database 12.1 on RHEL5 or OL5 64-bit (x86-64) [ID 1529433.1]
Master Note For Oracle Database 12c Release 1 (12.1) Database/Client Installation/Upgrade/Migration Standalone Environment (Non-RAC) [ID 1520299.1]
RHEL6: 12c CVU Fails: Reference data is not available for verifying prerequisites on this operating system distribution [ID 1567127.1]

Upgrading from 11gR2 (11.2.0.3) to 12c (12.1.0.1) Grid Infrastructure

$
0
0
The environment used for upgrade is 11gR2 environment installed on RHEL 6 with role separation (with PSU 11.2.0.3.6 applied on the GI HOME). It had the listener port changed from default 1521 and scan listener and listener name changed. It was running a standard edition database with COTS enabled. Also it had two OS upgrades from RHEL6 U2 to RHEL 6 U3 and then finally upgraded to RHEL6 U4 on which this 12c upgrade is happening.
Oracle documentation mentions that Oracle 12c Upgrade Companion is available with metalink id 1462240.1 but at the time of this post this document has the status of "coming soon". So only Oracle documentations were referred during this upgrade. Few of the relevant sections are (for full list of restrictions follow Oracle documentation)
If you have an existing Oracle ASM 11g Release 1 (11.1) or 10g release instance, with Oracle ASM in a separate home, then you can either upgrade it at the time that you install Oracle Grid Infrastructure, or you can upgrade it after the installation, using Oracle ASM Configuration Assistant (ASMCA). However, be aware that a number of Oracle ASM features are disabled until you upgrade Oracle ASM, and Oracle Clusterware management of Oracle ASM does not function correctly until Oracle ASM is upgraded, because Oracle Clusterware only manages Oracle ASM when it is running in the Oracle Grid Infrastructure home. For this reason, Oracle recommends that if you do not upgrade Oracle ASM at the same time as you upgrade Oracle Clusterware, then you should upgrade Oracle ASM immediately afterward. This issue does not apply to Oracle ASM 11g Release 2 (11.2) and later, as the Oracle Grid Infrastructure home contains Oracle ASM binaries as well.
After running the rootupgrade.sh script on the last node in the cluster, if you are upgrading from a release earlier than Oracle Grid Infrastructure 11g Release 2 (11.2.0.1), and left the check box labeled ASMCA checked, as is the default, then Oracle Automatic Storage Management Configuration Assistant ASMCA runs automatically, and the Oracle Grid Infrastructure upgrade is complete. If you unchecked the box during the interview stage of the upgrade, then ASMCA is not run automatically.
Oracle recommends that you upgrade Oracle ASM at the same time that you upgrade Oracle Clusterware. Until Oracle ASM is upgraded, Oracle Databases that use Oracle ASM cannot be created and the Oracle ASM management tools in the Oracle Grid Infrastructure 12c Release 1 (12.1) home (for example, srvctl) do not work.
ASMCA performs a rolling upgrade only if the earlier release of Oracle ASM is either 11.1.0.6 or 11.1.0.7. Otherwise, ASMCA performs a non-rolling upgrade, in which ASMCA shuts down all Oracle ASM instances on all nodes of the cluster, and then starts an Oracle ASM instance on each node from the new Oracle Grid Infrastructure home.

There are several versions that can have direct upgrade to 12c
To upgrade existing Oracle Clusterware installations to a standard configuration Oracle Grid Infrastructure 12c cluster, your release must be greater than or equal to Oracle Clusterware 10g Release 1 (10.1.0.5), Oracle Clusterware 10g Release 2 (10.2.0.3), Oracle Grid Infrastructure 11g Release 1 (11.1.0.6), or Oracle Grid Infrastructure 11g Release 2 (11.2).

But there's a catch! which would make some setups to go from 10.* and 11.1 to upgrade to 11.2 before being upgraded to 12c. The catch is due to following restriction
If the Oracle Cluster Registry (OCR) and voting file locations for your current installation are on raw or block devices, then you must migrate them to Oracle ASM disk groups or shared file systems before upgrading to Oracle Grid Infrastructure 12c.If you want to upgrade Oracle Grid Infrastructure releases before Oracle Grid Infrastructure 11g Release 2 (11.2), where the OCR and voting files are on raw or block devices, and you want to migrate these files to Oracle ASM rather than to a shared file system, then you must upgrade to Oracle Grid Infrastructure 11g Release 2 (11.2) before you upgrade to Oracle Grid Infrastructure 12c.Migrate OCR files from RAW or Block devices to Oracle ASM or a supported file system. Direct use of RAW and Block devices is not supported.
This means versions where ocr and vote files are in block devices or raw devices must first migrate to 11.2 and then move the ocr and vote to ASM before upgrading to 12c.

The same user that owned the earlier release Oracle Grid Infrastructure software must perform the Oracle Grid Infrastructure 12c Release 1 (12.1) upgrade. Before Oracle Database 11g, either all Oracle software installations were owned by the Oracle user, typically oracle, or Oracle Database software was owned by oracle, and Oracle Clusterware software was owned by a separate user, typically crs.
Running the cluvfy from the 12c grid infrastructure installation media failed with the following message.
ERROR:
Reference data is not available for verifying prerequisites on this operating system distribution
Verification cannot proceed
Changing CV_ASSUME_DISTID=OEL6 didn't help in this case. After some searching found the following metalink note that gives a solution to a similar issue on 11.2.
runcluvfy stage -pre crsinst generates Reference Data is not available for verifying prerequisites on this operating system distribution on Redhat 6 - IBM: Linux on System z [ID 1514012.1]The support note provides a solution pack and in this case only the redhat-release-6Server-1.noarch.rpm from the pack was installed and other steps were ignored. Afterwards the runcluvfy got executed without any issue. (update 15/07/2013: Oracle has a MOS note for this now 1567127.1) There are new pre-req checks added to the 12c, notably space requirements of /dev/shm are checked for grid infrastructure, space requirments for several linux directories are also checked not just the installation location and /tmp as before and lastly check for avahi-daemon. Full output is available below.
[grid@rhel6m1 grid]$ ./runcluvfy.sh stage -pre crsinst -upgrade -n rhel6m1,rhel6m2 -rolling -src_crshome /opt/app/11.2.0/grid -dest_crshome /opt/app/12.1.0/grid -dest_version 12.1.0.1.0 -fixup -verbose

Performing pre-checks for cluster services setup

Checking node reachability...

Check: Node reachability from node "rhel6m1"
Destination Node Reachable?
------------------------------------ ------------------------
rhel6m1 yes
rhel6m2 yes
Result: Node reachability check passed from node "rhel6m1"


Checking user equivalence...

Check: User equivalence for user "grid"
Node Name Status
------------------------------------ ------------------------
rhel6m2 passed
rhel6m1 passed
Result: User equivalence check passed for user "grid"

Checking CRS user consistency
Result: CRS user consistency check successful
Checking ASM disk size consistency
All ASM disks are correctly sized
Checking if default discovery string is being used by ASM
ASM discovery string "/dev/sd*" is not the default discovery string

Checking node connectivity...

Checking hosts config file...
Node Name Status
------------------------------------ ------------------------
rhel6m1 passed
rhel6m2 passed

Verification of the hosts config file successful


Interface information for node "rhel6m1"
Name IP Address Subnet Gateway Def. Gateway HW Address MTU
------ --------------- --------------- --------------- --------------- ----------------- ------
eth0 192.168.0.93 192.168.0.0 0.0.0.0 192.168.0.100 08:00:27:82:9F:00 1500
eth0 192.168.0.92 192.168.0.0 0.0.0.0 192.168.0.100 08:00:27:82:9F:00 1500
eth0 192.168.0.97 192.168.0.0 0.0.0.0 192.168.0.100 08:00:27:82:9F:00 1500
eth1 192.168.1.87 192.168.1.0 0.0.0.0 192.168.0.100 08:00:27:F9:87:77 1500
eth1 169.254.31.63 169.254.0.0 0.0.0.0 192.168.0.100 08:00:27:F9:87:77 1500


Interface information for node "rhel6m2"
Name IP Address Subnet Gateway Def. Gateway HW Address MTU
------ --------------- --------------- --------------- --------------- ----------------- ------
eth0 192.168.0.94 192.168.0.0 0.0.0.0 192.168.0.100 08:00:27:FA:8E:62 1500
eth0 192.168.0.98 192.168.0.0 0.0.0.0 192.168.0.100 08:00:27:FA:8E:62 1500
eth1 192.168.1.88 192.168.1.0 0.0.0.0 192.168.0.100 08:00:27:84:5D:A8 1500
eth1 169.254.160.199 169.254.0.0 0.0.0.0 192.168.0.100 08:00:27:84:5D:A8 1500


Check: Node connectivity using interfaces on subnet "192.168.1.0"

Check: Node connectivity of subnet "192.168.1.0"
Source Destination Connected?
------------------------------ ------------------------------ ----------------
rhel6m1[192.168.1.87] rhel6m2[192.168.1.88] yes
Result: Node connectivity passed for subnet "192.168.1.0" with node(s) rhel6m1,rhel6m2


Check: TCP connectivity of subnet "192.168.1.0"
Source Destination Connected?
------------------------------ ------------------------------ ----------------
rhel6m1:192.168.1.87 rhel6m2:192.168.1.88 passed
Result: TCP connectivity check passed for subnet "192.168.1.0"


Check: Node connectivity using interfaces on subnet "192.168.0.0"

Check: Node connectivity of subnet "192.168.0.0"
Source Destination Connected?
------------------------------ ------------------------------ ----------------
rhel6m2[192.168.0.94] rhel6m1[192.168.0.97] yes
rhel6m2[192.168.0.94] rhel6m2[192.168.0.98] yes
rhel6m2[192.168.0.94] rhel6m1[192.168.0.93] yes
rhel6m2[192.168.0.94] rhel6m1[192.168.0.92] yes
rhel6m1[192.168.0.97] rhel6m2[192.168.0.98] yes
rhel6m1[192.168.0.97] rhel6m1[192.168.0.93] yes
rhel6m1[192.168.0.97] rhel6m1[192.168.0.92] yes
rhel6m2[192.168.0.98] rhel6m1[192.168.0.93] yes
rhel6m2[192.168.0.98] rhel6m1[192.168.0.92] yes
rhel6m1[192.168.0.93] rhel6m1[192.168.0.92] yes
Result: Node connectivity passed for subnet "192.168.0.0" with node(s) rhel6m2,rhel6m1


Check: TCP connectivity of subnet "192.168.0.0"
Source Destination Connected?
------------------------------ ------------------------------ ----------------
rhel6m2:192.168.0.94 rhel6m1:192.168.0.97 passed
rhel6m2:192.168.0.94 rhel6m2:192.168.0.98 passed
rhel6m2:192.168.0.94 rhel6m1:192.168.0.93 passed
rhel6m2:192.168.0.94 rhel6m1:192.168.0.92 passed
Result: TCP connectivity check passed for subnet "192.168.0.0"

Checking subnet mask consistency...
Subnet mask consistency check passed for subnet "192.168.0.0".
Subnet mask consistency check passed for subnet "192.168.1.0".
Subnet mask consistency check passed.

Result: Node connectivity check passed

Checking multicast communication...

Checking subnet "192.168.1.0" for multicast communication with multicast group "224.0.0.251"...
Check of subnet "192.168.1.0" for multicast communication with multicast group "224.0.0.251" passed.

Check of multicast communication passed.
Task ASM Integrity check started...


Starting check to see if ASM is running on all cluster nodes...

ASM Running check passed. ASM is running on all specified nodes

Starting Disk Groups check to see if at least one Disk Group configured...
Disk Group Check passed. At least one Disk Group configured

Task ASM Integrity check passed...

Checking OCR integrity...

OCR integrity check passed

Checking ASMLib configuration.
Node Name Status
------------------------------------ ------------------------
rhel6m1 passed
rhel6m2 passed
Result: Check for ASMLib configuration passed.

Check: Total memory
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 4.0009GB (4195276.0KB) 4GB (4194304.0KB) passed
rhel6m1 4.0009GB (4195276.0KB) 4GB (4194304.0KB) passed
Result: Total memory check passed

Check: Available memory
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 3.045GB (3192940.0KB) 50MB (51200.0KB) passed
rhel6m1 2.6829GB (2813180.0KB) 50MB (51200.0KB) passed
Result: Available memory check passed

Check: Swap space
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 4.0098GB (4204528.0KB) 4.0009GB (4195276.0KB) passed
rhel6m1 4.0098GB (4204528.0KB) 4.0009GB (4195276.0KB) passed
Result: Swap space check passed

Check: Free disk space for "rhel6m2:/usr,rhel6m2:/var,rhel6m2:/etc,rhel6m2:/opt/app/11.2.0/grid,rhel6m2:/sbin,rhel6m2:/tmp"
Path Node Name Mount point Available Required Status
---------------- ------------ ------------ ------------ ------------ ------------
/usr rhel6m2 / 24.6191GB 7.9635GB passed
/var rhel6m2 / 24.6191GB 7.9635GB passed
/etc rhel6m2 / 24.6191GB 7.9635GB passed
/opt/app/11.2.0/grid rhel6m2 / 24.6191GB 7.9635GB passed
/sbin rhel6m2 / 24.6191GB 7.9635GB passed
/tmp rhel6m2 / 24.6191GB 7.9635GB passed
Result: Free disk space check passed for "rhel6m2:/usr,rhel6m2:/var,rhel6m2:/etc,rhel6m2:/opt/app/11.2.0/grid,rhel6m2:/sbin,rhel6m2:/tmp"

Check: Free disk space for "rhel6m1:/usr,rhel6m1:/var,rhel6m1:/etc,rhel6m1:/opt/app/11.2.0/grid,rhel6m1:/sbin,rhel6m1:/tmp"
Path Node Name Mount point Available Required Status
---------------- ------------ ------------ ------------ ------------ ------------
/usr rhel6m1 / 19.7458GB 7.9635GB passed
/var rhel6m1 / 19.7458GB 7.9635GB passed
/etc rhel6m1 / 19.7458GB 7.9635GB passed
/opt/app/11.2.0/grid rhel6m1 / 19.7458GB 7.9635GB passed
/sbin rhel6m1 / 19.7458GB 7.9635GB passed
/tmp rhel6m1 / 19.7458GB 7.9635GB passed
Result: Free disk space check passed for "rhel6m1:/usr,rhel6m1:/var,rhel6m1:/etc,rhel6m1:/opt/app/11.2.0/grid,rhel6m1:/sbin,rhel6m1:/tmp"

Check: User existence for "grid"
Node Name Status Comment
------------ ------------------------ ------------------------
rhel6m2 passed exists(502)
rhel6m1 passed exists(502)

Checking for multiple users with UID value 502
Result: Check for multiple users with UID value 502 passed
Result: User existence check passed for "grid"

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

Check: Group existence for "dba"
Node Name Status Comment
------------ ------------------------ ------------------------
rhel6m2 passed exists
rhel6m1 passed exists
Result: Group existence check passed for "dba"

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

Check: Membership of user "grid" in group "dba"
Node Name User Exists Group Exists User in Group Status
---------------- ------------ ------------ ------------ ----------------
rhel6m2 yes yes yes passed
rhel6m1 yes yes yes passed
Result: Membership check for user "grid" in group "dba" passed

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

Check: Hard limits for "maximum open file descriptors"
Node Name Type Available Required Status
---------------- ------------ ------------ ------------ ----------------
rhel6m2 hard 65536 65536 passed
rhel6m1 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
---------------- ------------ ------------ ------------ ----------------
rhel6m2 soft 1024 1024 passed
rhel6m1 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
---------------- ------------ ------------ ------------ ----------------
rhel6m2 hard 16384 16384 passed
rhel6m1 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
---------------- ------------ ------------ ------------ ----------------
rhel6m2 soft 2047 2047 passed
rhel6m1 soft 2047 2047 passed
Result: Soft limits check passed for "maximum user processes"

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

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

Checking for suitability of source home "/opt/app/11.2.0/grid" for upgrading to version "12.1.0.1.0".
Result: Source home "/opt/app/11.2.0/grid" is suitable for upgrading to version "12.1.0.1.0".

Check: System architecture
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 x86_64 x86_64 passed
rhel6m1 x86_64 x86_64 passed
Result: System architecture check passed

Check: Kernel version
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 2.6.32-358.el6.x86_64 2.6.32 passed
rhel6m1 2.6.32-358.el6.x86_64 2.6.32 passed
Result: Kernel version check passed

Check: Kernel parameter for "semmsl"
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
rhel6m1 3010 3010 250 passed
rhel6m2 3010 3010 250 passed
Result: Kernel parameter check passed for "semmsl"

Check: Kernel parameter for "semmns"
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
rhel6m1 385280 385280 32000 passed
rhel6m2 385280 385280 32000 passed
Result: Kernel parameter check passed for "semmns"

Check: Kernel parameter for "semopm"
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
rhel6m1 3010 3010 100 passed
rhel6m2 3010 3010 100 passed
Result: Kernel parameter check passed for "semopm"

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

Check: Kernel parameter for "shmmax"
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
rhel6m1 68719476736 68719476736 2147981312 passed
rhel6m2 68719476736 68719476736 2147981312 passed
Result: Kernel parameter check passed for "shmmax"

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

Check: Kernel parameter for "shmall"
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
rhel6m1 4294967296 4294967296 419527 passed
rhel6m2 4294967296 4294967296 419527 passed
Result: Kernel parameter check passed for "shmall"

Check: Kernel parameter for "file-max"
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
rhel6m1 6815744 6815744 6815744 passed
rhel6m2 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
---------------- ------------ ------------ ------------ ------------ ------------
rhel6m1 between 9000 & 65500 between 9000 & 65500 between 9000 & 65535 passed
rhel6m2 between 9000 & 65500 between 9000 & 65500 between 9000 & 65535 passed
Result: Kernel parameter check passed for "ip_local_port_range"

Check: Kernel parameter for "rmem_default"
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
rhel6m1 4194304 4194304 262144 passed
rhel6m2 4194304 4194304 262144 passed
Result: Kernel parameter check passed for "rmem_default"

Check: Kernel parameter for "rmem_max"
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
rhel6m1 4194304 4194304 4194304 passed
rhel6m2 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
---------------- ------------ ------------ ------------ ------------ ------------
rhel6m1 1048576 1048576 262144 passed
rhel6m2 1048576 1048576 262144 passed
Result: Kernel parameter check passed for "wmem_default"

Check: Kernel parameter for "wmem_max"
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
rhel6m1 2097152 2097152 1048576 passed
rhel6m2 2097152 2097152 1048576 passed
Result: Kernel parameter check passed for "wmem_max"

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

Check: Package existence for "binutils"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 binutils-2.20.51.0.2-5.36.el6 binutils-2.20.51.0.2 passed
rhel6m1 binutils-2.20.51.0.2-5.36.el6 binutils-2.20.51.0.2 passed
Result: Package existence check passed for "binutils"

Check: Package existence for "compat-libcap1"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 compat-libcap1-1.10-1 compat-libcap1-1.10 passed
rhel6m1 compat-libcap1-1.10-1 compat-libcap1-1.10 passed
Result: Package existence check passed for "compat-libcap1"

Check: Package existence for "compat-libstdc++-33(x86_64)"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 compat-libstdc++-33(x86_64)-3.2.3-69.el6 compat-libstdc++-33(x86_64)-3.2.3 passed
rhel6m1 compat-libstdc++-33(x86_64)-3.2.3-69.el6 compat-libstdc++-33(x86_64)-3.2.3 passed
Result: Package existence check passed for "compat-libstdc++-33(x86_64)"

Check: Package existence for "libgcc(x86_64)"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 libgcc(x86_64)-4.4.7-3.el6 libgcc(x86_64)-4.4.4 passed
rhel6m1 libgcc(x86_64)-4.4.7-3.el6 libgcc(x86_64)-4.4.4 passed
Result: Package existence check passed for "libgcc(x86_64)"

Check: Package existence for "libstdc++(x86_64)"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 libstdc++(x86_64)-4.4.7-3.el6 libstdc++(x86_64)-4.4.4 passed
rhel6m1 libstdc++(x86_64)-4.4.7-3.el6 libstdc++(x86_64)-4.4.4 passed
Result: Package existence check passed for "libstdc++(x86_64)"

Check: Package existence for "libstdc++-devel(x86_64)"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 libstdc++-devel(x86_64)-4.4.7-3.el6 libstdc++-devel(x86_64)-4.4.4 passed
rhel6m1 libstdc++-devel(x86_64)-4.4.7-3.el6 libstdc++-devel(x86_64)-4.4.4 passed
Result: Package existence check passed for "libstdc++-devel(x86_64)"

Check: Package existence for "sysstat"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 sysstat-9.0.4-20.el6 sysstat-9.0.4 passed
rhel6m1 sysstat-9.0.4-20.el6 sysstat-9.0.4 passed
Result: Package existence check passed for "sysstat"

Check: Package existence for "gcc"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 gcc-4.4.7-3.el6 gcc-4.4.4 passed
rhel6m1 gcc-4.4.7-3.el6 gcc-4.4.4 passed
Result: Package existence check passed for "gcc"

Check: Package existence for "gcc-c++"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 gcc-c++-4.4.7-3.el6 gcc-c++-4.4.4 passed
rhel6m1 gcc-c++-4.4.7-3.el6 gcc-c++-4.4.4 passed
Result: Package existence check passed for "gcc-c++"

Check: Package existence for "ksh"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 ksh-20100621-19.el6 ksh-... passed
rhel6m1 ksh-20100621-19.el6 ksh-... passed
Result: Package existence check passed for "ksh"

Check: Package existence for "make"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 make-3.81-20.el6 make-3.81 passed
rhel6m1 make-3.81-20.el6 make-3.81 passed
Result: Package existence check passed for "make"

Check: Package existence for "glibc(x86_64)"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 glibc(x86_64)-2.12-1.107.el6 glibc(x86_64)-2.12 passed
rhel6m1 glibc(x86_64)-2.12-1.107.el6 glibc(x86_64)-2.12 passed
Result: Package existence check passed for "glibc(x86_64)"

Check: Package existence for "glibc-devel(x86_64)"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 glibc-devel(x86_64)-2.12-1.107.el6 glibc-devel(x86_64)-2.12 passed
rhel6m1 glibc-devel(x86_64)-2.12-1.107.el6 glibc-devel(x86_64)-2.12 passed
Result: Package existence check passed for "glibc-devel(x86_64)"

Check: Package existence for "libaio(x86_64)"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 libaio(x86_64)-0.3.107-10.el6 libaio(x86_64)-0.3.107 passed
rhel6m1 libaio(x86_64)-0.3.107-10.el6 libaio(x86_64)-0.3.107 passed
Result: Package existence check passed for "libaio(x86_64)"

Check: Package existence for "libaio-devel(x86_64)"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 libaio-devel(x86_64)-0.3.107-10.el6 libaio-devel(x86_64)-0.3.107 passed
rhel6m1 libaio-devel(x86_64)-0.3.107-10.el6 libaio-devel(x86_64)-0.3.107 passed
Result: Package existence check passed for "libaio-devel(x86_64)"

Check: Package existence for "nfs-utils"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 nfs-utils-1.2.3-36.el6 nfs-utils-1.2.3-15 passed
rhel6m1 nfs-utils-1.2.3-36.el6 nfs-utils-1.2.3-15 passed
Result: Package existence check passed for "nfs-utils"

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
------------------------------------ ------------------------
rhel6m2 passed
rhel6m1 passed

Check for consistency of root user's primary group passed

Check: Package existence for "cvuqdisk"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
rhel6m2 cvuqdisk-1.0.9-1 cvuqdisk-1.0.9-1 passed
rhel6m1 cvuqdisk-1.0.9-1 cvuqdisk-1.0.9-1 passed
Result: Package existence check passed for "cvuqdisk"

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 "grid" is not in "root" group
Node Name Status Comment
------------ ------------------------ ------------------------
rhel6m2 passed does not exist
rhel6m1 passed does not exist
Result: User "grid" is not part of "root" group. Check passed

Check default user file creation mask
Node Name Available Required Comment
------------ ------------------------ ------------------------ ----------
rhel6m2 0022 0022 passed
rhel6m1 0022 0022 passed
Result: Default user file creation mask check passed
Checking integrity 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
"domain" and "search" entries do not coexist in any "/etc/resolv.conf" file
Checking if domain entry in file "/etc/resolv.conf" is consistent across the nodes...
"domain" entry does not exist in any "/etc/resolv.conf" file
Checking if search entry in file "/etc/resolv.conf" is consistent across the nodes...
Checking file "/etc/resolv.conf" to make sure that only one search entry is defined
More than one "search" entry does not exist in any "/etc/resolv.conf" file
All nodes have same "search" order defined in file "/etc/resolv.conf"
Checking DNS response time for an unreachable node
Node Name Status
------------------------------------ ------------------------
rhel6m1 passed
rhel6m2 passed
The DNS response time for an unreachable node is within acceptable limit on all nodes

Check for integrity of file "/etc/resolv.conf" passed


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.

Checking integrity of name service switch configuration file "/etc/nsswitch.conf" ...
Checking if "hosts" entry in file "/etc/nsswitch.conf" is consistent across nodes...
Checking file "/etc/nsswitch.conf" to make sure that only one "hosts" entry is defined
More than one "hosts" entry does not exist in any "/etc/nsswitch.conf" file
All nodes have same "hosts" entry defined in file "/etc/nsswitch.conf"
Check for integrity of name service switch configuration file "/etc/nsswitch.conf" passed


Checking daemon "avahi-daemon" is not configured and running

Check: Daemon "avahi-daemon" not configured
Node Name Configured Status
------------ ------------------------ ------------------------
rhel6m2 no passed
rhel6m1 no passed
Daemon not configured check passed for process "avahi-daemon"

Check: Daemon "avahi-daemon" not running
Node Name Running? Status
------------ ------------------------ ------------------------
rhel6m2 no passed
rhel6m1 no passed
Daemon not running check passed for process "avahi-daemon"

Starting check for /dev/shm mounted as temporary file system ...

Check for /dev/shm mounted as temporary file system passed


NOTE:
No fixable verification failures to fix

Pre-check for cluster services setup was successful.
Since GI upgrades are output place upgrades a new directory structure could be created with the new version.
mkdir -p /opt/app/12.1.0/grid
chown -R grid:oinstall /opt/app/12.1.0
chmod -R 775 /opt/app/12.1.0
Unset ORACLE_HOME AND ORACLE_HOME/bin from path
The current softwareversion and activeversion values are
[grid@rhel6m1 app]$ crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [11.2.0.3.0]

[grid@rhel6m1 app]$ crsctl query crs softwareversion
Oracle Clusterware version on node [rhel6m1] is [11.2.0.3.0]




Start the install by executing the runInstaller

GI Management repository is a new feature introduced with 12c. When this is selected with the GI installation a database is created (named -MGMTDB) and it's data files are stored in the same disk group where the OCR and vote disks are stored. The command used by the OUI is
INFO: Command /opt/app/12.1.0/grid/bin/dbca -silent -createDatabase -templateName MGMTSeed_Database.dbc -sid -MGMTDB -gdbName _mgmtdb -stora
geType ASM -diskGroupName CLUSTER_DG -datafileJarLocation /opt/app/12.1.0/grid/assistants/dbca/templates -characterset AL32UTF8 -autoGeneratePasswords -oui_internal
This disk group must have at least 3358MB. If there's less space GI management repository installation will fail
INFO: Read: +CLUSTER_DG does not have enough space. Required space is 3358 MB , available space is 2261 MB.
WARNING: Skipping line: +CLUSTER_DG does not have enough space. Required space is 3358 MB , available space is 2261 MB.
Confirm there's enough space in the disk group with
SQL> select name,total_Mb,free_mb,USABLE_FILE_MB from v$asm_diskgroup;

NAME TOTAL_MB FREE_MB USABLE_FILE_MB
------------------------------ ---------- ---------- --------------
CLUSTER_DG 15342 14716 2261
FLASH 10236 3468 3468
DATA 10236 6593 6593
If there's not enough space expand the space available in the disk group or decide not to have the repository and continue with rest of the upgrade. In this case additional disk were added to the disk group
SQL>  alter diskgroup cluster_dg add disk '/dev/sdg1','/dev/sdh1','/dev/sdi1';

Diskgroup altered.

SQL> select name,total_Mb,free_mb,USABLE_FILE_MB from v$asm_diskgroup;

NAME TOTAL_MB FREE_MB USABLE_FILE_MB
------------------------------ ---------- ---------- --------------
CLUSTER_DG 30684 30025 9915
FLASH 10236 3468 3468
DATA 10236 6593 6593
Since a database is created several location need write permission for oinstall group so grid user could write to those locations. One of those location is dbca directory under cfgtoollogs.
cd /opt/app/oracle/cfgtoollogs
# chmod 770 dbca
Another location is admin folder to avoid Cannot create directory "/opt/app/oracle/admin/_mgmtdb/dpdump".
cd /opt/app/oracle
#chmod 770 admin
More on GI management repository and usage is available here and after upgrade considerations.

With 12c it is possible to let the installer execute script that requires root privilege either by providing the root password or specifying sudo. If neither is checked then rootupgrade.sh is run manually as with previous version. In this case it was decided to run the root scripts manually (screenshot shows auto option checked but it was unchecked later on).

When prompted execute the rootupgrade.sh script. As mentioned earlier the auto execution of root was unchecked so manual root script execution was prompted. Executing on first node
[root@rhel6m1 grid]# /opt/app/12.1.0/grid/rootupgrade.sh
Performing root user operation for Oracle 12c

The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /opt/app/12.1.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/12.1.0/grid/crs/install/crsconfig_params

ASM upgrade has started on first node.

OLR initialization - successful
2013/07/05 14:34:35 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.conf'

CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
2013/07/05 14:44:38 CLSRSC-343: Successfully started Oracle clusterware stack

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.
2013/07/05 14:46:16 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
After this the software version gets upgraded but the active version remains the lower 11.2 version until second node is upgraded as well
[root@rhel6m1 grid]# crsctl query crs softwareversion
Oracle Clusterware version on node [rhel6m1] is [12.1.0.1.0]

[root@rhel6m1 grid]# crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [11.2.0.3.0]
Executing on second node
[root@rhel6m2 grid]# /opt/app/12.1.0/grid/rootupgrade.sh
Performing root user operation for Oracle 12c

The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /opt/app/12.1.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/12.1.0/grid/crs/install/crsconfig_params
OLR initialization - successful
2013/07/05 14:50:06 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.conf'

CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
2013/07/05 14:58:53 CLSRSC-343: Successfully started Oracle clusterware stack

clscfg: EXISTING configuration version 5 detected.
clscfg: version 5 is 12c Release 1.
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.
The CSS was successfully upgraded.
Started to upgrade Oracle ASM.
Started to upgrade the CRS.
The CRS was successfully upgraded.
Oracle Clusterware operating version was successfully set to 12.1.0.1.0
2013/07/05 15:03:00 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
After the root script is executed on the last node the active version is ugpraded.
[root@rhel6m2 grid]# crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [12.1.0.1.0]
Clicking OK on the execute root script dialog will proceed to GI configuration tasks. The repository database mentioned earlier is created in these steps. In case of failures (not enough space, unable to write to directory location as mentioned earlier) refer the logs and rectify the problems and retry.

This concludes the upgrade, if desired the old GI home could be uninstalled at this time. As root change the ownership of the files and directories in the old GI homes in all the nodes
cd /opt/app/11.2.0
[root@rhel6m1 11.2.0]# chmod -R 775 grid
[root@rhel6m1 11.2.0]# chown -R grid grid
[root@rhel6m1 11.2.0]# cd /opt/app
[root@rhel6m1 app]# chown grid 11.2.0
Use standalone deinstall tool to remove the old GI home.
This concludes the upgrade of 11gR2 to 12c (11.2.0.3 to 12.1.0.1) grid infrastrcuture. Next step is to upgrade the RAC.

Update 08 July 2013
It was mentioned earlier that the environment being upgraded was running the listener on a non-default port. However after the upgrade it seem that listener running out of the 12c home is running on the default port of 1521.
[grid@rhel6m1 admin]$ srvctl config listener
Name: MYLISTENER
Network: 1, Owner: grid
Home:
End points: TCP:1521
But the scan listener port changes remained intact.
[grid@rhel6m1 admin]$ srvctl config scan_listener
SCAN Listener MYLISTENER_SCAN1 exists. Port: TCP:9120/TCPS:1523
Registration invited nodes:
Registration invited subnets:
Because of this only the management repository database as registering with the listener and not the main database.
[grid@rhel6m1 admin]$ lsnrctl status mylistener

LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 08-JUL-2013 14:53:45

Copyright (c) 1991, 2013, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=MYLISTENER)))
STATUS of the LISTENER
------------------------
Alias MYLISTENER
Version TNSLSNR for Linux: Version 12.1.0.1.0 - Production
Start Date 05-JUL-2013 15:02:50
Uptime 2 days 23 hr. 50 min. 55 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/app/12.1.0/grid/network/admin/listener.ora
Listener Log File /opt/app/oracle/diag/tnslsnr/rhel6m1/mylistener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=MYLISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.93)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.97)(PORT=1521)))
Services Summary...
Service "-MGMTDBXDB" has 1 instance(s).
Instance "-MGMTDB", status READY, has 1 handler(s) for this service...
Service "_mgmtdb" has 1 instance(s).
Instance "-MGMTDB", status READY, has 2 handler(s) for this service...
The command completed successfully
To fix this change the listener port again to the non-default port
srvctl modify listener -l MYLISTENER -p 2910
and also set the local_listener variable on the repository database
SQL> alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.97)(PORT=9120))' scope=both sid='*';
Once the listener is restarted all instances (database and ASM) registers with the listener running on the non-default port.
grid@rhel6m1 admin]$ lsnrctl status mylistener

LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 08-JUL-2013 14:56:55

Copyright (c) 1991, 2013, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=MYLISTENER)))
STATUS of the LISTENER
------------------------
Alias MYLISTENER
Version TNSLSNR for Linux: Version 12.1.0.1.0 - Production
Start Date 08-JUL-2013 14:56:42
Uptime 0 days 0 hr. 0 min. 12 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/app/12.1.0/grid/network/admin/listener.ora
Listener Log File /opt/app/oracle/diag/tnslsnr/rhel6m1/mylistener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=MYLISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.93)(PORT=9120)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.97)(PORT=9120)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "-MGMTDBXDB" has 1 instance(s).
Instance "-MGMTDB", status READY, has 1 handler(s) for this service...
Service "_mgmtdb" has 1 instance(s).
Instance "-MGMTDB", status READY, has 1 handler(s) for this service...
Service "myservice" has 1 instance(s).
Instance "std11g21", status READY, has 1 handler(s) for this service...
Service "std11g2" has 1 instance(s).
Instance "std11g21", status READY, has 1 handler(s) for this service...
Service "std11g2XDB" has 1 instance(s).
Instance "std11g21", status READY, has 1 handler(s) for this service...
The command completed successfully
It must also be noted that the COST related values and files had been moved to new 12c home during the upgrade process. However the wallet file locations in files $GI_HOME/network/admin/listener.ora and $ORACLE_HOME/network/admin/sqlnet.ora must be edited manually to reflect the new location of the wallet files.

Useful metalink note
Oracle 12c Upgrade Companion [1462240.1]
RHEL6: 12c CVU Fails: Reference data is not available for verifying prerequisites on this operating system distribution [ID 1567127.1]

Related Posts
Upgrading from 10.2.0.4 to 10.2.0.5 (Clusterware, RAC, ASM)
Upgrade from 10.2.0.5 to 11.2.0.3 (Clusterware, RAC, ASM)
Upgrade from 11.1.0.7 to 11.2.0.3 (Clusterware, ASM & RAC)
Upgrading from 11.1.0.7 to 11.2.0.3 with Transient Logical Standby
Upgrading from 11.2.0.1 to 11.2.0.3 with in-place upgrade for RAC
In-place upgrade from 11.2.0.2 to 11.2.0.3
Upgrading from 11.2.0.2 to 11.2.0.3 with Physical Standby - 1
Upgrading from 11.2.0.2 to 11.2.0.3 with Physical Standby - 2

Upgrading from 11gR2 (11.2.0.3) to 12c (12.1.0.1) RAC

$
0
0
The earlier post showed the steps for upgrading grid infrastructure from 11gR2 to 12c. This post list the steps for upgrading the RAC software to 12c. Since 11gR2 upgrades are out of place as such upgrading the database software requires no downtime and database is not involved in the upgrade process until the actual database upgrade happens with DBUA (or manually).
cluvfy could be used to verify the upgrade readiness. This will be run as Oracle user (as opposed to grid user in the earlier post).
[oracle@rhel6m1 database]$  /opt/app/12.1.0/grid/bin/cluvfy stage -pre dbinst -upgrade -src_dbhome /opt/app/oracle/product/11.2.0/dbhome_1 -dbname std11g2 -dest_dbhome /opt/app/oracle/product/12.1.0/dbhome_1 -dest_version 12.1.0.1.0 -fixup

Performing pre-checks for database installation

Checking node reachability...
Node reachability check passed from node "rhel6m1"


Checking user equivalence...
User equivalence check passed for user "oracle"
Specify user name for database "std11g2" [default "DBSNMP"] : system
Specify password for user "system" in database "std11g2" :

Checking node connectivity...

Checking hosts config file...

Verification of the hosts config file successful

Check: Node connectivity using interfaces on subnet "192.168.0.0"
Node connectivity passed for subnet "192.168.0.0" with node(s) rhel6m2,rhel6m1
TCP connectivity check passed for subnet "192.168.0.0"


Check: Node connectivity using interfaces on subnet "192.168.1.0"
Node connectivity passed for subnet "192.168.1.0" with node(s) rhel6m2,rhel6m1
TCP connectivity check passed for subnet "192.168.1.0"

Checking subnet mask consistency...
Subnet mask consistency check passed for subnet "192.168.0.0".
Subnet mask consistency check passed for subnet "192.168.1.0".
Subnet mask consistency check passed.

Node connectivity check passed

Checking multicast communication...

Checking subnet "192.168.1.0" for multicast communication with multicast group "224.0.0.251"...
Check of subnet "192.168.1.0" for multicast communication with multicast group "224.0.0.251" passed.

Check of multicast communication passed.
Total memory check passed
Available memory check passed
Swap space check passed
Free disk space check passed for "rhel6m2:/opt/app/oracle/product/12.1.0/dbhome_1,rhel6m2:/tmp"
Free disk space check passed for "rhel6m1:/opt/app/oracle/product/12.1.0/dbhome_1,rhel6m1:/tmp"
Check for multiple users with UID value 501 passed
User existence check passed for "oracle"
Group existence check passed for "oinstall"
Group existence check passed for "dba"
Group existence check passed for "asmdba"
Membership check for user "oracle" in group "oinstall" [as Primary] passed
Membership check for user "oracle" in group "dba" passed
Membership check for user "oracle" in group "asmdba" passed
Run level check passed
Hard limits check passed for "maximum open file descriptors"
Soft limits check passed for "maximum open file descriptors"
Hard limits check passed for "maximum user processes"
Soft limits check passed for "maximum user processes"
There are no oracle patches required for home "/opt/app/oracle/product/11.2.0/dbhome_1".
There are no oracle patches required for home "/opt/app/oracle/product/12.1.0/dbhome_1".
System architecture check passed
Kernel version check passed
Kernel parameter check passed for "semmsl"
Kernel parameter check passed for "semmns"
Kernel parameter check passed for "semopm"
Kernel parameter check passed for "semmni"
Kernel parameter check passed for "shmmax"
Kernel parameter check passed for "shmmni"
Kernel parameter check passed for "shmall"
Kernel parameter check passed for "file-max"
Kernel parameter check passed for "ip_local_port_range"
Kernel parameter check passed for "rmem_default"
Kernel parameter check passed for "rmem_max"
Kernel parameter check passed for "wmem_default"
Kernel parameter check passed for "wmem_max"
Kernel parameter check passed for "aio-max-nr"
Package existence check passed for "binutils"
Package existence check passed for "compat-libcap1"
Package existence check passed for "compat-libstdc++-33(x86_64)"
Package existence check passed for "libgcc(x86_64)"
Package existence check passed for "libstdc++(x86_64)"
Package existence check passed for "libstdc++-devel(x86_64)"
Package existence check passed for "sysstat"
Package existence check passed for "gcc"
Package existence check passed for "gcc-c++"
Package existence check passed for "ksh"
Package existence check passed for "make"
Package existence check passed for "glibc(x86_64)"
Package existence check passed for "glibc-devel(x86_64)"
Package existence check passed for "libaio(x86_64)"
Package existence check passed for "libaio-devel(x86_64)"
Check for multiple users with UID value 0 passed
Current group ID check passed

Starting check for consistency of primary group of root user

Check for consistency of root user's primary group passed
Default user file creation mask check passed

Checking CRS integrity...

Clusterware version consistency passed.

CRS integrity check passed

Checking Cluster manager integrity...


Checking CSS daemon...
Oracle Cluster Synchronization Services appear to be online.

Cluster manager integrity check passed


Checking node application existence...

Checking existence of VIP node application (required)
VIP node application check passed

Checking existence of NETWORK node application (required)
NETWORK node application check passed

Checking existence of ONS node application (optional)
ONS node application check passed


Checking if Clusterware is installed on all nodes...
Check of Clusterware install passed

Checking if CTSS Resource is running on all nodes...
CTSS resource check passed


Querying CTSS for time offset on all nodes...
Query of CTSS for time offset passed

Check CTSS state started...
CTSS is in Active state. Proceeding with check of clock time offsets on all nodes...
Check of clock time offsets passed


Oracle Cluster Time Synchronization Services check passed
Checking integrity of file "/etc/resolv.conf" across nodes

"domain" and "search" entries do not coexist in any "/etc/resolv.conf" file
All nodes have same "search" order defined in file "/etc/resolv.conf"
The DNS response time for an unreachable node is within acceptable limit on all nodes

Check for integrity of file "/etc/resolv.conf" passed

Time zone consistency check passed

Checking Single Client Access Name (SCAN)...

Checking TCP connectivity to SCAN Listeners...
TCP connectivity to SCAN Listeners exists on all cluster nodes

Checking name resolution setup for "rhel6m-scan"...

Checking integrity of name service switch configuration file "/etc/nsswitch.conf" ...
All nodes have same "hosts" entry defined in file "/etc/nsswitch.conf"
Check for integrity of name service switch configuration file "/etc/nsswitch.conf" passed


Checking SCAN IP addresses...
Check of SCAN IP addresses passed

Verification of SCAN VIP and Listener setup passed
Checking VIP configuration.
Checking VIP Subnet configuration.
Check for VIP Subnet configuration passed.
Checking VIP reachability
Check for VIP reachability passed.
Checking stale database schema statistics...
PRVG-11143 : The following error occurred during stale database schema statistics check.
PRVG-11115 : Following error occurred while establishing connection to database "std11g2"
PRCQ-1000 : An error occurred while establishing connection to database with user name "system" and connect descriptor:
(DESCRIPTION = (LOAD_BALANCE=on) (ADDRESS = (PROTOCOL = TCP)(HOST = rhel6m-scan)(PORT = null)) (CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = std11g2)))
IO Error: The Network Adapter could not establish the connection


ASM and CRS versions are compatible
Database Clusterware version compatibility passed.
OS user consistency check for upgrade successful


NOTE:
No fixable verification failures to fix

Pre-check for database installation was unsuccessful.
Checks did not pass for the following node(s):
std11g2
The cluvfy ask for database username to check stale database schema statistics but the connection description has null value for port. This is similar to what was seen after changing the listener and scan listener names. So this was ignored and all other pre-reqs were successful.
Oracle has introduced several OS user group for further job role separation (for backup, data guard broker and key management). If these to be used then these groups could be created before the 12c software is installed.
[root@rhel6m1 ~]# id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),503(oper),506(asmdba)
[root@rhel6m1 ~]# groupadd backupdba
[root@rhel6m1 ~]# groupadd dgdba
[root@rhel6m1 ~]# groupadd kmdba
[root@rhel6m1 ~]# usermod -g oinstall -G dba,oper,asmdba,backupdba,dgdba,kmdba oracle
[root@rhel6m1 ~]# id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),503(oper),506(asmdba),508(backupdba),509(dgdba),510(kmdba)
As 12c RAC upgrade is an out of place upgrade there's no down time on the database.




Execute runInstaller to start the installation/upgrade of RAC.

Once the software is installed copy the COST related files (sqlnet.ora and if desired tnsnames.ora) to new Oracle Home so when the database is upgraded from the new home it is able to register with the listeners.
This concludes the 11gR2 to 12c RAC software upgrade, the remaining step is to upgrade the database.

Related Post
Upgrading from 11gR2 (11.2.0.3) to 12c (12.1.0.1) Grid Infrastructure

Upgrading 11.2.0.3 Database to 12.1.0.1 Using DBUA

$
0
0
After upgrading grid infrastructure and RAC software next step is to upgrade the actual database. This could be done manually or using DBUA. There are several metalink notes (listed at the end of the post) that list comprehensive set of instructions for database upgrades. It's advisable to go through them before upgrading any production system, this post only list highlights and few issues encountered along the way.
Although the 12c installation has the utlu121i.sql script it's been depreciated. Running this would give the following output listing the correct script to run.
SQL> @utlu121i.sql
DOC>############################################################################
DOC>############################################################################
DOC>
DOC>
DOC>Note that the new preupgrd.sql script replaces the utlu121i.sql script
DOC> and earlier versions of the Pre-Upgrade Information Tool.
DOC>
DOC> The Pre-Upgrade Information Tool, which now consists of preupgrd.sql
DOC> and utluppkg.sql.
DOC>
DOC> 1. Make sure preupgrd.sql and utluppkg.sql (located in the admin
DOC> directory of the new installation of Oracle Database 12.1) are
DOC> accessible while connected to your source database, which is the
DOC> database to be upgraded
DOC>
DOC> 2. Connect to your source database using an account with DBA privileges
DOC> and execute the preupgrd.sql script.
DOC>
DOC> For more information on the Pre-Upgrade Information Tool, see the
DOC> Oracle Database Upgrade Guide.
DOC>
DOC>
DOC>############################################################################
DOC>############################################################################
DOC>#
Running the new preupgrd.sql will generate three files in $ORACLE_BASE/cfgtoollogs/DB_NAME/preupgrade directory.
@preupgrd.sql
Results of the checks are located at:
/opt/app/oracle/cfgtoollogs/std11g2/preupgrade/preupgrade.log

Pre-Upgrade Fixup Script (run in source database environment):
/opt/app/oracle/cfgtoollogs/std11g2/preupgrade/preupgrade_fixups.sql

Post-Upgrade Fixup Script (run shortly after upgrade):
/opt/app/oracle/cfgtoollogs/std11g2/preupgrade/postupgrade_fixups.sql
The log file will have the recommendation and warnings.
cat preupgrade.log

************************************************************

Fixup scripts must be reviewed prior to being executed.

************************************************************

************************************************************
====>> USER ACTION REQUIRED <<====
************************************************************

The following are *** ERROR LEVEL CONDITIONS *** that must be addressed
prior to attempting your upgrade.
Failure to do so will result in a failed upgrade.

You MUST resolve the above errors prior to upgrade

************************************************************



[oracle@rhel6m1 admin]$ cat /opt/app/oracle/cfgtoollogs/std11g2/preupgrade/preupgrade.log
Oracle Database Pre-Upgrade Information Tool 07-16-2013 11:25:22
Script Version: 12.1.0.1.0 Build: 006
**********************************************************************
Database Name: STD11G2
Version: 11.2.0.3.0
Compatible: 11.2.0.0.0
Blocksize: 8192
Platform: Linux x86 64-bit
Timezone file: V14
**********************************************************************
[Renamed Parameters]
[No Renamed Parameters in use]
**********************************************************************
**********************************************************************
[Obsolete/Deprecated Parameters]
[No Obsolete or Desupported Parameters in use]
**********************************************************************
[Component List]
**********************************************************************
--> Oracle Catalog Views [upgrade] VALID
--> Oracle Packages and Types [upgrade] VALID
--> JServer JAVA Virtual Machine [upgrade] VALID
--> Oracle XDK for Java [upgrade] VALID
--> Real Application Clusters [upgrade] VALID
--> Oracle Workspace Manager [upgrade] VALID
--> Oracle XML Database [upgrade] VALID
--> Oracle Java Packages [upgrade] VALID
--> Oracle Ultra Search [upgrade]
--> Expression Filter [upgrade] VALID
--> Rule Manager [upgrade] VALID
**********************************************************************
[Tablespaces]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
minimum required size: 944 MB
--> SYSAUX tablespace is adequate for the upgrade.
minimum required size: 572 MB
--> UNDOTBS1 tablespace is adequate for the upgrade.
minimum required size: 400 MB
--> TEMP tablespace is adequate for the upgrade.
minimum required size: 60 MB

[No adjustments recommended]

**********************************************************************
**********************************************************************
[Pre-Upgrade Checks]
**********************************************************************
INFORMATION: --> Older Timezone in use

Database is using a time zone file older than version 18.
After the upgrade, it is recommended that DBMS_DST package
be used to upgrade the 11.2.0.3.0 database time zone version
to the latest version which comes with the new release.
Please refer to My Oracle Support note number 977512.1 for details.


**********************************************************************
[Pre-Upgrade Recommendations]
**********************************************************************

*****************************************
********* Dictionary Statistics *********
*****************************************

Please gather dictionary statistics 24 hours prior to
upgrading the database.
To gather dictionary statistics execute the following command
while connected as SYSDBA:
EXECUTE dbms_stats.gather_dictionary_stats;

^^^ MANUAL ACTION SUGGESTED ^^^

**********************************************************************
[Post-Upgrade Recommendations]
**********************************************************************

*****************************************
******** Fixed Object Statistics ********
*****************************************

Please create stats on fixed objects two weeks
after the upgrade using the command:
EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;

^^^ MANUAL ACTION SUGGESTED ^^^

**********************************************************************
************ Summary ************

0 ERRORS exist in your database.
0 WARNINGS exist in your database.
1 INFORMATIONAL message that should be reviewed prior to your upgrade.

After your database is upgraded and open in normal mode you must run
rdbms/admin/catuppst.sql which executes several required tasks and completes
the upgrade process.

You should follow that with the execution of rdbms/admin/utlrp.sql, and a
comparison of invalid objects before and after the upgrade using
rdbms/admin/utluiobj.sql

If needed you may want to upgrade your timezone data using the process
described in My Oracle Support note 977512.1
***********************************
Run the pre-upgrade script to fix any errors and warnings.
Timezone upgrade is another thing that must be considered during the upgrade. When upgrading from 11.2.0.3 and if current time zone is less than 18 then timezone must be upgraded after the database is upgraded (or could be done using DBUA). Metalink notes 1509653.1 and 1522719.1 has useful information for this upgrade path. Current timezone settings are
SQL> SELECT version FROM v$timezone_file;
14

SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
2 FROM DATABASE_PROPERTIES
3 WHERE PROPERTY_NAME LIKE 'DST_%'
4 ORDER BY PROPERTY_NAME;
DST_PRIMARY_TT_VERSION 14
DST_SECONDARY_TT_VERSION 0
DST_UPGRADE_STATE NONE
As mentioned in the grid infrastructure upgrade in this environment the listener name has been changed. But the DBUA still looks for listener with default name and without it cannot proceed any further (ignoring this didn't help either).

To fix this add a listener with default name "LISTENER" and start it
[grid@rhel6m1 admin]$ srvctl add listener -listener listener -p 1521
[grid@rhel6m1 admin]$ srvctl start listener -l listener
[grid@rhel6m1 admin]$ lsnrctl status

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.1.0 - Production
Start Date 16-JUL-2013 11:46:56
..
Listener Parameter File /opt/app/12.1.0/grid/network/admin/listener.ora
Listener Log File /opt/app/oracle/diag/tnslsnr/rhel6m1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.93)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.97)(PORT=1521)))
The listener supports no services
The command completed successfully
The database is standard edition database and there's no Oracle text component on it (see registry components above). However during the upgrade following warning occurs.

It was possible to ignore this warning and complete the upgrade. Oracle confirmed this when an SR was raised saying "Please proceed with the upgrade ignoring the ctxsys.ctx_adm must be declared warning as Oracle Text is not being used."
Another issue encountered was spfile being referred directly instead via alias. In the init.ora files it had
SPFILE='+DATA/STD11G2/PARAMETERFILE/spfile.257.806251953'               # line added by Agent
and database config also had the
[oracle@rhel6m1 ~]$ srvctl config database -d std11g2
Database unique name: std11g2
Database name: std11g2
Oracle home: /opt/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/STD11G2/PARAMETERFILE/spfile.257.806251953
During the upgrade the DBUA creates a temporary init file in $ORACLE_HOME/dbs and use that to start the upgrade process and later reverting back to spfile. However when it does that following error happens.

Clicking OK would continue but later again fail with following

With this spfile location could be lost and DBUA would be unable to start the database at the end of the upgrade.
To fix this the spfile references were made via an alias.
[oracle@rhel6m1 ~]$ srvctl config database -d std11g2
Database unique name: std11g2
Database name:
Oracle home: /opt/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/STD11G2/spfilestd11g2.ora
How to make an alias for spfile is mentioned in this earlier post.
After these issues were done it was possible to complete upgrade without any further problems.


Once the preupgrade steps are completed, unset ORACLE_HOME and remove from PATH references to old (11.2) oracle home and start the upgrade with DBUA.

View activity log from within DBUA

Once the progress reaches 100% click on the upgrade result button.

Run the post-upgrade script generated earlier and remove the default listener created earlier.
Also check the timezone has been upgraded
SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
2 FROM DATABASE_PROPERTIES
3 WHERE PROPERTY_NAME LIKE 'DST_%'
4 ORDER BY PROPERTY_NAME;

PROPERTY_NAME VALUE
------------------------- --------
DST_PRIMARY_TT_VERSION 18
DST_SECONDARY_TT_VERSION 0
DST_UPGRADE_STATE NONE

SQL> SELECT VERSION FROM v$timezone_file;

VERSION
----------
18

SQL> select TZ_VERSION from registry$database;

TZ_VERSION
----------
14
If timezone_file value and value shown in database registry differ then registry could be updated(as per 1509653.1)
SQL> update registry$database set TZ_VERSION = (select version FROM v$timezone_file);

1 row updated.

SQL> commit;

Commit complete.

SQL> select TZ_VERSION from registry$database;

TZ_VERSION
----------
18
Also the remote listener setting had been reverted back to TCP port instead of the TCPS port setup as part of COST
remote_listener  string   rhel6m-scan:9120
Change it back to use TCPS with SCAN IPs
Useful metalink notes
Oracle Database 12c Release 1 (12.1) DBUA in Silent mode [ID 1516616.1]
Oracle Database 12c Release 1 (12.1) Upgrade New Features [ID 1515747.1]
Complete Checklist for Upgrading to Oracle Database 12c Release 1 using DBUA [ID 1516557.1]
Complete Checklist for Manual Upgrades to Oracle Database 12c Release 1 (12.1) [ID 1503653.1]
Updating the RDBMS DST version in 12c Release 1 (12.1.0.1 and up) using DBMS_DST [ID 1509653.1]
Oracle Database 12c Release 1 (12.1) DBUA : Understanding New Changes With All New 12.1 DBUA [ID 1493645.1]

Related Posts
Upgrading from 11.2.0.3 to 12.1.0.1 RAC
Upgrading from 11gR2 (11.2.0.3) to 12c (12.1.0.1) Grid Infrastructure

Connect Through - Connect Without Knowing the Password

$
0
0
At times it may be necessary to grant access to a database schema but not necessarily give the password for the login. Granting connect through comes useful in such cases. Below example demonstrate the usage. Assume user appadmin is the main application user and appguest user whom access to appadmin schema will be granted.
SQL> create user appadmin identified by appadmin;
User created.

SQL> create user appguest identified by appguest;
User created.

SQL> grant connect to appadmin;
Grant succeeded.

SQL> grant connect to appguest;
Grant succeeded.
Grant appguest connect through as appadmin
SQL> alter user appadmin grant connect through appguest;
User altered.
With this command user appguest would be able to connect to appadmin without specifiying appadmin password.
SQL>  conn appguest[appadmin]/appguest
Connected.
SQL> show user
USER is "APPADMIN"
Password specified above is the password of the appguest user and the connected schema is the appadmin schema.




For JDBC proxy connections refer the following metalink notes.
How to use Proxy Users to connect to a Database using Credential Mapping or User Injection. [1529978.1]
How to Ensure USER Session Variable Accurately Reflects "real" User When Using Proxy Authentication with JDBC [431202.1]

java.sql.SQLException: Could not commit with auto-commit set on When Using 12c JDBC Driver

$
0
0
When a jdbc connection is checked out the data pool it's auto commit status is true. When using the 12c driver calling commit on a connection that has auto commit true will result in following exception thrown on the client side
java.sql.SQLException: Could not commit with auto-commit set on
at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4439)
at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4486)
Even though the exception is thrown the SQL will get executed. Same however would execute without any error when jdbc driver 11.2 is used. Below java code demonstrate the test case.
public static void main(String[] args) {
try {
OracleDataSource ds = new OracleDataSource();
ds.setUser("asanga");
ds.setPassword("asa");
ds.setURL("jdbc:oracle:thin:@192.168.0.93:9120:std11g21");

Connection con = ds.getConnection();

// con.setAutoCommit(false);
System.out.println("Auto commit status : " + con.getAutoCommit());
DatabaseMetaData meta = con.getMetaData();

System.out.println("Driver Name " + meta.getDriverName());
System.out.println("Driver Version " + meta.getDriverVersion());
System.out.println("Driver Major Version " + meta.getDriverMajorVersion());
System.out.println("Driver Minor Version " + meta.getDriverMinorVersion());
System.out.println("Database Major Version " + meta.getDatabaseMajorVersion());
System.out.println("Database Minor Version " + meta.getDatabaseMinorVersion());
PreparedStatement pr = con.prepareStatement("insert into x values(?)");
pr.setInt(1, 10);
pr.execute();
pr.close();
con.commit();

} catch (Exception ex) {
ex.printStackTrace();
}
}
Running with 12c Driver the the following output is seen on the client side and querying the table X will show a new row has been inserted successfully.
Auto commit status : true
Driver Name Oracle JDBC driver
Driver Version 12.1.0.1.0
Driver Major Version 12
Driver Minor Version 1
Database Major Version 12
Database Minor Version 1
java.sql.SQLException: Could not commit with auto-commit set on
at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4439)
at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4486)
However running with 11.2 driver doesn't give any exception
Auto commit status : true
Driver Name Oracle JDBC driver
Driver Version 11.2.0.3.0
Driver Major Version 11
Driver Minor Version 2
Database Major Version 12
Database Minor Version 1
One way to overcome the issue is to set auto commit false once the connection is checked out of the pool or not calling the commit. However for application where source code is not accessible upgrading to 12c driver could be problematic. According to Oracle this referrers to bug 15891607 which is not a bug but expected behavior. Sure enough the APIs also says the same that calling commit on a connection object with auto commit set true will cause an exception JDK 7 API and JDK 6 API. However this wasn't observed when the code is run so moving to 12c driver from 11g may require code changes in certain cases.


Converting 11gR2 RAC from Standard Edition to Enterprise Edition

$
0
0
The existing system is a 11gR2 (11.2.0.3.7) Standard Edition (SE) RAC with role separation on RHEL 6. The blog post lists the steps for converting the SE RAC to Enterprise Edition (EE) RAC. The SE home is dbhome_1 and EE home is dbhome_2.
1.Take a full backup of the database as precaution in case have to revert back to the standard edition setup again.
2. Since the database home will be updated in the OCR take a backup of the OCR and also take copies of backup files created automatically from all cluster nodes.
[root@rhel6m1 grid]# ocrconfig -manualbackup
rhel6m2 2013/08/14 14:57:27 /opt/app/11.2.0/grid/cdata/rhel6m-cluster/backup_20130814_145727.ocr
3. Get the status of registry components, so validity of these components could be compared before and after the conversion. There are no invalid components before the conversion.
SQL> select comp_id,comp_name,version,status,schema from dba_registry;

COMP_ID COMP_NAME VERSION STATUS SCHEMA
-------- ---------------------------------------- ------------------------------ ------ ------
XDB Oracle XML Database 11.2.0.3.0 VALID XDB
OWM Oracle Workspace Manager 11.2.0.3.0 VALID WMSYS
EXF Oracle Expression Filter 11.2.0.3.0 VALID EXFSYS
RUL Oracle Rules Manager 11.2.0.3.0 VALID EXFSYS
CATALOG Oracle Database Catalog Views 11.2.0.3.0 VALID SYS
CATPROC Oracle Database Packages and Types 11.2.0.3.0 VALID SYS
JAVAVM JServer JAVA Virtual Machine 11.2.0.3.0 VALID SYS
XML Oracle XDK 11.2.0.3.0 VALID SYS
CATJAVA Oracle Database Java Packages 11.2.0.3.0 VALID SYS
RAC Oracle Real Application Clusters 11.2.0.3.0 VALID SYS

10 rows selected.
4. Find out the patch levels on SE Oracle Home and GI Home. Once the EE is installed and before moving the DB to EE home it must be patched to the same level as the SE Home and not to a higher level than the GI home. The current patches on SE home are
[oracle@rhel6m1 ~]$ /opt/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch lsinventory -local | grep Patch
Oracle Interim Patch Installer version 11.2.0.3.4
OPatch version : 11.2.0.3.4
Patch 16619892 : applied on Wed Jul 31 13:43:23 BST 2013
Unique Patch ID: 16346737
Patch description: "Database Patch Set Update : 11.2.0.3.7 (16619892)"
Sub-patch 16056266; "Database Patch Set Update : 11.2.0.3.6 (16056266)"
Sub-patch 14727310; "Database Patch Set Update : 11.2.0.3.5 (14727310)"
Sub-patch 14275605; "Database Patch Set Update : 11.2.0.3.4 (14275605)"
Sub-patch 13923374; "Database Patch Set Update : 11.2.0.3.3 (13923374)"
Sub-patch 13696216; "Database Patch Set Update : 11.2.0.3.2 (13696216)"
Sub-patch 13343438; "Database Patch Set Update : 11.2.0.3.1 (13343438)"
Patch 16619898 : applied on Wed Jul 31 13:42:07 BST 2013
Unique Patch ID: 16376391
Patch description: "Grid Infrastructure Patch Set Update : 11.2.0.3.7 (16742216)"
OPatch succeeded.
Patches on GI home are
[grid@rhel6m1 ~]$ /opt/app/11.2.0/grid/OPatch/opatch lsinventory -local | grep Patch
Oracle Interim Patch Installer version 11.2.0.3.4
OPatch version : 11.2.0.3.4
Patch 16619892 : applied on Wed Jul 31 13:54:30 BST 2013
Unique Patch ID: 16346737
Patch description: "Database Patch Set Update : 11.2.0.3.7 (16619892)"
Sub-patch 16056266; "Database Patch Set Update : 11.2.0.3.6 (16056266)"
Sub-patch 14727310; "Database Patch Set Update : 11.2.0.3.5 (14727310)"
Sub-patch 14275605; "Database Patch Set Update : 11.2.0.3.4 (14275605)"
Sub-patch 13923374; "Database Patch Set Update : 11.2.0.3.3 (13923374)"
Sub-patch 13696216; "Database Patch Set Update : 11.2.0.3.2 (13696216)"
Sub-patch 13343438; "Database Patch Set Update : 11.2.0.3.1 (13343438)"
Patch 16619898 : applied on Wed Jul 31 13:52:27 BST 2013
Unique Patch ID: 16376391
Patch description: "Grid Infrastructure Patch Set Update : 11.2.0.3.7 (16742216)"
OPatch succeeded.
5. Install the EE across the cluster.
Select install software only option.
Select all the nodes where SE was installed
Select Enterprise Edition
Give the EE home a new location (dbhome_2 where as SE is dbhome_1)
Summary Page

6. Copy init file, password file and sqlnet.ora file (if used for COST) to appropriate location in the new EE home.
[oracle@rhel6m2 ~]$ cd /opt/app/oracle/product/11.2.0/dbhome_2/dbs
[oracle@rhel6m2 dbs]$ cp /opt/app/oracle/product/11.2.0/dbhome_1/dbs/orapwstd11g22 .
[oracle@rhel6m2 dbs]$ cp /opt/app/oracle/product/11.2.0/dbhome_1/dbs/initstd11g22.ora .

[oracle@rhel6m2 ~]$ cd /opt/app/oracle/product/11.2.0/dbhome_2/network/admin
[oracle@rhel6m2 dbs]$ cp /opt/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora .
Make sure this is done on all the nodes.




7. Patch the newly installed EE home (refer Case 2.1 section of the metalink note 1494646.1). Use GI_Home to run the opatch auto to avoid the following
Invoking utility "saveconfigurationsnapshot"
UtilSession failed: This utility only be supported for GI home. Please specify the Oracle Home to the Grid Infrastructure (GI) Home "/opt/app/11.2.0/grid" by option -oh or set it in ORACLE_HOME environment variable
Following could be seen when patch is successfully applied.
/opt/app/11.2.0/grid/OPatch/opatch auto `pwd` -oh /opt/app/oracle/product/11.2.0/dbhome_2 -ocmrf ocm.rsp

Using configuration parameter file: /opt/app/11.2.0/grid/crs/install/crsconfig_params
patch /usr/local/patches/16619898/custom/server/16619898 apply successful for home /opt/app/oracle/product/11.2.0/dbhome_2
patch /usr/local/patches/16619892 apply successful for home /opt/app/oracle/product/11.2.0/dbhome_2
Compare the patch applied on EE home is same as SE home checked earlier on step 4
[oracle@rhel6m1 ~]$ $ORACLE_HOME/OPatch/opatch lsinventory -local -oh /opt/app/oracle/product/11.2.0/dbhome_2 | grep Patch
Oracle Interim Patch Installer version 11.2.0.3.4
OPatch version : 11.2.0.3.4
Patch 16619892 : applied on Thu Aug 15 10:34:09 BST 2013
Unique Patch ID: 16346737
Patch description: "Database Patch Set Update : 11.2.0.3.7 (16619892)"
Sub-patch 16056266; "Database Patch Set Update : 11.2.0.3.6 (16056266)"
Sub-patch 14727310; "Database Patch Set Update : 11.2.0.3.5 (14727310)"
Sub-patch 14275605; "Database Patch Set Update : 11.2.0.3.4 (14275605)"
Sub-patch 13923374; "Database Patch Set Update : 11.2.0.3.3 (13923374)"
Sub-patch 13696216; "Database Patch Set Update : 11.2.0.3.2 (13696216)"
Sub-patch 13343438; "Database Patch Set Update : 11.2.0.3.1 (13343438)"
Patch 16619898 : applied on Thu Aug 15 10:27:19 BST 2013
Unique Patch ID: 16376391
Patch description: "Grid Infrastructure Patch Set Update : 11.2.0.3.7 (16742216)"
OPatch succeeded.
8. Verify the oracle executable in the EE home has the correct permissions. The oracle executable permission in the SE home were
oracle@rhel6m1 bin]$ ls -l oracle*
-rwsr-s--x. 1 oracle asmadmin 220193582 Jul 31 13:44 oracle
-rwsr-s--x. 1 oracle asmadmin 220113336 Apr 23 17:37 oracleO
while the newly installed EE had the wrong group ownership.
[oracle@rhel6m1 bin]$ ls -l oracle*
-rwsr-s--x. 1 oracle oinstall 232617534 Aug 15 10:35 oracle
-rwsr-s--x. 1 oracle oinstall 232399041 Aug 14 15:45 oracleO
Having this wrong group permission could result in following error when starting the database with the EE home (output from alert log)
SUCCESS: diskgroup DATA was mounted
NOTE: dependency between database std11g2 and diskgroup resource ora.DATA.dg is established
Errors in file /opt/app/oracle/diag/rdbms/std11g2/std11g21/trace/std11g21_ora_24840.trc (incident=67209):
ORA-00600: internal error code, arguments: [kfioTranslateIO03], [], [], [], [], [], [], [], [], [], [], []
Incident details in: /opt/app/oracle/diag/rdbms/std11g2/std11g21/incident/incdir_67209/std11g21_ora_24840_i67209.trc
Use ADRCI or Support Workbench to package the incident.
ERROR: unrecoverable error ORA-600 raised in ASM I/O path; terminating process 24840
To fix the issue set correct ownerships on the oracle executable.
[grid@rhel6m1 ~]$ $GI_HOME/bin/setasmgidwrap o=/opt/app/oracle/product/11.2.0/dbhome_2/bin/oracle
[grid@rhel6m1 ~]$ $GI_HOME/bin/setasmgidwrap o=/opt/app/oracle/product/11.2.0/dbhome_2/bin/oracleO

[oracle@rhel6m1 bin]$ ls -l oracle*
-rwsr-s--x. 1 oracle asmadmin 232617534 Aug 15 10:35 oracle
-rwsr-s--x. 1 oracle asmadmin 232399041 Aug 14 15:45 oracleO
More on kfioTranslateIO03 is available on the metalink note ORA-00600 [kfioTranslateIO03] [17090] (Doc ID 1336846.1)
9. Stop all but one instance.
[oracle@rhel6m1 ~]$ srvctl stop instance -d std11g2 -i std11g22
10. Set cluster_database=false to start the database in exclusive mode in the next start up.
SQL> alter system set cluster_database=FALSE scope=spfile sid='*';
System altered.
Once the change is done stop the remaining instance as well.
11. Change the oracle home associated with the database in the OCR.
[oracle@rhel6m1 ~]$ srvctl config database -d std11g2
Database unique name: std11g2
Database name: std11g2
Oracle home: /opt/app/oracle/product/11.2.0/dbhome_1 <--- SE Home

[oracle@rhel6m1 ~]$ srvctl modify database -d std11g2 -o /opt/app/oracle/product/11.2.0/dbhome_2

[oracle@rhel6m1 ~]$ srvctl config database -d std11g2
Database unique name: std11g2
Database name: std11g2
Oracle home: /opt/app/oracle/product/11.2.0/dbhome_2 <--- EE Home
12. Change environment variables (eg. ORACLE_HOME, PATH values) to point to EE home and start the database in exclusive mode. Make sure sqlplus used is from EE home.
[oracle@rhel6m1 ~]$ which sqlplus
/opt/app/oracle/product/11.2.0/dbhome_2/bin/sqlplus

[oracle@rhel6m1 ~]$ sqlplus / as sysdba
SQL> startup
SQL> @?/rdbms/admin/catalog.sql
SQL> @?/rdbms/admin/catproc.sql
SQL> @?/rdbms/admin/utlrp
Monitor the alert log for any start up issues. Verify there are no object with errors or issues while compiling during the utrl execute.
SQL> select COUNT(DISTINCT(obj#)) "OBJECTS WITH ERRORS" from utl_recomp_errors;

OBJECTS WITH ERRORS
-------------------
0
1 row selected.

SQL> select COUNT(*) "ERRORS DURING RECOMPILATION" from utl_recomp_errors;

ERRORS DURING RECOMPILATION
---------------------------
0
1 row selected.
Also verify the registry component status
SQL> select comp_id,comp_name,version,status,schema from dba_registry;

COMP_ID COMP_NAME VERSION STATUS SCHEMA
---------- ---------------------------------------- ------------------------------ ---------- --------
XDB Oracle XML Database 11.2.0.3.0 VALID XDB
OWM Oracle Workspace Manager 11.2.0.3.0 VALID WMSYS
EXF Oracle Expression Filter 11.2.0.3.0 VALID EXFSYS
RUL Oracle Rules Manager 11.2.0.3.0 VALID EXFSYS
CATALOG Oracle Database Catalog Views 11.2.0.3.0 VALID SYS
CATPROC Oracle Database Packages and Types 11.2.0.3.0 VALID SYS
JAVAVM JServer JAVA Virtual Machine 11.2.0.3.0 VALID SYS
XML Oracle XDK 11.2.0.3.0 VALID SYS
CATJAVA Oracle Database Java Packages 11.2.0.3.0 VALID SYS
RAC Oracle Real Application Clusters 11.2.0.3.0 VALID SYS
Fix any issues that exists.
13. Set cluster_database to true and shutdown the instance.
SQL> alter system set cluster_database=true scope=spfile sid='*'; 
SQL> shutdown immediate;
Start all the instance using srvctl. Make sure using the srvctl from EE home
[oracle@rhel6m1 ~]$ which srvctl
/opt/app/oracle/product/11.2.0/dbhome_2/bin/srvctl

[oracle@rhel6m1 ~]$ srvctl start database -d std11g2
Once the db is started /etc/oratab will be upated with the new oracle home
std11g2:/opt/app/oracle/product/11.2.0/dbhome_2:N               # line added by Agent
14. Remove standard edition specific settings or configuration that are no longer needed. For example drop any triggers used for enabling use of stored outlines or scheduling of statspack snapshots.
15. If diagnostic and tuning pack license are available make sure it's set
SQL> show parameter control
control_management_pack_access string DIAGNOSTIC+TUNING
Also verify that AWR snapshots are taken each hour.
16. Use an EE option to verify EE is being used by the database. Easiest way is to create a bitmap index which only available with EE.
SQL> create bitmap index aidx on x(a);
Index created.
If it is on SE following error message will be shown
SQL> create bitmap index aidx on x(a);
create bitmap index aidx on x(a)
*
ERROR at line 1:
ORA-00439: feature not enabled: Bit-mapped indexes
17. Finally remove the old SE homes either using deinstall tool or detaching from inventory and deleting
$ORACLE_HOME/oui/bin/runInstaller -detachHome ORACLE_HOME=SE HOME
rm -rf SE HOME
Useful metalink notes
How to Convert Database from Standard to Enterprise Edition ? [117048.1]
Converting An Enterprise Edition Database To Standard Edition [139642.1]
How to Convert a RAC database from Standard Edition (SE) to Enterprise Edition (EE)? [451981.1]
Viewing all 315 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>