Thinking Out Loud

March 3, 2018

Upgrade 12.2 Journey – DataGuard

Filed under: 12.2,Dataguard,upgrade,Upgrade 12.2 Journey — mdinh @ 6:07 pm

Oracle Data Guard Broker Changes in Oracle Database 12c Release 2 (12.2.0.1)

How to resolve MRP stuck issues on a physical standby database? (Doc ID 1221163.1)
Starting from 12.2 use V$DATAGUARD_PROCESS view instead of v$managed_standby

October 9, 2017

Upgrade 12.2 Journey – Fixing MEMORY_TARGET

Filed under: Upgrade 12.2 Journey — mdinh @ 10:08 am

As it turns out, root cause for MEMORY_TARGET is due to configuration.

Setting SQL> alter system set memory_target=0 scope=spfile; was the initial work around, the better solution is to fix root cause.

From alert_+ASM.log

2017-10-09T11:50:19.746027+02:00
WARNING: You are trying to use the MEMORY_TARGET feature. 
This feature requires the /dev/shm file system to be mounted for at least 1073741824 bytes. 
/dev/shm is either not mounted or is mounted with available space less than this size. 
Please fix this so that MEMORY_TARGET can work as expected. 
Current available is 915083264 and used is 0 bytes. 
Ensure that the mount point is /dev/shm for this directory.

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

[oracle@db-asm-1 ~]$ df /dev/shm/
Filesystem     1K-blocks  Used Available Use% Mounted on
tmpfs             893636     0    893636   0% /dev/shm
[oracle@db-asm-1 ~]$

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

[oracle@db-asm-1 dinh]$ sqlplus / as sysasm

SQL*Plus: Release 12.2.0.1.0 Production on Mon Oct 9 11:48:44 2017

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> show parameter target

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
memory_max_target                    big integer 0
memory_target                        big integer 0
pga_aggregate_target                 big integer 10M
sga_target                           big integer 0
SQL> show parameter size

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_cache_size                        big integer 24M
large_pool_size                      big integer 12M
max_dump_file_size                   string      unlimited
parallel_execution_message_size      integer     16384
sga_max_size                         big integer 216M
shared_pool_reserved_size            big integer 8808038
shared_pool_size                     big integer 168M
sort_area_size                       integer     65536
unified_audit_sga_queue_size         integer     1048576
workarea_size_policy                 string      AUTO

SQL> alter system set memory_max_target=1G scope=spfile;

System altered.

SQL> shu immediate;
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup;
ORA-00845: MEMORY_TARGET not supported on this system
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
[oracle@db-asm-1 dinh]$

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

[root@db-asm-1 ~]# df -h /dev/shm/
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           873M     0  873M   0% /dev/shm
[root@db-asm-1 ~]# mount -o remount,size=2G /dev/shm
[root@db-asm-1 ~]# df -h /dev/shm/
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           2.0G     0  2.0G   0% /dev/shm
[root@db-asm-1 ~]# vi /etc/fstab
[root@db-asm-1 ~]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Mon Apr 24 10:50:55 2017
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=b33f8d74-4869-460a-9835-abcbf5e7fc19 /                       ext4    defaults        1 1
UUID=f6263370-a504-46e9-bb85-26e2400eafae swap                    swap    defaults        0 0
/root/swapfile                            swap                    swap    defaults        0 0
tmpfs                   /dev/shm          tmpfs defaults,size=2G        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/vgora/lvora /u01 ext4 defaults 1 2
[root@db-asm-1 ~]# mount -a
[root@db-asm-1 ~]#

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

[oracle@db-asm-1 dinh]$ sqlplus / as sysasm

SQL*Plus: Release 12.2.0.1.0 Production on Mon Oct 9 11:54:43 2017

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup;
ASM instance started

Total System Global Area 1073741824 bytes
Fixed Size                  8628936 bytes
Variable Size            1039947064 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted
SQL> show parameter target

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
memory_max_target                    big integer 1G
memory_target                        big integer 0
pga_aggregate_target                 big integer 10M
sga_target                           big integer 0
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
[oracle@db-asm-1 dinh]$
Advertisement

Upgrade 12.2 Journey – Troubleshooting FAILED GRID Upgrade from 11.2.0.4 to 12.2.0.1

Filed under: Upgrade 12.2 Journey — mdinh @ 1:41 am

First, I am very thankful to all the bloggers out there.
It would have been nearly impossible to find resolution on one’s own.

ASM not starting with ORA-00845 – how to fix ASM parameter file

One issue after GI upgrade

Solution


[oracle@db-asm-1 ~]$ . oraenv <<< +ASM 
ORACLE_SID = [+ASM] ? The Oracle base remains unchanged with value /u01/app/oracle 

[oracle@db-asm-1 ~]$ sqlplus / as sysasm 
SQL*Plus: Release 12.2.0.1.0 Production on Mon Oct 9 01:47:54 2017 
Copyright (c) 1982, 2016, Oracle. All rights reserved. 
Connected to an idle instance. 

SQL> startup;
ORA-00845: MEMORY_TARGET not supported on this system
SQL> exit
Disconnected
[oracle@db-asm-1 ~]$

--- Find spfile.
[oracle@db-asm-1 ~]$ crsctl stat res ora.asm -p | egrep "ASM_DISKSTRING|SPFILE"
ASM_DISKSTRING=/dev/oracle/*
SPFILE=+CRS/asm/asmparameterfile/registry.253.956854045

--- Create pfile to start +ASM with MEMORY_TARGET=0.
[oracle@db-asm-1 ~]$ cat /tmp/initASM.ora
SPFILE=+CRS/asm/asmparameterfile/registry.253.956854045
MEMORY_TARGET=0
_asm_compatibility='11.2.0.4.0'

--- Mount CRS DG in restricted mode to modify 'compatible.asm'='11.2.0.4.0'.
[oracle@db-asm-1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 12.2.0.1.0 Production on Mon Oct 9 02:47:09 2017

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup pfile=/tmp/initASM.ora
ASM instance started

Total System Global Area  226492416 bytes
Fixed Size                  8619064 bytes
Variable Size             192707528 bytes
ASM Cache                  25165824 bytes
ORA-15032: not all alterations performed
ORA-59303: The attribute compatible.asm (11.2.0.0.0) of the diskgroup being
mounted should be 11.2.0.2.0 or higher.

SQL> alter diskgroup CRS mount restricted;

Diskgroup altered.

SQL> alter diskgroup CRS set attribute 'compatible.asm'='11.2.0.4.0';

Diskgroup altered.

SQL> alter diskgroup CRS dismount;
alter diskgroup CRS dismount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15027: active use of diskgroup "CRS" precludes its dismount

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

[oracle@db-asm-1 ~]$ asmcmd lsdg
State       Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
RESTRICTED  EXTERN  N         512             512   4096  4194304     10236    10148                0           10148              0             N  CRS/
MOUNTED     EXTERN  N         512             512   4096  4194304     20472    18612                0           18612              0             N  DATA/
MOUNTED     EXTERN  N         512             512   4096  4194304     30708    30264                0           30264              0             N  FRA/

--- Restart +ASM since DG was not able to dismount.
[oracle@db-asm-1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 12.2.0.1.0 Production on Mon Oct 9 02:43:59 2017

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +CRS/asm/asmparameterfile/regi
                                                 stry.253.956854045
SQL> shut abort;
ASM instance shutdown

SQL> startup pfile=/tmp/initASM.ora
ASM instance started

Total System Global Area  226492416 bytes
Fixed Size                  8619064 bytes
Variable Size             192707528 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

[oracle@db-asm-1 ~]$ asmcmd lsdg
State    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512             512   4096  4194304     10236    10148                0           10148              0             N  CRS/
MOUNTED  EXTERN  N         512             512   4096  4194304     20472    18612                0           18612              0             N  DATA/
MOUNTED  EXTERN  N         512             512   4096  4194304     30708    30264                0           30264              0             N  FRA/

--- Set memory_target=0 for spfile and restart ASM.
[oracle@db-asm-1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 12.2.0.1.0 Production on Mon Oct 9 02:47:09 2017

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> alter system set memory_target=0 scope=spfile;

System altered.

SQL> shu abort;
ASM instance shutdown
SQL> startup;
ASM instance started

Total System Global Area  226492416 bytes
Fixed Size                  8619064 bytes
Variable Size             192707528 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted
SQL> show parameter target

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
memory_max_target                    big integer 0
memory_target                        big integer 0
pga_aggregate_target                 big integer 10M
sga_target                           big integer 0
SQL> show parameter disk

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
asm_diskgroups                       string      DATA, FRA, CRS
asm_diskstring                       string      /dev/oracle/*
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

[oracle@db-asm-1 ~]$ asmcmd lsattr -G CRS -l
Name                     Value
access_control.enabled   FALSE
access_control.umask     066
au_size                  4194304
cell.smart_scan_capable  FALSE
compatible.asm           11.2.0.4.0
compatible.rdbms         10.1.0.0.0
content.type             data
disk_repair_time         3.6h
idp.boundary             auto
idp.type                 dynamic
sector_size              512
[oracle@db-asm-1 ~]$

[oracle@db-asm-1 ~]$ . oraenv <<< orclcdb
ORACLE_SID = [+ASM] ?
The Oracle base remains unchanged with value /u01/app/oracle

[oracle@db-asm-1 ~]$ srvctl status database -d orclcdb
Database is running.
[oracle@db-asm-1 ~]$

[oracle@db-asm-1 ~]$ . oraenv <<< +ASM
ORACLE_SID = [+ASM] ? The Oracle base remains unchanged with value /u01/app/oracle
[oracle@db-asm-1 ~]$ echo $ORACLE_HOME
/u01/app/12.2.0.1/grid
[oracle@db-asm-1 ~]$ export GRID_HOME=$ORACLE_HOME
[oracle@db-asm-1 ~]$ $GRID_HOME/OPatch/opatch lspatches
There are no Interim patches installed in this Oracle Home "/u01/app/12.2.0.1/grid".

OPatch succeeded.

[oracle@db-asm-1 ~]$ $GRID_HOME/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.6
Copyright (c) 2017, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/12.2.0.1/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/12.2.0.1/grid/oraInst.loc
OPatch version    : 12.2.0.1.6
OUI version       : 12.2.0.1.4
Log file location : /u01/app/12.2.0.1/grid/cfgtoollogs/opatch/opatch2017-10-09_03-36-17AM_1.log

Lsinventory Output file location : /u01/app/12.2.0.1/grid/cfgtoollogs/opatch/lsinv/lsinventory2017-10-09_03-36-17AM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: db-asm-1.internal.lab
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1):

Oracle Grid Infrastructure 12c                                       12.2.0.1.0
There are 1 products installed in this Oracle Home.


There are no Interim patches installed in this Oracle Home.


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

OPatch succeeded.
[oracle@db-asm-1 ~]$

[oracle@db-asm-1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.CRS.dg
               ONLINE  ONLINE       db-asm-1                 STABLE
ora.DATA.dg
               ONLINE  ONLINE       db-asm-1                 STABLE
ora.FRA.dg
               ONLINE  ONLINE       db-asm-1                 STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       db-asm-1                 STABLE
ora.asm
               ONLINE  ONLINE       db-asm-1                 STABLE
ora.ons
               OFFLINE OFFLINE      db-asm-1                 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       db-asm-1                 STABLE
ora.diskmon
      1        OFFLINE OFFLINE                               STABLE
ora.evmd
      1        ONLINE  ONLINE       db-asm-1                 STABLE
ora.orclcdb.db
      1        ONLINE  ONLINE       db-asm-1                 Open,HOME=/u01/app/o
                                                             racle/11.2.0.4/db1,S
                                                             TABLE
--------------------------------------------------------------------------------
[oracle@db-asm-1 ~]$

Q.E.D.

Upgrade 12.2 Journey – Failed GRID Upgrade from 11.2.0.4 to 12.2.0.1

Filed under: Upgrade 12.2 Journey — mdinh @ 12:05 am

Oracle Restart Upgrade Failed simply because CRS diskgroup is OFFLINE.

ora.CRS.dg
               OFFLINE OFFLINE      db-asm-1                 STABLE

Resolution coming up.

Upgrade Log

[oracle@db-asm-1 ~]$ crsctl query has releaseversion
Oracle High Availability Services release version on the local node is [11.2.0.4.0]

[oracle@db-asm-1 ~]$ crsctl query has softwareversion
Oracle High Availability Services version on the local node is [11.2.0.4.0]
[oracle@db-asm-1 ~]$

00:58:42 SYS @ +ASM:>show parameter pfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +CRS/asm/asmparameterfile/regi
                                                 stry.253.956854045
00:58:47 SYS @ +ASM:>show parameter disk

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
asm_diskgroups                       string      DATA, FRA
asm_diskstring                       string      /dev/oracle/*
00:58:52 SYS @ +ASM:>

[oracle@db-asm-1 ~]$ srvctl config asm
ASM home: /u01/app/oracle/11.2.0.4/grid
ASM listener: LISTENER
Spfile: +CRS/asm/asmparameterfile/registry.253.956854045
ASM diskgroup discovery string: /dev/oracle/*

[oracle@db-asm-1 ~]$ asmcmd lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  4194304     10236    10148                0           10148              0             N  CRS/
MOUNTED  EXTERN  N         512   4096  4194304     20472    18612                0           18612              0             N  DATA/
MOUNTED  EXTERN  N         512   4096  4194304     30708    30264                0           30264              0             N  FRA/
[oracle@db-asm-1 ~]$

[oracle@db-asm-1 ~]$ env|egrep -i 'oracle|home'
USER=oracle
LD_LIBRARY_PATH=/u01/app/oracle/11.2.0.4/grid/lib
ORACLE_SID=+ASM
ORACLE_BASE=/u01/app/oracle
MAIL=/var/spool/mail/oracle
PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin:/u01/app/oracle/11.2.0.4/grid/bin
PWD=/home/oracle
HOME=/home/oracle
GRID_HOME=/u01/app/oracle/11.2.0.4/grid
LOGNAME=oracle
LOG=/u01/app/oracle/cfgtoollogs/catbundle/catbundle_PSU_ORCLCDB_APPLY_2017Oct08_21_41_02.log
ORACLE_HOME=/u01/app/oracle/11.2.0.4/grid
[oracle@db-asm-1 ~]$ unset ORACLE_SID ORACLE_BASE GRID_HOME ORACLE_HOME
[oracle@db-asm-1 ~]$ env|egrep -i 'oracle|home'
USER=oracle
LD_LIBRARY_PATH=/u01/app/oracle/11.2.0.4/grid/lib
MAIL=/var/spool/mail/oracle
PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin:/u01/app/oracle/11.2.0.4/grid/bin
PWD=/home/oracle
HOME=/home/oracle
LOGNAME=oracle
LOG=/u01/app/oracle/cfgtoollogs/catbundle/catbundle_PSU_ORCLCDB_APPLY_2017Oct08_21_41_02.log
[oracle@db-asm-1 ~]$

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

[oracle@db-asm-1 ~]$ cd /u01/app/12.2.0.1/grid/
[oracle@db-asm-1 grid]$ ./gridSetup.sh -silent -waitforcompletion -skipPrereqs -responseFile /u01/app/12.2.0.1/grid/install/response/grid_upgrade.rsp
Launching Oracle Grid Infrastructure Setup Wizard...

[WARNING] [INS-40436] Installer has detected an earlier version of Oracle Automatic Storage Management (ASM) Instance configured. Before proceeding with the upgrade you must shutdown all Oracle Databases that are using Oracle ASM for storage.

You may ignore this message and continue with the upgrade, if the database(s) are already in shutdown state.
[WARNING] [INS-41808] Possible invalid choice for OSASM Group.
   CAUSE: The name of the group you selected for the OSASM group is commonly used to grant other system privileges (For example: asmdba, asmoper, dba, oper).
   ACTION: Oracle recommends that you designate asmadmin as the OSASM group.
[WARNING] [INS-41809] Possible invalid choice for OSDBA Group.
   CAUSE: The group name you selected as the OSDBA for ASM group is commonly used for Oracle Database administrator privileges.
   ACTION: Oracle recommends that you designate asmdba as the OSDBA for ASM group, and that the group should not be the same group as an Oracle Database OSDBA group.
[WARNING] [INS-41810] Possible invalid choice for OSOPER Group.
   CAUSE: The group name you selected as the OSOPER for ASM group is commonly used for Oracle Database administrator privileges.
   ACTION: Oracle recommends that you designate asmoper as the OSOPER for ASM group, and that the group should not be the same group as an Oracle Database OSOPER group.
[WARNING] [INS-41812] OSDBA and OSASM are the same OS group.
   CAUSE: The chosen values for OSDBA group and the chosen value for OSASM group are the same.
   ACTION: Select an OS group that is unique for ASM administrators. The OSASM group should not be the same as the OS groups that grant privileges for Oracle ASM access, or for database administration.
[WARNING] [INS-32018] The selected Oracle home is outside of Oracle base.
   ACTION: Oracle recommends installing Oracle software within the Oracle base directory. Adjust the Oracle home or Oracle base accordingly.
You can find the log of this install session at:
 /u01/app/oraInventory/logs/GridSetupActions2017-10-09_01-03-02AM/gridSetupActions2017-10-09_01-03-02AM.log

As a root user, execute the following script(s):
        1. /u01/app/12.2.0.1/grid/rootupgrade.sh

Execute /u01/app/12.2.0.1/grid/rootupgrade.sh on the following nodes:
[db-asm-1]

Successfully Setup Software.
As install user, execute the following command to complete the configuration.
        /u01/app/12.2.0.1/grid/gridSetup.sh -executeConfigTools -responseFile /u01/app/12.2.0.1/grid/install/response/grid_upgrade.rsp [-silent]

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++        

[oracle@db-asm-1 grid]$ ps -ef|grep pmon
oracle    3333 26998  0 01:19 pts/2    00:00:00 grep pmon
oracle   14084     1  0 Oct08 ?        00:00:02 asm_pmon_+ASM
oracle   14346     1  0 Oct08 ?        00:00:02 ora_pmon_orclcdb
[oracle@db-asm-1 grid]$ asmcmd lsdg
Connected to an idle instance.
ASMCMD-8102: no connection to Oracle ASM; command requires Oracle ASM to run

[oracle@db-asm-1 grid]$ srvctl status asm
ASM is running on db-asm-1
[oracle@db-asm-1 grid]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.CRS.dg
               ONLINE  ONLINE       db-asm-1
ora.DATA.dg
               ONLINE  ONLINE       db-asm-1
ora.FRA.dg
               ONLINE  ONLINE       db-asm-1
ora.LISTENER.lsnr
               ONLINE  ONLINE       db-asm-1
ora.asm
               ONLINE  ONLINE       db-asm-1                 Started
ora.ons
               OFFLINE OFFLINE      db-asm-1
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       db-asm-1
ora.diskmon
      1        OFFLINE OFFLINE
ora.evmd
      1        ONLINE  ONLINE       db-asm-1
ora.orclcdb.db
      1        ONLINE  ONLINE       db-asm-1                 Open

[oracle@db-asm-1 grid]$ env|egrep -i 'oracle|home'
OLDPWD=/home/oracle
USER=oracle
LD_LIBRARY_PATH=/u01/app/oracle/11.2.0.4/grid/lib
MAIL=/var/spool/mail/oracle
PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin:/u01/app/oracle/11.2.0.4/grid/bin
HOME=/home/oracle
LOGNAME=oracle
LOG=/u01/app/oracle/cfgtoollogs/catbundle/catbundle_PSU_ORCLCDB_APPLY_2017Oct08_21_41_02.log
[oracle@db-asm-1 grid]$

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

[oracle@db-asm-1 ~]$ su -
Password:
[root@db-asm-1 ~]# /u01/app/12.2.0.1/grid/rootupgrade.sh
Check /u01/app/12.2.0.1/grid/install/root_db-asm-1_2017-10-09_01-22-49-043808622.log for the output of root script

[root@db-asm-1 ~]# ps -ef|grep pmon
root      8648  3386  0 01:32 pts/1    00:00:00 grep pmon
[root@db-asm-1 ~]#

[oracle@db-asm-1 ~]$ cat /u01/app/12.2.0.1/grid/install/root_db-asm-1_2017-10-09_01-22-49-043808622.log
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/12.2.0.1/grid
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

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: /u01/app/12.2.0.1/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/oracle/crsdata/db-asm-1/crsconfig/roothas_2017-10-09_01-22-50AM.log
2017/10/09 01:23:00 CLSRSC-363: User ignored prerequisites during installation

ASM has been upgraded and started successfully.

Creating OCR keys for user 'oracle', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node db-asm-1 successfully pinned.
2017/10/09 01:27:19 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.conf'
CRS-4123: Oracle High Availability Services has been started.

2017/10/09 01:29:31 CLSRSC-482: Running command: 'srvctl upgrade model -s 11.2.0.4.0 -d 12.2.0.1.0 -p first'
2017/10/09 01:29:52 CLSRSC-482: Running command: 'srvctl upgrade model -s 11.2.0.4.0 -d 12.2.0.1.0 -p last'

db-asm-1     2017/10/09 01:29:57     /u01/app/12.2.0.1/grid/cdata/db-asm-1/backup_20171009_012957.olr     0

db-asm-1     2017/10/08 16:45:27     /u01/app/oracle/11.2.0.4/grid/cdata/db-asm-1/backup_20171008_164527.olr     -
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'db-asm-1'
CRS-2673: Attempting to stop 'ora.evmd' on 'db-asm-1'
CRS-2677: Stop of 'ora.evmd' on 'db-asm-1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'db-asm-1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
2017/10/09 01:31:14 CLSRSC-327: Successfully configured Oracle Restart for a standalone server
[oracle@db-asm-1 ~]$

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

[oracle@db-asm-1 grid]$ ps -ef|grep pmon
oracle    8652 26998  0 01:33 pts/2    00:00:00 grep pmon

[oracle@db-asm-1 grid]$ /u01/app/12.2.0.1/grid/gridSetup.sh -executeConfigTools -responseFile /u01/app/12.2.0.1/grid/install/response/grid_upgrade.rsp -silent
Launching Oracle Grid Infrastructure Setup Wizard...

You can find the logs of this session at:
/u01/app/oraInventory/logs/GridSetupActions2017-10-09_01-33-40AM

Successfully Configured Software.

[oracle@db-asm-1 grid]$ cd /u01/app/oraInventory/logs/GridSetupActions2017-10-09_01-33-40AM
[oracle@db-asm-1 GridSetupActions2017-10-09_01-33-40AM]$ ls -lrt
total 80
-rw-r-----. 1 oracle oinstall   129 Oct  9 01:33 installerPatchActions_2017-10-09_01-33-40AM.log
-rw-r-----. 1 oracle oinstall     0 Oct  9 01:33 gridSetupActions2017-10-09_01-33-40AM.err
-rw-r-----. 1 oracle oinstall   196 Oct  9 01:35 gridSetupActions2017-10-09_01-33-40AM.out
-rw-r-----. 1 oracle oinstall  2176 Oct  9 01:35 time2017-10-09_01-33-40AM.log
-rw-r-----. 1 oracle oinstall 67881 Oct  9 01:35 gridSetupActions2017-10-09_01-33-40AM.log

[oracle@db-asm-1 GridSetupActions2017-10-09_01-33-40AM]$ ps -ef|grep pmon
oracle    9335 26998  0 01:37 pts/2    00:00:00 grep pmon

[oracle@db-asm-1 GridSetupActions2017-10-09_01-33-40AM]$ tail /etc/oratab
# The first and second fields are the system identifier and home
# directory of the database respectively.  The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
orclcdb:/u01/app/oracle/11.2.0.4/db1:N          # line added by Agent
+ASM:/u01/app/12.2.0.1/grid:N           # line added by Agent
[oracle@db-asm-1 GridSetupActions2017-10-

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

[oracle@db-asm-1 ~]$ . oraenv <<< +ASM
ORACLE_SID = [oracle] ? The Oracle base has been set to /u01/app/oracle
[oracle@db-asm-1 ~]$ echo $ORACLE_HOME
/u01/app/12.2.0.1/grid
[oracle@db-asm-1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.CRS.dg
               OFFLINE OFFLINE      db-asm-1                 STABLE
ora.DATA.dg
               ONLINE  OFFLINE      db-asm-1                 STABLE
ora.FRA.dg
               ONLINE  OFFLINE      db-asm-1                 STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       db-asm-1                 STABLE
ora.asm
               ONLINE  OFFLINE      db-asm-1                 STABLE
ora.ons
               OFFLINE OFFLINE      db-asm-1                 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       db-asm-1                 STABLE
ora.diskmon
      1        OFFLINE OFFLINE                               STABLE
ora.evmd
      1        ONLINE  ONLINE       db-asm-1                 STABLE
ora.orclcdb.db
      1        ONLINE  OFFLINE                               Instance Shutdown,ST
                                                             ABLE
--------------------------------------------------------------------------------
[oracle@db-asm-1 ~]$ ps -ef|grep pmon
oracle    9360  4055  0 01:39 pts/3    00:00:00 grep pmon
[oracle@db-asm-1 ~]$ asmcmd lsdg
Connected to an idle instance.
ASMCMD-8102: no connection to Oracle ASM; command requires Oracle ASM to run

[oracle@db-asm-1 ~]$ crsctl query has releaseversion
Oracle High Availability Services release version on the local node is [12.2.0.1.0]

[oracle@db-asm-1 ~]$ crsctl query has softwareversion
Oracle High Availability Services version on the local node is [12.2.0.1.0]
[oracle@db-asm-1 ~]$

October 8, 2017

Upgrade 12.2 Journey – ORAchk Failed To Detect compatible.asm=11.2.0.0.0 Issue

Filed under: Upgrade 12.2 Journey — mdinh @ 11:04 pm

Ran orachk and it did not detect compatibility issues.

./orachk -u -o pre

WARNING OS Check Package cvuqdisk-1.0.9-1-x86_64 is recommended but NOT installed All Database Servers
WARNING OS Check Package unixODBC-devel-2.2.14-11.el6-i686 is recommended but NOT installed All Database Servers
WARNING OS Check Package unixODBC-2.2.14-11.el6-i686 is recommended but NOT installed All Database Servers
WARNING OS Check ORACLE_HOME environment variable is set for database software owner All Database Servers

Upgrade 12.2 Journey – Preparation for 12.2 Upgrade

Filed under: Upgrade 12.2 Journey — mdinh @ 10:20 pm

This is exactly what I did last time and upgrade will fail due to compatible.asm=11.2.0.0.0

Goal now is to now to detect and prevent the failure.

Let’s see if ORAchk – Health Checks for the Oracle Stack (Doc ID 1268927.2) will detect this.

[oracle@db-asm-1 ~]$ asmcmd lsattr -G CRS -l
Name                     Value
access_control.enabled   FALSE
access_control.umask     066
au_size                  4194304
cell.smart_scan_capable  FALSE
compatible.asm           11.2.0.0.0
compatible.rdbms         10.1.0.0.0
disk_repair_time         3.6h
sector_size              512
[oracle@db-asm-1 ~]$

Install Grid 12.2, runcluvfy.sh, resolve swap issue, create grid_upgrade.rsp

[oracle@db-asm-1 ~]$ mkdir -p /u01/app/12.2.0.1/grid
[oracle@db-asm-1 ~]$ ls -l /sf_OracleSoftware/12.2.0.1_Linux_64/
total 6297251
-rwxrwxrwx. 1 vagrant vagrant 3453696911 Apr 12 15:44 linuxx64_12201_database.zip
-rwxrwxrwx. 1 vagrant vagrant 2994687209 Apr 12 15:43 linuxx64_12201_grid_home.zip
[oracle@db-asm-1 ~]$ unzip -d /u01/app/12.2.0.1/grid -qo /sf_OracleSoftware/12.2.0.1_Linux_64/linuxx64_12201_grid_home.zip; echo $?
0
[oracle@db-asm-1 grid]$ ./runcluvfy.sh stage -pre hacfg
Pre-check for Oracle Restart configuration was unsuccessful.
Failures were encountered during execution of CVU verification request "stage -pre hacfg".

Verifying Physical Memory ...FAILED
db-asm-1: PRVF-7530 : Sufficient physical memory is not available on node
          "db-asm-1" [Required physical memory = 8GB (8388608.0KB)]

Verifying Swap Size ...FAILED
db-asm-1: PRVF-7573 : Sufficient swap size is not available on node "db-asm-1"
          [Required = 1.5GB (1572864.0KB) ; Found = 1023.9961MB (1048572.0KB)]

CVU operation performed:      stage -pre hacfg
Date:                         Oct 8, 2017 11:36:24 PM
CVU home:                     /u01/app/12.2.0.1/grid/
User:                         oracle

[root@db-asm-1 ~]# swapon -s
Filename                                Type            Size    Used    Priority
/dev/sda1                               partition       1048572 20860   -1

[root@db-asm-1 ~]# cat /proc/swaps
Filename                                Type            Size    Used    Priority
/dev/sda1                               partition       1048572 20860   -1

[root@db-asm-1 ~]# cat /etc/fstab|grep swap
UUID=f6263370-a504-46e9-bb85-26e2400eafae swap                    swap    defaults        0 0

[root@db-asm-1 ~]# df -h /root/
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2        47G  2.4G   43G   6% /

[root@db-asm-1 ~]# dd if=/dev/zero of=/root/swapfile count=1024 bs=2097152
1024+0 records in
1024+0 records out
2147483648 bytes (2.1 GB) copied, 4.2507 s, 505 MB/s

[root@db-asm-1 ~]# mkswap -c /root/swapfile
mkswap: /root/swapfile: warning: don't erase bootbits sectors
        on whole disk. Use -f to force.
Setting up swapspace version 1, size = 2097148 KiB
no label, UUID=c0aa5207-4882-4ce5-8943-1b245e1615dc

[root@db-asm-1 ~]# swapon /root/swapfile
[root@db-asm-1 ~]# swapon -s
Filename                                Type            Size    Used    Priority
/dev/sda1                               partition       1048572 20860   -1
/root/swapfile                          file            2097148 0       -2

[root@db-asm-1 ~]# cat /etc/fstab|grep swap
UUID=f6263370-a504-46e9-bb85-26e2400eafae swap                    swap    defaults        0 0

[root@db-asm-1 ~]# vi /etc/fstab
[root@db-asm-1 ~]# cat /etc/fstab|grep swap
UUID=f6263370-a504-46e9-bb85-26e2400eafae swap                    swap    defaults        0 0
/root/swapfile                            swap                    swap    defaults        0 0
[root@db-asm-1 ~]#

[oracle@db-asm-1 grid]$ ./runcluvfy.sh stage -pre hacfg
Pre-check for Oracle Restart configuration was unsuccessful.
Failures were encountered during execution of CVU verification request "stage -pre hacfg".

Verifying Physical Memory ...FAILED
db-asm-1: PRVF-7530 : Sufficient physical memory is not available on node
          "db-asm-1" [Required physical memory = 8GB (8388608.0KB)]

CVU operation performed:      stage -pre hacfg
Date:                         Oct 8, 2017 11:49:01 PM
CVU home:                     /u01/app/12.2.0.1/grid/
User:                         oracle
[oracle@db-asm-1 grid]$

[oracle@db-asm-1 ~]$ echo $ORACLE_HOME
/u01/app/oracle/11.2.0.4/db1

[oracle@db-asm-1 ~]$ cat $ORACLE_HOME/rdbms/lib/config.c

/*  SS_DBA_GRP defines the UNIX group ID for sqldba adminstrative access.  */
/*  Refer to the Installation and User's Guide for further information.  */

/* IMPORTANT: this file needs to be in sync with
              rdbms/src/server/osds/config.c, specifically regarding the
              number of elements in the ss_dba_grp array.
 */

#define SS_DBA_GRP "oinstall"
#define SS_OPER_GRP "oinstall"
#define SS_ASM_GRP ""

char *ss_dba_grp[] = {SS_DBA_GRP, SS_OPER_GRP, SS_ASM_GRP};
[oracle@db-asm-1 ~]$ 

[oracle@db-asm-1 ~]$ echo $ORACLE_HOME
/u01/app/oracle/11.2.0.4/grid

[oracle@db-asm-1 ~]$ cat $ORACLE_HOME/rdbms/lib/config.c

/*  SS_DBA_GRP defines the UNIX group ID for sqldba adminstrative access.  */
/*  Refer to the Installation and User's Guide for further information.  */

/* IMPORTANT: this file needs to be in sync with
              rdbms/src/server/osds/config.c, specifically regarding the
              number of elements in the ss_dba_grp array.
 */

#define SS_DBA_GRP "dba"
#define SS_OPER_GRP "oper"
#define SS_ASM_GRP "dba"

char *ss_dba_grp[] = {SS_DBA_GRP, SS_OPER_GRP, SS_ASM_GRP};
[oracle@db-asm-1 ~]$

[oracle@db-asm-1 ~]$ cd /u01/app/12.2.0.1/grid/install/response/
[oracle@db-asm-1 response]$ ls -l
total 76
-rw-r--r--. 1 oracle oinstall 34357 Jan 26  2017 grid_2017-01-26_04-10-28PM.rsp
-rw-r-----. 1 oracle oinstall 35087 Jan 26  2017 gridsetup.rsp
-rw-r-----. 1 oracle oinstall  1541 May 20  2016 sample.ccf

[oracle@db-asm-1 response]$ cp -v gridsetup.rsp grid_upgrade.rsp
`gridsetup.rsp' -> `grid_upgrade.rsp'

[oracle@db-asm-1 response]$ vi grid_upgrade.rsp
[oracle@db-asm-1 response]$ diff -iwyB --suppress-common-lines -W 150 gridsetup.rsp grid_upgrade.rsp; echo
oracle.install.option=                                                    |     oracle.install.option=UPGRADE
ORACLE_BASE=                                                              |     ORACLE_BASE=/u01/app/oracle
oracle.install.asm.OSDBA=                                                 |     oracle.install.asm.OSDBA=dba
oracle.install.asm.OSOPER=                                                |     oracle.install.asm.OSOPER=oper
oracle.install.asm.OSASM=                                                 |     oracle.install.asm.OSASM=dba

[oracle@db-asm-1 response]$

Incorrect group will results in failure.

[oracle@db-asm-1 ~]$ groups
oinstall asmdba dba backupdba oper dgdba kmdba

[oracle@db-asm-1 ~]$ id oracle
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54318(asmdba),54322(dba),54323(backupdba),54324(oper),54325(dgdba),54326(kmdba)
[oracle@db-asm-1 ~]$

oracle@db-asm-1::/u01/app/12.2.0.1/grid/install/response
> diff -iwyB --suppress-common-lines -W 150 gridsetup.rsp grid_upgrade.rsp; echo
oracle.install.option=                                                    |     oracle.install.option=UPGRADE
ORACLE_BASE=                                                              |     ORACLE_BASE=/u01/app/oracle
oracle.install.asm.OSDBA=                                                 |     oracle.install.asm.OSDBA=asmdba
oracle.install.asm.OSOPER=                                                |     oracle.install.asm.OSOPER=asmdba
oracle.install.asm.OSASM=                                                 |     oracle.install.asm.OSASM=asmdba

oracle@db-asm-1::/u01/app/12.2.0.1/grid
> ./gridSetup.sh -silent -waitforcompletion -skipPrereqs -responseFile /u01/app/12.2.0.1/grid/install/response/grid_upgrade.rsp

Launching Oracle Grid Infrastructure Setup Wizard...

[WARNING] [INS-40436] Installer has detected an earlier version of Oracle Automatic Storage Management (ASM) Instance configured. Before proceeding with the upgrade you must shutdown all Oracle Databases that are using Oracle ASM for storage.

You may ignore this message and continue with the upgrade, if the database(s) are already in shutdown state.
[WARNING] [INS-41808] Possible invalid choice for OSASM Group.
   CAUSE: The name of the group you selected for the OSASM group is commonly used to grant other system privileges (For example: asmdba, asmoper, dba, oper).
   ACTION: Oracle recommends that you designate asmadmin as the OSASM group.
[WARNING] [INS-41813] OSDBA for ASM, OSOPER for ASM, and OSASM are the same OS group.
   CAUSE: The group you selected for granting the OSDBA for ASM group for database access, and the OSOPER for ASM group for startup and shutdown of Oracle ASM, is the same group as the OSASM group, whose members have SYSASM privileges on Oracle ASM.
   ACTION: Choose different groups as the OSASM, OSDBA for ASM, and OSOPER for ASM groups.

[FATAL] [INS-41881] Installer has detected that the group specified for OSDBA is not same as the group 'dba' retrieved from the current configuration of grid software. 
The upgrade operation will not be successful if the same group name is not selected.
   ACTION: Select the same group and proceed further.

[FATAL] [INS-41881] Installer has detected that the group specified for OSOPER is not same as the group 'oper' retrieved from the current configuration of grid software. 
The upgrade operation will not be successful if the same group name is not selected.
   ACTION: Select the same group and proceed further.

[FATAL] [INS-41881] Installer has detected that the group specified for OSASM is not same as the group 'dba' retrieved from the current configuration of grid software. 
The upgrade operation will not be successful if the same group name is not selected.
   ACTION: Select the same group and proceed further.

Upgrade 12.2 Journey – Apply July 2017 PSU

Filed under: Upgrade 12.2 Journey — mdinh @ 9:08 pm

Patches to apply before upgrading Oracle GI and DB to 12.2.0.1 (Doc ID 2180188.1)

GI PSU 22646198
11.2.0.4.160419 (Apr 2016) Grid Infrastructure Patch Set Update (GI PSU)
Recommended to install latest* 11.2.0.4 GI PSU

Patch Set Update and Critical Patch Update July 2017 Availability Document (Doc ID 2261562.1)

    OPatch utility version 11.2.0.3.6 or later

    --------------------------------------------------------------------------------
    Patch 26030799 - Oracle Grid Infrastructure Patch Set Update 11.2.0.4.170718 (Jul2017) 
    (Includes Database PSU 11.2.0.4.170718)
    --------------------------------------------------------------------------------
    25869727
    DB PSU 11.2.0.4.170718 (INCLUDES CPUJUL2017)
    Both DB Homes and Grid Home

    25920335
    OCW PSU 11.2.0.4.170718
    Both DB Homes and Grid Home

    22502505
    ACFS PSU 11.2.0.4.160419
    Only Grid Home

    --------------------------------------------------------------------------------
    Patch 26027154 - Oracle JavaVM Component 11.2.0.4.170718 Database PSU
    --------------------------------------------------------------------------------
    Oracle JavaVM Component 11.2.0.4.170718 Database PSU

====================================================================================================
Oracle Recommended Patches -- "Oracle JavaVM Component Database PSU and RU" (OJVM PSU and OJVM RU) Patches (Doc ID 1929745.1)	
====================================================================================================
    Jul 2016 - present (12.1.0.1, 11.2.0.4)

    Database Home - OJVM PSU (Jul 2016 - present)
    Grid Home - JDBC Patch (Jul 2016)

    Oracle JavaVM Component 11.2.0.4.160719 Database PSU - Generic JDBC Patch 23727132

GRID PSU

[oracle@db-asm-1 dinh]$ . oraenv <<< +ASM
ORACLE_SID = [orclcdb] ? The Oracle base remains unchanged with value /u01/app/oracle
[oracle@db-asm-1 dinh]$ echo $ORACLE_HOME
/u01/app/oracle/11.2.0.4/grid

[oracle@db-asm-1 dinh]$ export GRID_HOME=$ORACLE_HOME
[oracle@db-asm-1 dinh]$ $GRID_HOME/OPatch/opatch lspatches
23727132;
22502505;ACFS Patch Set Update : 11.2.0.4.160419 (22502505)
25920335;OCW Patch Set Update : 11.2.0.4.170718 (25920335)
25869727;Database Patch Set Update : 11.2.0.4.170718 (25869727)

OPatch succeeded.

[oracle@db-asm-1 dinh]$ crsctl config has
CRS-4622: Oracle High Availability Services autostart is enabled.

[oracle@db-asm-1 dinh]$ crsctl check has
CRS-4638: Oracle High Availability Services is online

[oracle@db-asm-1 dinh]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.CRS.dg
               ONLINE  ONLINE       db-asm-1
ora.DATA.dg
               ONLINE  ONLINE       db-asm-1
ora.FRA.dg
               ONLINE  ONLINE       db-asm-1
ora.LISTENER.lsnr
               ONLINE  ONLINE       db-asm-1
ora.asm
               ONLINE  ONLINE       db-asm-1                 Started
ora.ons
               OFFLINE OFFLINE      db-asm-1
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       db-asm-1
ora.diskmon
      1        OFFLINE OFFLINE
ora.evmd
      1        ONLINE  ONLINE       db-asm-1
ora.orclcdb.db
      1        ONLINE  ONLINE       db-asm-1                 Open

[oracle@db-asm-1 dinh]$ asmcmd lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  4194304     10236    10148                0           10148              0             N  CRS/
MOUNTED  EXTERN  N         512   4096  4194304     20472    18612                0           18612              0             N  DATA/
MOUNTED  EXTERN  N         512   4096  4194304     30708    30264                0           30264              0             N  FRA/

DB PSU

[oracle@db-asm-1 dinh]$ . oraenv <<< orclcdb
ORACLE_SID = [+ASM] ? The Oracle base remains unchanged with value /u01/app/oracle
[oracle@db-asm-1 dinh]$ echo $ORACLE_HOME
/u01/app/oracle/11.2.0.4/db1

[oracle@db-asm-1 dinh]$ $ORACLE_HOME/OPatch/opatch lspatches
26027154;OJVM PATCH SET UPDATE 11.2.0.4.170718
25920335;OCW Patch Set Update : 11.2.0.4.170718 (25920335)
25869727;Database Patch Set Update : 11.2.0.4.170718 (25869727)

OPatch succeeded.

[oracle@db-asm-1 dinh]$ srvctl config database
orclcdb

[oracle@db-asm-1 dinh]$ srvctl status database -d orclcdb
Database is running.

[oracle@db-asm-1 dinh]$ sqlplus / as sysdba @ dba_registry.sql

SQL*Plus: Release 11.2.0.4.0 Production on Sun Oct 8 22:22:49 2017

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

 

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

 

Session altered.

 

NAME COMP_ID COMP_NAME VERSION SCHEMA STATUS
---------- ------------ ---------------------------------------- ------------------------------ --------------- ------------
ORCLCDB OWB OWB 11.2.0.4.0 OWBSYS VALID
ORCLCDB APEX Oracle Application Express 3.2.1.00.12 APEX_030200 VALID
ORCLCDB EM Oracle Enterprise Manager 11.2.0.4.0 SYSMAN VALID
ORCLCDB SDO Spatial 11.2.0.4.0 MDSYS VALID
ORCLCDB AMD OLAP Catalog 11.2.0.4.0 OLAPSYS VALID
ORCLCDB XOQ Oracle OLAP API 11.2.0.4.0 SYS VALID
ORCLCDB APS OLAP Analytic Workspace 11.2.0.4.0 SYS VALID
ORCLCDB ORDIM Oracle Multimedia 11.2.0.4.0 ORDSYS VALID
ORCLCDB RUL Oracle Rules Manager 11.2.0.4.0 EXFSYS VALID
ORCLCDB XDB Oracle XML Database 11.2.0.4.0 XDB VALID
ORCLCDB CONTEXT Oracle Text 11.2.0.4.0 CTXSYS VALID
ORCLCDB EXF Oracle Expression Filter 11.2.0.4.0 EXFSYS VALID
ORCLCDB CATJAVA Oracle Database Java Packages 11.2.0.4.0 SYS VALID
ORCLCDB XML Oracle XDK 11.2.0.4.0 SYS VALID
ORCLCDB JAVAVM JServer JAVA Virtual Machine 11.2.0.4.0 SYS VALID
ORCLCDB OWM Oracle Workspace Manager 11.2.0.4.0 WMSYS VALID
ORCLCDB CATPROC Oracle Database Packages and Types 11.2.0.4.0 SYS VALID
ORCLCDB CATALOG Oracle Database Catalog Views 11.2.0.4.0 SYS VALID

18 rows selected.

 

ACTION_TIME ACTION NAMESPACE VERSION ID COMMENTS BUNDLE_SER
------------------------------ --------------- --------------- ------------------------------ ---------- ------------------------------ ----------
08-OCT-17 09.57.45.178375 PM APPLY 26027154 Patch 26027154 applied
08-OCT-17 09.57.45.172250 PM APPLY SERVER 11.2.0.4.170718OJVMPSU 0 OJVM PSU post-install
08-OCT-17 09.57.45.095287 PM jvmpsu.sql SERVER 11.2.0.4.170718OJVMPSU 0 RAN jvmpsu.sql
08-OCT-17 09.42.07.465250 PM APPLY SERVER 11.2.0.4 170718 PSU 11.2.0.4.170718 PSU
08-OCT-17 05.16.54.900094 PM APPLY SERVER 11.2.0.4 0 Patchset 11.2.0.2.0 PSU
24-AUG-13 12.03.45.119862 PM APPLY SERVER 11.2.0.4 0 Patchset 11.2.0.2.0 PSU

6 rows selected.

22:22:49 SYS @ orclcdb:>exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
[oracle@db-asm-1 dinh]$

 

Upgrade 12.2 Journey – Why Upgrade Failed

Filed under: Upgrade 12.2 Journey — mdinh @ 6:43 pm

I already know upgrade will fail and will reproduce to show how to resolve the issue.

Curious how did it happened.

Without the benefit of knowing what will happened, is there any way this could have been detected.

RTFM – but did not find anything in the matter.

From Vagant:

TASK [oraasm-createdg : ASMCA | List ASM diskgroups]
compatible.asm=11.2.0.4

From alert_+ASM.log:

SQL> CREATE DISKGROUP crs EXTERNAL REDUNDANCY  DISK '/dev/oracle/crs01' ATTRIBUTE 'compatible.asm'='11.2.0.0.0','au_size'='4M' /* ASMCA */

Details:

TASK [oraasm-createdg : ASMCA | Create script to build asm-diskgroups] *********
changed: [db-asm-1] => (item={u'attributes': [{u'name': u'compatible.rdbms', u'value': u'11.2.0.4.0'}, {u'name': u'compatible.asm', u'value': u'11.2.0.4'}], u'disk': [{u'device': u'/dev/sdd', u'asmlabel': u'data01'}, {u'device': u'/dev/sde', u'asmlabel': u'data02'}], u'diskgroup': u'data', u'properties': [{u'redundancy': u'external', u'ausize': 4}]})
changed: [db-asm-1] => (item={u'attributes': [{u'name': u'compatible.rdbms', u'value': u'11.2.0.4.0'}, {u'name': u'compatible.asm', u'value': u'11.2.0.4'}], u'disk': [{u'device': u'/dev/sdf', u'asmlabel': u'fra01'}, {u'device': u'/dev/sdg', u'asmlabel': u'fra02'}, {u'device': u'/dev/sdh', u'asmlabel': u'fra03'}], u'diskgroup': u'fra', u'properties': [{u'redundancy': u'external', u'ausize': 4}]})

TASK [oraasm-createdg : ASMCA | Create ASM diskgroups] *************************
changed: [db-asm-1] => (item={u'attributes': [{u'name': u'compatible.rdbms', u'value': u'11.2.0.4.0'}, {u'name': u'compatible.asm', u'value': u'11.2.0.4'}], u'disk': [{u'device': u'/dev/sdd', u'asmlabel': u'data01'}, {u'device': u'/dev/sde', u'asmlabel': u'data02'}], u'diskgroup': u'data', u'properties': [{u'redundancy': u'external', u'ausize': 4}]})
changed: [db-asm-1] => (item={u'attributes': [{u'name': u'compatible.rdbms', u'value': u'11.2.0.4.0'}, {u'name': u'compatible.asm', u'value': u'11.2.0.4'}], u'disk': [{u'device': u'/dev/sdf', u'asmlabel': u'fra01'}, {u'device': u'/dev/sdg', u'asmlabel': u'fra02'}, {u'device': u'/dev/sdh', u'asmlabel': u'fra03'}], u'diskgroup': u'fra', u'properties': [{u'redundancy': u'external', u'ausize': 4}]})

TASK [oraasm-createdg : Print Results] *****************************************
fatal: [db-asm-1]: FAILED! => {"failed": true, "msg": "template error while templating string: no filter named 'map'. String: {{ asmca.results|map(attribute='stdout_lines')|list }}"}
...ignoring

TASK [oraasm-createdg : ASMCA | List ASM diskgroups] ***************************
changed: [db-asm-1] => (item={u'attributes': 
[{u'name': u'compatible.rdbms', u'value': u'11.2.0.4.0'}, 
{u'name': u'compatible.asm', u'value': u'11.2.0.4'}], 
u'disk': [{u'device': u'/dev/sdc', u'asmlabel': u'crs01'}], 
u'diskgroup': u'crs', u'properties': [{u'redundancy': u'external', u'ausize': 4}]})

changed: [db-asm-1] => (item={u'attributes': [{u'name': u'compatible.rdbms', u'value': u'11.2.0.4.0'}, {u'name': u'compatible.asm', u'value': u'11.2.0.4'}], u'disk': [{u'device': u'/dev/sdd', u'asmlabel': u'data01'}, {u'device': u'/dev/sde', u'asmlabel': u'data02'}], u'diskgroup': u'data', u'properties': [{u'redundancy': u'external', u'ausize': 4}]})
changed: [db-asm-1] => (item={u'attributes': [{u'name': u'compatible.rdbms', u'value': u'11.2.0.4.0'}, {u'name': u'compatible.asm', u'value': u'11.2.0.4'}], u'disk': [{u'device': u'/dev/sdf', u'asmlabel': u'fra01'}, {u'device': u'/dev/sdg', u'asmlabel': u'fra02'}, {u'device': u'/dev/sdh', u'asmlabel': u'fra03'}], u'diskgroup': u'fra', u'properties': [{u'redundancy': u'external', u'ausize': 4}]})

TASK [oraasm-createdg : list diskgroups] ***************************************
fatal: [db-asm-1]: FAILED! => {"failed": true, "msg": "template error while templating string: no filter named 'map'. String: {{ srvctlasm.results|map(attribute='stdout_lines')|list }}"}
...ignoring


[oracle@db-asm-1 trace]$ asmcmd lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  4194304     10236    10148                0           10148              0             N  CRS/
MOUNTED  EXTERN  N         512   4096  4194304     20472    18652                0           18652              0             N  DATA/
MOUNTED  EXTERN  N         512   4096  4194304     30708    30264                0           30264              0             N  FRA/
[oracle@db-asm-1 trace]$ asmcmd lsattr -G CRS -l
Name                     Value
access_control.enabled   FALSE
access_control.umask     066
au_size                  4194304
cell.smart_scan_capable  FALSE
compatible.asm           11.2.0.0.0
compatible.rdbms         10.1.0.0.0
disk_repair_time         3.6h
sector_size              512
[oracle@db-asm-1 trace]$ asmcmd lsattr -G DATA -l
Name                     Value
access_control.enabled   FALSE
access_control.umask     066
au_size                  4194304
cell.smart_scan_capable  FALSE
compatible.asm           11.2.0.4.0
compatible.rdbms         11.2.0.4.0
content.type             data
disk_repair_time         3.6h
idp.boundary             auto
idp.type                 dynamic
sector_size              512
[oracle@db-asm-1 trace]$ asmcmd lsattr -G FRA -l
Name                     Value
access_control.enabled   FALSE
access_control.umask     066
au_size                  4194304
cell.smart_scan_capable  FALSE
compatible.asm           11.2.0.4.0
compatible.rdbms         11.2.0.4.0
content.type             data
disk_repair_time         3.6h
idp.boundary             auto
idp.type                 dynamic
sector_size              512
[oracle@db-asm-1 trace]$

[oracle@db-asm-1 trace]$ head alert_+ASM.log
Sun Oct 08 16:46:58 2017

MEMORY_TARGET defaulting to 1128267776.
* instance_number obtained from CSS = 1, checking for the existence of node 0...
* node 0 does not exist. instance_number = 1
Starting ORACLE instance (normal)
WARNING: You are trying to use the MEMORY_TARGET feature. 
This feature requires the /dev/shm file system to be mounted for at least 1140850688 bytes. 
/dev/shm is either not mounted or is mounted with available space less than this size. 
Please fix this so that MEMORY_TARGET can work as expected. 
Current available is 914882560 and used is 200704 bytes. 
Ensure that the mount point is /dev/shm for this directory.

LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Initial number of CPU is 1
Shared memory segment for instance monitoring created
[oracle@db-asm-1 trace]$

[oracle@db-asm-1 trace]$ grep compatible.asm alert_+ASM.log
SQL> CREATE DISKGROUP crs EXTERNAL REDUNDANCY  DISK '/dev/oracle/crs01' ATTRIBUTE 'compatible.asm'='11.2.0.0.0','au_size'='4M' /* ASMCA */
NOTE: Instance updated compatible.asm to 11.2.0.0.0 for grp 1
SUCCESS: CREATE DISKGROUP crs EXTERNAL REDUNDANCY  DISK '/dev/oracle/crs01' ATTRIBUTE 'compatible.asm'='11.2.0.0.0','au_size'='4M' /* ASMCA */
NOTE: Instance updated compatible.asm to 11.2.0.0.0 for grp 1
'/dev/oracle/data02' ATTRIBUTE 'compatible.asm'='11.2.0.4','compatible.rdbms'='11.2.0.4.0','au_size'='4M' /* ASMCA */
NOTE: Instance updated compatible.asm to 11.2.0.4.0 for grp 2
'/dev/oracle/data02' ATTRIBUTE 'compatible.asm'='11.2.0.4','compatible.rdbms'='11.2.0.4.0','au_size'='4M' /* ASMCA */
'/dev/oracle/fra03' ATTRIBUTE 'compatible.asm'='11.2.0.4','compatible.rdbms'='11.2.0.4.0','au_size'='4M' /* ASMCA */
NOTE: Instance updated compatible.asm to 11.2.0.4.0 for grp 3
'/dev/oracle/fra03' ATTRIBUTE 'compatible.asm'='11.2.0.4','compatible.rdbms'='11.2.0.4.0','au_size'='4M' /* ASMCA */
[oracle@db-asm-1 trace]$

Upgrade 12.2 Journey – Check July 2017 PSU

Filed under: Upgrade 12.2 Journey — mdinh @ 5:22 pm

Check July 2017 PSU for Oracle Restart ASM

Upgrade 12.2 Journey – Update Opatch

Filed under: Upgrade 12.2 Journey — mdinh @ 4:14 pm
[oracle@db-asm-1 ~]$ ps -ef|grep pmon
oracle    1413     1  0 17:18 ?        00:00:00 ora_pmon_orclcdb
oracle   10752 10731  0 17:52 pts/1    00:00:00 grep pmon
oracle   24615     1  0 16:47 ?        00:00:00 asm_pmon_+ASM

[oracle@db-asm-1 ~]$ . oraenv <<< orclcdb 
ORACLE_SID = [oracle] ? The Oracle base has been set to /u01/app/oracle 

[oracle@db-asm-1 ~]$ echo $ORACLE_HOME 
/u01/app/oracle/11.2.0.4/db1 

[oracle@db-asm-1 ~]$ cd $ORACLE_HOME 
[oracle@db-asm-1 db1]$ mv -v OPatch OPatch.old 
'OPatch' -> 'OPatch.old'

[oracle@db-asm-1 db1]$ mkdir OPatch
[oracle@db-asm-1 db1]$ ls -ld OP*
drwxr-xr-x. 2 oracle oinstall 4096 Oct  8 17:53 OPatch
drwxr-xr-x. 8 oracle oinstall 4096 Oct  8 17:03 OPatch.old

[oracle@db-asm-1 db1]$ unzip -d $ORACLE_HOME -qo /media/swrepo/JUL2017PSU/p6880880_112000_Linux-x86-64.zip;echo $?
0
[oracle@db-asm-1 db1]$ $ORACLE_HOME/OPatch/opatch version
OPatch Version: 11.2.0.3.16

OPatch succeeded.

[oracle@db-asm-1 db1]$ su -
Password:
[root@db-asm-1 ~]# . oraenv <<< +ASM 
ORACLE_SID = [root] ? The Oracle base has been set to /u01/app/oracle 

[root@db-asm-1 ~]# echo $ORACLE_HOME 
/u01/app/oracle/11.2.0.4/grid 
[root@db-asm-1 ~]# export GRID_HOME=$ORACLE_HOME 
[root@db-asm-1 ~]# cd $GRID_HOME 
[root@db-asm-1 grid]# ls -ld OP* 
drwxr-xr-x. 8 oracle oinstall 4096 Oct 8 16:41 OPatch 
[root@db-asm-1 grid]# mv -v OPatch OPatch.old 
'OPatch' -> 'OPatch.old'

[root@db-asm-1 grid]# mkdir OPatch
[root@db-asm-1 grid]# ls -ld OP*
drwxr-xr-x. 2 root   root     4096 Oct  8 17:56 OPatch
drwxr-xr-x. 8 oracle oinstall 4096 Oct  8 16:41 OPatch.old

[root@db-asm-1 grid]# chown oracle:oinstall OPatch
[root@db-asm-1 grid]# ls -ld OP*
drwxr-xr-x. 2 oracle oinstall 4096 Oct  8 17:56 OPatch
drwxr-xr-x. 8 oracle oinstall 4096 Oct  8 16:41 OPatch.old
[root@db-asm-1 grid]# logout

[oracle@db-asm-1 db1]$ . oraenv <<< +ASM
ORACLE_SID = [orclcdb] ? The Oracle base remains unchanged with value /u01/app/oracle

[oracle@db-asm-1 db1]$ echo $ORACLE_HOME
/u01/app/oracle/11.2.0.4/grid

[oracle@db-asm-1 db1]$ export GRID_HOME=$ORACLE_HOME
[oracle@db-asm-1 db1]$ unzip -d $GRID_HOME -qo /media/swrepo/JUL2017PSU/p6880880_112000_Linux-x86-64.zip;echo $?
0

[oracle@db-asm-1 db1]$ $GRID_HOME/OPatch/opatch version
OPatch Version: 11.2.0.3.16

OPatch succeeded.
[oracle@db-asm-1 db1]$
Next Page »

Blog at WordPress.com.