Sunday, 19 June 2016

Extending space to existing disk in VM

login as: root

oracle@192.168.86.128's password:

Last login: Sat Jun 25 09:39:36 2016

[root@localhost ~]# fdisk /dev/sda

Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.


Command (m for help): n

Partition type:

   p   primary (2 primary, 0 extended, 2 free)

   e   extended

Select (default p): p

Partition number (3,4, default 3):

First sector (41943040-62914559, default 41943040):

Using default value 41943040

Last sector, +sectors or +size{K,M,G} (41943040-62914559, default 62914559):

Using default value 62914559

Partition 3 of type Linux and of size 10 GiB is set




Command (m for help):
p




Disk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: dos

Disk identifier: 0x000b2714




   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *        2048     2050047     1024000   83  Linux

/dev/sda2         2050048    41943039    19946496   8e  Linux LVM

/dev/sda3        41943040    62914559    10485760   83  Linux




Command (m for help):
t

Partition number (1-3, default 3):

Hex code (type L to list all codes): 8e

Changed type of partition 'Linux' to 'Linux LVM'




Command (m for help):
w

The partition table has been altered!




Calling ioctl() to re-read partition table.




WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table. The new table will be used at

the next reboot or after you run partprobe(8) or kpartx(8)

Syncing disks.

[root@localhost ~]# reboot


[root@localhost ~]#
fdisk -l




Disk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: dos

Disk identifier: 0x000b2714




   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *        2048     2050047     1024000   83  Linux

/dev/sda2         2050048    41943039    19946496   8e  Linux LVM

/dev/sda3        41943040    62914559    10485760   8e  Linux LVM




Disk /dev/mapper/ol-swap: 3145 MB, 3145728000 bytes, 6144000 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes







Disk /dev/mapper/ol-root: 17.3 GB, 17276338176 bytes, 33742848 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes




[root@localhost ~]#
pvcreate /dev/sda3

WARNING: xfs signature detected on /dev/sda3 at offset 0. Wipe it? [y/n] y

  Wiping xfs signature on /dev/sda3.

  Physical volume "/dev/sda3" successfully created

[root@localhost ~]# vgdisplay

  --- Volume group ---

  VG Name               ol

  System ID

  Format                lvm2

  Metadata Areas        1

  Metadata Sequence No  3

  VG Access             read/write

  VG Status             resizable

  MAX LV                0

  Cur LV                2

  Open LV               2

  Max PV                0

  Cur PV                1

  Act PV                1

  VG Size               19.02 GiB

  PE Size               4.00 MiB

  Total PE              4869

  Alloc PE / Size       4869 / 19.02 GiB

  Free  PE / Size       0 / 0

  VG UUID               Ay0nlL-BUuA-ltwR-GzYz-5NUl-ooBM-qBRNA6




[root@localhost ~]#
pvscan

  PV /dev/sda2   VG ol              lvm2 [19.02 GiB / 0    free]

  PV /dev/sda3                      lvm2 [10.00 GiB]

  Total: 2 [29.02 GiB] / in use: 1 [19.02 GiB] / in no VG: 1 [10.00 GiB]

[root@localhost ~]# vgextend ol /dev/sda3

  Volume group "ol" successfully extended

[root@localhost ~]# pvscan

  PV /dev/sda2   VG ol   lvm2 [19.02 GiB / 0    free]

  PV /dev/sda3   VG ol   lvm2 [10.00 GiB / 10.00 GiB free]

  Total: 2 [29.02 GiB] / in use: 2 [29.02 GiB] / in no VG: 0 [0   ]

[root@localhost ~]# lvdisplay

  --- Logical volume ---

  LV Path                /dev/ol/swap

  LV Name                swap

  VG Name                ol

  LV UUID                A3qVoi-7ZI3-K6EN-ioa3-f1J3-n8ND-0yR3Xn

  LV Write Access        read/write

  LV Creation host, time localhost, 2015-01-02 15:22:08 -0500

  LV Status              available

  # open                 2

  LV Size                2.93 GiB

  Current LE             750

  Segments               1

  Allocation             inherit

  Read ahead sectors     auto

  - currently set to     256

  Block device           252:0




  --- Logical volume ---

  LV Path                /dev/ol/root

  LV Name                root

  VG Name                ol

  LV UUID                0anOak-0QeZ-qmE2-QVyL-Bji9-lMzg-5I2S3k

  LV Write Access        read/write

  LV Creation host, time localhost, 2015-01-02 15:22:08 -0500

  LV Status              available

  # open                 1

  LV Size                16.09 GiB

  Current LE             4119

  Segments               1

  Allocation             inherit

  Read ahead sectors     auto

  - currently set to     256

  Block device           252:1




[root@localhost ~]#
lvextend /dev/ol/root /dev/sda3

  Extending logical volume root to 26.09 GiB

  Logical volume root successfully resized

[root@localhost ~]# df -h

Filesystem           Size  Used Avail Use% Mounted on

/dev/mapper/ol-root   17G   11G  6.0G  63% /

devtmpfs             857M     0  857M   0% /dev

tmpfs                866M   80K  866M   1% /dev/shm

tmpfs                866M  9.0M  857M   2% /run

tmpfs                866M     0  866M   0% /sys/fs/cgroup

/dev/sda1            997M  153M  844M  16% /boot

[root@localhost ~]# resize2fs /dev/ol/root

resize2fs 1.42.9 (28-Dec-2013)

resize2fs: Bad magic number in super-block while trying to open /dev/ol/root

Couldn't find valid filesystem superblock.


[root@localhost ~]# xfs_growfs /dev/mapper/ol-root

meta-data=/dev/mapper/ol-root    isize=256    agcount=4, agsize=1054464 blks

         =                       sectsz=512   attr=2, projid32bit=1

         =                       crc=0

data     =                       bsize=4096   blocks=4217856, imaxpct=25

         =                       sunit=0      swidth=0 blks

naming   =version 2              bsize=4096   ascii-ci=0 ftype=0

log      =internal               bsize=4096   blocks=2560, version=2

         =                       sectsz=512   sunit=0 blks, lazy-count=1

realtime =none                   extsz=4096   blocks=0, rtextents=0

data blocks changed from 4217856 to 6838272

[root@localhost ~]# df -h

Filesystem           Size  Used Avail Use% Mounted on

/dev/mapper/ol-root   27G   11G   16G  39% /

devtmpfs             857M     0  857M   0% /dev

tmpfs                866M   80K  866M   1% /dev/shm

tmpfs                866M  9.0M  857M   2% /run

tmpfs                866M     0  866M   0% /sys/fs/cgroup

/dev/sda1            997M  153M  844M  16% /boot

Tuesday, 14 June 2016

RAC boot sequence

RAC Startup Sequence

Stop sequence for a node:
emctl stop dbconsole
srvctl stop database -d db_name
srvctl stop asm -n node_name
srvctl stop nodeapps -n node_name --> in 11.2 stops only ONS and eONS because of some dependencies.
crsctl stop crs --root

Or stop csr on all nodes of clusterware:
crsctl stop cluster -all

Start : start from bottom to up



Level 1: OHASD Spawns:
    cssdagent         – Agent responsible for spawning CSSD.
    orarootagent     – Agent responsible for managing all root owned ohasd resources.
    oraagent         – Agent responsible for managing all oracle owned ohasd resources.
    cssdmonitor        – Monitors CSSD and node health (along wth the cssdagent).
   
Level 2: OHASD rootagent spawns:
    CSDD (ora.cssd)     – Cluster Synchronization Services
    CRSD(ora.crsd)     – Primary daemon responsible for managing cluster resources.
    CTSSD(ora.ctssd)     – Cluster Time Synchronization Services Daemon
    Diskmon(ora.diskmon)
    ACFS (ASM Cluster File System) Drivers
Level 2: OHASD oraagent spawns:
    MDNSD(ora.mdnsd)     – Used for DNS lookup
    GIPCD(ora.gipcd)     – Used for inter-process and inter-node communication
    GPNPD(ora.gpnpd)     – Grid Plug & Play Profile Daemon
    EVMD(ora.evmd)     – Event Monitor Daemon
    ASM(ora.asm)     – Resource for monitoring ASM instances
Level 3: CRSD spawns:
    orarootagent     – Agent responsible for managing all root owned crsd resources.
    oraagent         – Agent responsible for managing all oracle owned crsd resources.
Level 4: CRSD rootagent spawns:
    Network resource     – To monitor the public network
    SCAN VIP(s)     – Single Client Access Name Virtual IPs
    Node VIPs         – One per node
    ACFS Registery     – For mounting ASM Cluster File System
    GNS VIP (optional)     – VIP for GNS
Level 4: CRSD oraagent spawns:
    ASM Resouce     – ASM Instance(s) resource
    Diskgroup         – Used for managing/monitoring ASM diskgroups.
    DB Resource     – Used for monitoring and managing the DB and instances
    SCAN Listener     – Listener for single client access name, listening on SCAN VIP
    Listener         – Node listener listening on the Node VIP
    Services         – Used for monitoring and managing services
    ONS         – Oracle Notification Service
    eONS         – Enhanced Oracle Notification Service
    GSD         – For 9i backward compatibility
    GNS (optional)     – Grid Naming Service – Performs name resolution
====
Clusterware startup command  $GI_HOME/bin/crsctl start crs
A workaround is to look at the some of outputs  of root.sh command during the initial Grid infrastructure installation process as follow:
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
CRS-2672: Attempting to start ‘ora.gipcd’ on ‘owirac1’
CRS-2672: Attempting to start ‘ora.mdnsd’ on ‘owirac1’
CRS-2676: Start of ‘ora.mdnsd’ on ‘owirac1’ succeeded
CRS-2672: Attempting to start ‘ora.gipcd’ on ‘owirac1’
CRS-2676: Start of ‘ora.gipcd’ on ‘owirac1’ succeeded
CRS-2672: Attempting to start ‘ora.gpnpd’ on ‘owirac1’
CRS-2676: Start of ‘ora.gpnpd’ on ‘owirac1’ succeeded
CRS-2672: Attempting to start ‘ora.cssdmonitor’ on ‘owirac1’
CRS-2676: Start of ‘ora.cssdmonitor’ on ‘owirac1’ succeeded
CRS-2672: Attempting to start ‘ora.cssd’ on ‘owirac1’
CRS-2672: Attempting to start ‘ora.diskmon’ on ‘owirac1’
CRS-2676: Start of ‘ora.diskmon’ on ‘owirac1’ succeeded
CRS-2676: Start of ‘ora.cssd’ on ‘owirac1’ succeeded
CRS-2672: Attempting to start ‘ora.ctssd’ on ‘owirac1’
CRS-2676: Start of ‘ora.ctssd’ on ‘owirac1’ succeeded
CRS-2672: Attempting to start ‘ora.asm’ on ‘owirac1’
CRS-2676: Start of ‘ora.asm’ on ‘owirac1’ succeeded
CRS-2672: Attempting to start ‘ora.crsd’ on ‘owirac1’
CRS-2676: Start of ‘ora.crsd’ on ‘owirac1’ succeeded
CRS-2672: Attempting to start ‘ora.evmd’ on ‘owirac1’
CRS-2676: Start of ‘ora.evmd’ on ‘owirac1’ succeeded
CRS-2672: Attempting to start ‘ora.asm’ on ‘owirac1’
CRS-2676: Start of ‘ora.asm’ on ‘owirac1’ succeeded
CRS-2672: Attempting to start ‘ora.OCRVOTDSK.dg’ on ‘owirac1’
CRS-2676: Start of ‘ora.OCRVOTDSK.dg’ on ‘owirac1’ succeeded
CRS-2672: Attempting to start ‘ora.registry.acfs’ on ‘owirac1’
CRS-2676: Start of ‘ora.registry.acfs’ on ‘owirac1’ succeeded
This  sequence shows  the   ASM instance startup  is just one step in middle of  the entire sequence : Some of  CRS components such as CSSD, CTSS get started before ASM, while other components such as CRSD,  EVEMD, ACFS are up after the ASM starts.  This sequence can be also confirmed by the  timestamps and log messages in  clusterware log files  (alter<hostname>.log, cssd.log and crsd.log)  and ASM instance log like  alert_+ASM1.log . Here are the sequences of messages and their timestamps: during the startup of 11g R2 clusterware and ASM instance:
OLR service started  : 2011-01-17 14:33:13.678
Starting CSS daemon 2011-01-17 14:33:18.684:
Fetching asmlib disk :ORCL:OCR1 : 2011-01-17 14:33:24.825
Read ASM header off dev:ORCL:OCR3:224:256
Opened hdl:0x1d485110 for dev:ORCL:OCR1: 2011-01-17 14:33:24.829
Successful discovery for disk ORCL:OCR1 : 2011-01-17 14:33:24.837
Successful discovery of 5 disks: 2011-01-17 14:33:24.838
CSSD voting file is online: ORCL:OCR1:  2011-01-17 14:33:50.047
CSSD Reconfiguration complete: 2011-01-17 14:34:07.729
The Cluster Time Synchronization Service started:  2011-01-17 14:34:12.333
Note: ** CSSD and CTSSD got up before ASM .  Votingdisks were discovered  by reading the header of the ASM disks (OCRL:OCR1) of  the votingdisk diskgroup without using ASM instance **
Starting ASM: Jan 17 14:34:13 2011 
CRS Daemon Starting 2011-01-17 14:34:30.329:  
Checking the OCR device : 2011-01-17 14:34:30.331
Initializing OCR 2011-01-17 14:34:30.337
diskgroup OCRVOTDSK was mounted : Jan 17 14:34:30 2011
OCRVOTDSK was mounted : Mon Jan 17 14:34:30 2011
The OCR service started : 2011-01-17 14:34:30.835
Verified ocr1-5: 2011-01-17 14:33:50.128
Cluster Time Synchronization Service started:  2011-01-17 14:34:12.333
The OCR service started : 2011-01-17 14:34:30.835 
CRSD started: 2011-01-17 14:34:31.902
Note: CRS server started  after ASM is up and the diskgroup for OCR and votingdisks are mounted
From this sequence of the log message and timestamp, we get some understanding about the sequence of clusterware and ASM instance:
1)      CSSD and CTSSD are up before ASM
2)      Votingdisks used by CSSD are discovered by reading the header of the disks, not throught ASM
3)      Startup of CRS service has to wait until ASM instance is up and the diskgroup for OCR and votingdisk is mounted.



Monday, 13 June 2016

RAC auto PSU patching


This auto patching procedure should be done on every node in the cluster: (auto PSU method applies patch to both GI and RDBMS home in the same node)
===========================================================================
[oracle@oracletestdb softwares]$ /data01/app/oracle/product/11.2.0.4/grid_home/OPatch/ocm/bin/emocmrsp -no_banner -output /data01/softwares/ocm.rsp
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:

You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
The OCM configuration response file (/data01/softwares/ocm.rsp) was successfully created.
===============================================================================
 [oracle@oracletestdb ~]$ /data01/app/oracle/product/11.2.0.4/grid_home/OPatch/opatch lsinventory -oh /data01/app/oracle/product/11.2.0.4/grid_home
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2016, Oracle Corporation.  All rights reserved.


Oracle Home       : /data01/app/oracle/product/11.2.0.4/grid_home
Central Inventory : /u01/app/oraInventory
   from           : /data01/app/oracle/product/11.2.0.4/grid_home/oraInst.loc
OPatch version    : 11.2.0.3.12
OUI version       : 11.2.0.4.0
Log file location : /data01/app/oracle/product/11.2.0.4/grid_home/cfgtoollogs/opatch/opatch2016-06-11_01-22-02AM_1.log

Lsinventory Output file location : /data01/app/oracle/product/11.2.0.4/grid_home/cfgtoollogs/opatch/lsinv/lsinventory2016-06-11_01-22-02AM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: oracletestdb.ushrnd3.savvis.net
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1):

Oracle Grid Infrastructure 11g                                       11.2.0.4.0
There are 1 products installed in this Oracle Home.

There are no Interim patches installed in this Oracle Home.

Rac system comprising of multiple nodes
  Local node = oracletestdb
  Remote node = s616183dc3sl16
--------------------------------------------------------------------------------
OPatch succeeded.
===========================================================================
[oracle@oracletestdb ~]$
[oracle@oracletestdb ~]$ cd /data01/softwares/
[oracle@oracletestdb softwares]$ ls
client                                                                                         p10404530_112030_Linux-x86-64_1of7.zip
database                                                                                       p10404530_112030_Linux-x86-64_2of7.zip
grid                                                                                           p10404530_112030_Linux-x86-64_3of7.zip
?m??e??Ö©?????"????+&??????Ñ?]`?ר???S?0??0P7?_d?7O?p?,??i~Z?&c???Êk~?XcÔ²????]?h???:???8?^H ????  p10404530_112030_Linux-x86-64_4of7.zip
OBIARCU                                                                                        p13390677_112040_Linux-x86-64_1of7.zip
ocm.rsp                                                                                        p13390677_112040_Linux-x86-64_2of7.zip
oracleasm-2.6.18-274.el5-2.0.5-1.el5.x86_64.rpm                                                p13390677_112040_Linux-x86-64_3of7.zip
oracleasm-2.6.18-274.el5debug-2.0.5-1.el5.x86_64.rpm                                           p22738793_112040_Linux-x86-64.zip
oracleasm-2.6.18-274.el5-debuginfo-2.0.5-1.el5.x86_64.rpm                                      p6880880_112000_Linux-x86-64.zip
oracleasmlib-2.0.4-1.el5.x86_64.rpm                                                            upgradebkp
oracleasm-support-2.1.8-1.el5.x86_64.rpm
[oracle@oracletestdb softwares]$ unzip p22738793_112040_Linux-x86-64.zip

oracle@oracletestdb softwares]$ sudo su -
[root@oracletestdb ~]# ps -ef|grep smon
root      4510  4442  0 01:29 pts/0    00:00:00 grep smon
oracle   14033     1  0 Jun08 ?        00:00:13 ora_smon_HYPPDR1
oracle   19657     1  0 Jun08 ?        00:00:14 ora_smon_OBIAPDR1
root     25505     1  0 Jun08 ?        00:09:49 /data01/app/oracle/product/11.2.0.4/grid_home/bin/osysmond.bin
oracle   27166     1  0 Jun08 ?        00:00:00 asm_smon_+ASM1
[root@oracletestdb ~]# cd  /data01/app/oracle/product/11.2.0.4/grid_home
[root@oracletestdb grid_home]# cd OPatch
[root@oracletestdb OPatch]# ./opatch auto /data01/softwares/22738793 -ocmrf /data01/softwares/ocm.rsp
Executing /data01/app/oracle/product/11.2.0.4/grid_home/perl/bin/perl ./crs/patch11203.pl -patchdir /data01/softwares -patchn 22738793 -ocmrf /data01/softwares/ocm.rsp -paramfile /data01/app/oracle/product/11.2.0.4/grid_home/crs/install/crsconfig_params

This is the main log file: /data01/app/oracle/product/11.2.0.4/grid_home/cfgtoollogs/opatchauto2016-06-11_01-30-53.log

This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/data01/app/oracle/product/11.2.0.4/grid_home/cfgtoollogs/opatchauto2016-06-11_01-30-53.report.log

2016-06-11 01:30:53: Starting Clusterware Patch Setup
Using configuration parameter file: /data01/app/oracle/product/11.2.0.4/grid_home/crs/install/crsconfig_params

Unable to determine if /u01/app/oracle/product/11.2.0.4/dbhome_1 is shared oracle home
Enter 'yes' if this is not a shared home or if the prerequiste actions are performed to patch this shared home (yes/no):yes

Unable to determine if /data01/app/oracle/product/11.2.0.4/grid_home is shared oracle home
Enter 'yes' if this is not a shared home or if the prerequiste actions are performed to patch this shared home (yes/no):yes

Stopping RAC /u01/app/oracle/product/11.2.0.4/dbhome_1 ...
Stopped RAC /u01/app/oracle/product/11.2.0.4/dbhome_1 successfully

patch /data01/softwares/22738793/22502456  apply successful for home  /u01/app/oracle/product/11.2.0.4/dbhome_1
patch /data01/softwares/22738793/22502549/custom/server/22502549  apply successful for home  /u01/app/oracle/product/11.2.0.4/dbhome_1
patch /data01/softwares/22738793/22674697  apply successful for home  /u01/app/oracle/product/11.2.0.4/dbhome_1

Stopping CRS...
Stopped CRS successfully

patch /data01/softwares/22738793/22502456  apply successful for home  /data01/app/oracle/product/11.2.0.4/grid_home
patch /data01/softwares/22738793/22502549  apply successful for home  /data01/app/oracle/product/11.2.0.4/grid_home
patch /data01/softwares/22738793/22502505  apply successful for home  /data01/app/oracle/product/11.2.0.4/grid_home

Starting CRS...
Installing Trace File Analyzer
CRS-4123: Oracle High Availability Services has been started.

Starting RAC /u01/app/oracle/product/11.2.0.4/dbhome_1 ...
Started RAC /u01/app/oracle/product/11.2.0.4/dbhome_1 successfully

opatch auto succeeded.


=====================================================
Abover steps need to do in every node in the cluster:
=====================================================




[root@oracletestdb OPatch]# ps -ef|grep smon
root     13471     1  0 01:46 ?        00:00:00 /data01/app/oracle/product/11.2.0.4/grid_home/bin/osysmond.bin
oracle   15033     1  0 01:47 ?        00:00:00 asm_smon_+ASM1
oracle   17861     1  0 01:48 ?        00:00:00 ora_smon_HYPPDR1
oracle   17972     1  0 01:48 ?        00:00:00 ora_smon_OBIAPDR1
root     19079  4442  0 01:48 pts/0    00:00:00 grep smon
[root@oracletestdb OPatch]#
=========================================================
==========================================================
[oracle@oracletestdb OPatch]$ ps -ef|grep smon
root     13471     1  0 01:46 ?        00:00:14 /data01/app/oracle/product/11.2.0.4/grid_home/bin/osysmond.bin
oracle   15033     1  0 01:47 ?        00:00:00 asm_smon_+ASM1
oracle   17861     1  0 01:48 ?        00:00:01 ora_smon_HYPPDR1
oracle   17972     1  0 01:48 ?        00:00:01 ora_smon_OBIAPDR1
oracle   19879 16965  0 02:51 pts/0    00:00:00 grep smon
[oracle@oracletestdb OPatch]$ . oraenv
ORACLE_SID = [oracle] ? HYPPDR1
The Oracle base has been set to /u01/app/oracle
[oracle@oracletestdb OPatch]$ cd
[oracle@oracletestdb ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sat Jun 11 02:51:57 2016

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, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> @?/rdbms/admin/catbundle.sql psu apply
===========================================================
=======================================================

sqlplus / as sysdba
SQL> alter system set cluster_database=false scope=spfile;

srvctl stop database -d <db Name>  (we need to down instances in all the nodes, so i am using srvctl)

cd $ORACLE_HOME/sqlpatch/22674697
$sqlplus / as sysdba
sql>startup upgrade
sql>postinstall.sql
SQL> alter system set cluster_database=true scope=spfile;
sql>shut immediate
sql>exit

srvctl start database -d <db Name>

$sqlplus / as sysdba
sql>@?/rdbms/admin/utlrp.sql
========================================================


Friday, 10 June 2016

yum install for oracle database 12cr2 in OEL7



login as: root
root@192.168.245.128's password:
Last login: Fri Jun 10 02:48:04 2016 from 192.168.245.1
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost ~]#vi /etc/yum.repos.d/public-yum-ol7.repo

[ol7_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL7/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
===========================


[root@localhost yum.repos.d]# yum install oracle-database-server-12cR2-preinstall -y

To install ASM Libs:

[root@localhost yum.repos.d]# yum install oracleasm -y
[root@localhost yum.repos.d]# yum install oracleasm-support