PDB Hot Clone – 12cR2

Oracle Database 12c Release 2 PDB Hot Clone, this will make your database move easier than ever. This is just testing purpose, Oracle Database 12c will be release in 2016.

[oracle@db12c orcl12]$ ls -lart
total 2865720
drwxr-x---. 3 oracle vboxsf       4096 Oct 24 22:08 ..
drwxr-x---. 2 oracle vboxsf       4096 Oct 24 22:08 pdbseed
drwxr-x---. 2 oracle vboxsf       4096 Oct 24 22:08 pdb1
drwxr-x---. 4 oracle vboxsf       4096 Oct 24 22:08 .
-rw-r-----. 1 oracle vboxsf    5251072 Nov 26 22:06 users01.dbf
-rw-r-----. 1 oracle vboxsf   52429312 Nov 26 22:10 redo03.log
-rw-r-----. 1 oracle vboxsf   52429312 Nov 26 22:10 redo01.log
-rw-r-----. 1 oracle vboxsf  117448704 Nov 26 22:11 temp01.dbf
-rw-r-----. 1 oracle vboxsf  162537472 Nov 26 22:14 undotbs01.dbf
-rw-r-----. 1 oracle vboxsf 1646272512 Nov 26 22:14 sysaux01.dbf
-rw-r-----. 1 oracle vboxsf  922755072 Nov 26 22:14 system01.dbf
-rw-r-----. 1 oracle vboxsf   18726912 Nov 26 22:14 control01.ctl
-rw-r-----. 1 oracle vboxsf   18726912 Nov 26 22:14 control02.ctl
-rw-r-----. 1 oracle vboxsf   52429312 Nov 26 22:14 redo02.log

mkdir -p /u01/app/oracle/oradata/orcl12/pdb2

create pluggable database pdb2 from pdb1
FILE_NAME_CONVERT = ('/u01/app/oracle/oradata/orcl12/pdb1', '/u01/app/oracle/oradata/orcl12/pdb2');

SQL> col totalsize for 9999999 heading "TotalSize(Mb)"
SQL> select inst_id,con_id,dbid,name,open_mode,round(total_size/1024/1024,1) totalsize from GV$PDBS;

   INST_ID     CON_ID       DBID NAME            OPEN_MODE  TotalSize(Mb)
---------- ---------- ---------- --------------- ---------- -------------
         1          2 3543631094 PDB$SEED        READ ONLY            800
         1          3 3929371449 PDB1            READ WRITE          1086

SQL> create pluggable database pdb2 from pdb1
  2  FILE_NAME_CONVERT = ('/u01/app/oracle/oradata/orcl12/pdb1', '/u01/app/oracle/oradata/orcl12/pdb1');
create pluggable database pdb2 from pdb1
*
ERROR at line 1:
ORA-44607: Archive logging must be enabled.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 1048576000 bytes
Fixed Size                  4590720 bytes
Variable Size             490734464 bytes
Database Buffers          549453824 bytes
Redo Buffers                3796992 bytes
Database mounted.
SQL> alter database archivelog;

Database altered.

SQL> alter system set log_archive_dest_1='LOCATION=/u01/app/oracle/archive' scope=both;

System altered.

SQL> alter database open;

Database altered.

SQL> create pluggable database pdb2 from pdb1
  2  FILE_NAME_CONVERT = ('/u01/app/oracle/oradata/orcl12/pdb1', '/u01/app/oracle/oradata/orcl12/pdb2');

Pluggable database created.

SQL> select inst_id,con_id,dbid,name,open_mode,round(total_size/1024/1024,1) totalsize from GV$PDBS;

   INST_ID     CON_ID       DBID NAME            OPEN_MODE  TotalSize(Mb)
---------- ---------- ---------- --------------- ---------- -------------
         1          2 3543631094 PDB$SEED        READ ONLY            800
         1          3 3929371449 PDB1            READ WRITE          1086
         1          4 4017322761 PDB2            MOUNTED                0

SQL> alter pluggable database pdb2 open;

Pluggable database altered.

SQL> select inst_id,con_id,dbid,name,open_mode,round(total_size/1024/1024,1) totalsize from GV$PDBS;

   INST_ID     CON_ID       DBID NAME            OPEN_MODE  TotalSize(Mb)
---------- ---------- ---------- --------------- ---------- -------------
         1          2 3543631094 PDB$SEED        READ ONLY            800
         1          3 3929371449 PDB1            READ WRITE          1086
         1          4 4017322761 PDB2            READ WRITE           995

Waiting 🙂

Silent install & configure ASM & Database (Non ASMLIB)

There 4 disks mapped as linux devices. Using Fdisk to create partition for these raw disks.

[root@pridb dev]# ls -lart sd*
brw-rw—- 1 root disk 8,  0 Oct 29 09:14 sda
brw-rw—- 1 root disk 8,  2 Oct 29 09:14 sda2
brw-rw—- 1 root disk 8,  1 Oct 29 09:14 sda1
brw-rw—- 1 root disk 8, 16 Oct 29 09:14 sdb
brw-rw—- 1 root disk 8, 32 Oct 29 09:14 sdc
brw-rw—- 1 root disk 8, 48 Oct 29 09:14 sdd
brw-rw—- 1 root disk 8, 80 Oct 29 09:14 sdf
brw-rw—- 1 root disk 8, 64 Oct 29 09:14 sde

To manage disks and permission when starting OS you must use UDEV.

[root@pridb ~]# vi /etc/udev/rules.d/99-oracle-asmdevices.rules

KERNEL==”sdb1″, NAME=”disk01″, OWNER=”oracle”, GROUP=”dba”, MODE=”0660″
KERNEL==”sdc1″, NAME=”disk02″, OWNER=”oracle”, GROUP=”dba”, MODE=”0660″
KERNEL==”sdd1″, NAME=”disk03″, OWNER=”oracle”, GROUP=”dba”, MODE=”0660″
KERNEL==”sde1″, NAME=”disk04″, OWNER=”oracle”, GROUP=”dba”, MODE=”0660″

Reload rule and start UDEV

[root@pridb ~]# udevadm control –reload-rules
[root@pridb ~]# start_udev
Starting udev:                                             [  OK  ]

Check disks alias created on /dev/

[root@pridb dev]# ls -lart  disk*
brw-rw—- 1 oracle dba  8, 49 Oct 29 09:28 disk03
brw-rw—- 1 oracle dba  8, 33 Oct 29 09:28 disk02
brw-rw—- 1 oracle dba  8, 81 Oct 29 09:34 disk05
brw-rw—- 1 oracle dba  8, 65 Oct 29 09:36 disk04
brw-rw—- 1 oracle dba  8, 17 Oct 29 09:36 disk01

Install GRID Infrastructure in silent mode

./runInstaller -invPtrLoc /etc/oraInst.loc -silent FROM_LOCATION=../stage/products.xml ORACLE_HOSTNAME=PRIDB ORACLE_BASE=/oracle SELECTED_LANGUAGES=en ORACLE_HOME=/oracle/11.2.0.4/grid INVENTORY_LOCATION=/oracle/oraInventory oracle.install.option=HA_CONFIG oracle.install.asm.diskGroup.diskDiscoveryString=’/dev/disk*’ oracle.install.asm.diskGroup.name=DATA oracle.install.asm.diskGroup.disks=’/dev/disk01′ oracle.install.asm.SYSASMPassword=sysadmin oracle.install.asm.monitorPassword=sysadmin oracle.install.asm.OSDBA=dba oracle.install.asm.OSOPER=dba oracle.install.asm.OSASM=dba oracle.install.asm.diskGroup.redundancy=EXTERNAL oracle.install.asm.upgradeASM=false

As a root user, execute the following script(s):
1. /oracle/11.2.0.4/grid/root.sh
As install user, execute the following script to complete the configuration.
1. /oracle/11.2.0.4/grid/cfgtoollogs/configToolAllCommands RESPONSE_FILE=<response_file>
Note:
1. This script must be run on the same host from where installer was run.
2. This script needs a small password properties file for configuration assistants that require passwords (refer to install guide documentation).
Successfully Setup Software.

[root@pridb grid]# /oracle/11.2.0.4/grid/root.sh
Check /oracle/11.2.0.4/grid/install/root_pridb_2015-10-29_01-33-05.log for the output of root script

[root@pridb ~]# tail -f /oracle/11.2.0.4/grid/install/root_pridb_2015-10-29_01-33-05.log
Creating trace directory
LOCAL ADD MODE
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 pridb successfully pinned.
Adding Clusterware entries to upstart
pridb     2015/10/29 01:33:28     /oracle/11.2.0.4/grid/cdata/pridb/backup_20151029_013328.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server

Configure ASM & Create Diskgroup

[oracle@pridb bin]$ ./asmca -silent -configureASM -sysAsmPassword sysadmin -asmsnmpPassword sysadmin -diskString ‘/dev/disk*’ -diskGroupName DATA -diskList ‘/dev/disk01’ -redundancy EXTERNAL -au_size 16 -compatible.asm ‘11.2.0.0.0’ -compatible.rdbms ‘11.2.0.0.0’

ASM created and started successfully.
Disk Group DATA created successfully.

Install Oracle Home Software

./runInstaller -silent FROM_LOCATION=../stage/products.xml oracle.install.option=INSTALL_DB_SWONLY UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=/oracle/oraInventory ORACLE_HOME=/oracle/dbsoft/db_1 ORACLE_HOME_NAME=”OraDb11g_Home1″ ORACLE_BASE=/oracle/dbsoft oracle.install.db.InstallEdition=EE oracle.install.db.isCustomInstall=false oracle.install.db.DBA_GROUP=dba oracle.install.db.OPER_GROUP=dba DECLINE_SECURITY_UPDATES=true

As a root user, execute the following script(s):
1. /oracle/dbsoft/db_1/root.sh
Successfully Setup Software.

[root@pridb oracle]# /oracle/dbsoft/db_1/root.sh
Check /oracle/dbsoft/db_1/install/root_pridb_2015-10-29_02-36-15.log for the output of root script
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME=  /oracle/dbsoft/db_1
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.
Finished product-specific root actions.
Finished product-specific root actions.

Create Database

[oracle@pridb ~]$ dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbName DBTEST -sid DBTEST -SysPassword sysadmin -SystemPassword sysadmin -emConfiguration NONE -redoLogFileSize 100 -storageType ASM -asmSysPassword sysadmin -diskGroupName DATA -characterSet AL32UTF8 -memoryPercentage 40 -automaticMemoryManagement true -sampleSchema true -initParams filesystemio_options=setall,job_queue_processes=1000,log_buffer=10485760,processes=500,open_cursors=300,session_cached_cursors=300
5% complete
Copying database files
7% complete
8% complete
38% complete
Creating and starting Oracle instance
39% complete
41% complete
45% complete
46% complete
50% complete
54% complete
55% complete
56% complete
59% complete
61% complete
Registering database with Oracle Restart
66% complete
Completing Database Creation
70% complete
73% complete
76% complete
86% complete
96% complete
100% complete
Look at the log file “/oracle/dbsoft/cfgtoollogs/dbca/DBTEST/DBTEST0.log” for further details.

Check Database status

SQL> select name,open_mode from v$database;

NAME      OPEN_MODE
——— ——————–
DBTEST    READ WRITE

Save your time 🙂

Upgrade Standalone DB 11gR2 (11.2.0.3) to DB 12c (12.1.0.1)

11gto12c_Standalone_S1

11gto12c_Standalone_S2

11gto12c_Standalone_S3

11gto12c_Standalone_S4

Select Apply Action

11gto12c_Standalone_S5

11gto12c_Standalone_S6

11gto12c_Standalone_S7

Change database file path if needed by select Move Database Files.

11gto12c_Standalone_S8

11gto12c_Standalone_S9

11gto12c_Standalone_S10

Backup before Upgrade id needed by Select Use RMAN backup and specify backup location. If not Select I have own backup and restore strategy.

11gto12c_Standalone_S11

Check all again before Upgrade.

11gto12c_Standalone_S12

11gto12c_Standalone_S13

11gto12c_Standalone_S14

11gto12c_Standalone_S15

11gto12c_Standalone_S16

[oracle@rac03 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------------------------------------------
Name               Target     State        Server                   State details       Local Resources
--------------------------------------------------------------------------------------------------------------------
ora.CRS.dg       ONLINE  ONLINE    rac03                    STABLE
ora.DATA.dg      ONLINE  ONLINE   rac03                    STABLE
ora.LISTENER.lsnr  ONLINE  ONLINE       rac03          STABLE
ora.asm              ONLINE  ONLINE      rac03                 Started,STABLE
ora.ons               OFFLINE OFFLINE   rac03                 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1        ONLINE  ONLINE       rac03                          STABLE
ora.diskmon
1        OFFLINE OFFLINE                                        STABLE
ora.evmd
1        ONLINE  ONLINE       rac03                           STABLE
ora.test12c.db
1        ONLINE  ONLINE       rac03                           Open,STABLE
--------------------------------------------------------------------------------

Moving the 11R2 RAC database servers to new datacenter with changed IP address and subnet

  • Shutdown the CRS and DISABLE CRS auto start
  • Move the servers to new data center
  • Start the CRS – only on first node(./crsctl start crs)
  • Update the GPGNP profile in 11gR2
  • Modify the IP details on OCR using oifcfg
  • Now bounce CRS on first node and start the CRS on second node           NOW, WE JUST FOCUS ON THE THIRD AND FOURTH STEP.

    Suppose:

                 Inter connect IP: 192.168.95.110

                Subnet: 192.168.95.0

                Virtual IP: 192.168.164.110

                Subnet: 192.168.164.0

    • Start the CRS – only on first node(./crsctl start crs)

    When we Start the CRS – we got below errors when we tried starting the CRS with server running on different subnet with new IP address.
    ” [crsd(21366)]CRS-0804:Cluster Ready Service aborted due to Oracle Cluster Registry error [PROC-44: Error in network address and interface operations Network address and interface operations error [7]]. Details at (:CRSD00111:) in /u01/app2/grid/11.2.0/log/oracledb08/crsd/crsd.log.”

    Case: Change subnet and IP of Private,VIP,SCAN. The CRSD process will not start and any subsequent changes (using oficfg) to the OCR will be impossible NOTE:1094024.1

    Cause: As of 11.2 Grid Infrastructure, the CRS daemon (crsd.bin) now has a dependency on the private network configuration stored in the gpnp profile and OCR.  If the private network is not available or its definition is incorrect.

    Solution: It needs to be taken when making modifications to the configuration of the private network. It is important to perform the changes in the correct order.

    • Update the GPGNP profile in 11gR2 (run all the steps on first node as ROOT unless specified dont run on other nodes)

    STEP1: Start CRS on all the nodes (though CRSD won’t come up we need gpnp deamon running on all the cluster nodes)

    su – root

    # cd $GRID_HOME/bin

    # ./crsctl start crs

    # ps -ef | grep gpnp

    grid 27470   1  0 01:09:08 ?    0:38 u01/app2/11.2.0/grid/bin/gpnpd.bin

    STEP 2: On first node: As the from 11gR2 – CRS startup is based on GPNP profile we need to update profile to reflect new IP address (to view current profile infomation

    su – root

    # cd $GRID_HOME/bin/

    # ./gpnptool get >> we can notice the old ip and interface name

    Warning: some command line parameters were defaulted. Resulting command line:

    ./gpnptool.bin get -o-

    <?xml version=”1.0″ encoding=”UTF-8″?><gpnp:GPnP-Profile Version=”1.0″ xmlns=”http://www.grid-pnp.org/2005/11/gpnp-profile&#8221; xmlns:gpnp=”http://www.grid-pnp.org/2005/11/gpnp-profile&#8221; xmlns:orcl=”http://www.oracle.com/gpnp/2005/11/gpnp-profile&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; xsi:schemaLocation=”http://www.grid-pnp.org/2005/11/gpnp-profile gpnp-profile.xsd” ProfileSequence=”25″ ClusterUId=”a376122ae0fcffbaffed51fc0c0afee2″ ClusterName=”oraclecrs” PALocation=””><gpnp:Network-Profile><gpnp:HostNetwork id=”gen” HostName=”*”><gpnp:Network id=”net2” IP=”10.10.10.0″ Adapter=”lan900″ Use=”cluster_interconnect”/><gpnp:Network id=”net1” Adapter=”lan0″ IP=”192.168.97.0″ Use=”public”/>

    ………

    Success.

    STEP 3: on first node: Take backup of existing GPNP profile before editing (we are going have temp profile XML file and do our modification there in that file). This profile (will be store in $GRID_HOME/gpnp/hostname/profiles/peer) is the backup of the profile store in OCR, in case of failure CRS will auto re-create this file.

    # mkdir /home/oracle/gpnp

    # export GPNPDIR=/home/oracle/gpnp

    # ./gpnptool get -o=$GPNPDIR/profile.original

    # cp $GPNPDIR/profile.original $GPNPDIR/prf.xml

    STEP 4: on first node: Get current profile sequence number – this is the version of profile, we need to increment it while editing profile i.e current prf_sq +1. If you don’t increase this number you will get Error CLSGPNP_TOO_OLD when trying put profile to OCR.

    su – root

    # cd $GRID_HOME/bin

    # ./gpnptool getpval -p=$GPNPDIR/p.xml -prf_sq -o-

    20

    STEP 5: on first node: Get available network interfaces

    su – root

    # cd $GRID_HOME/bin

    # ./oifcfg iflist

    lan1  169.254.0.0

    lan1  192.168.95.0

    lan0  192.168.97.0

    lan7  192.168.97.0

    lan5  192.168.99.0

    lan900  192.168.164.0

    STEP 6: Get the current NETWORK ID from profile and crosscheck the xml file

    su – root

    # cd $GRID_HOME/bin

    # ./gpnptool getpval -p=$GPNPDIR/p.xml -net -o-

    net1 net2

    STEP 7: Now update the profile which created in previous step with new IP subnet of interconnect and VIP

    su – root

    # cd $GRID_HOME/bin

    # ./gpnptool edit -p=$GPNPDIR/p.xml -o=$GPNPDIR/prf.xml -ovr -prf_sq=21 -net1:net_use=public -net1:net_ip=192.168.164.0 -net1:net_ada=lan900

    # ./gpnptool edit -p=$GPNPDIR/p.xml -o=$GPNPDIR/prf.xml -ovr -prf_sq=21 -net2:net_use=cluster_interconnect -net2:net_ip=192.168.95.0 -net2:net_ada=lan1

    # cat $GPNPDIR/prf_new.xml >> new IP subnet of Interconnect and VIP should be here

    <?xml version=”1.0″ encoding=”UTF-8″?><gpnp:GPnP-Profile Version=”1.0″ xmlns=”http://www.grid-pnp.org/2005/11/gpnp-profile&#8221; xmlns:gpnp=”http://www.grid-pnp.org/2005/11/gpnp-profile&#8221; xmlns:orcl=”http://www.oracle.com/gpnp/2005/11/gpnp-profile&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; xsi:schemaLocation=”http://www.grid-pnp.org/2005/11/gpnp-profile gpnp-profile.xsd” ProfileSequence=”21″ ClusterUId=”a376122ae0fcffbaffed51fc0c0afee2″ ClusterName=”oraclecrs” PALocation=””><gpnp:Network-Profile><gpnp:HostNetwork id=”gen” HostName=”*”><gpnp:Network id=”net1” IP=”192.168.164.0″ Adapter=”lan900″ Use=”public”/><gpnp:Network id=”net2” IP=”192.168.95.0″ Adapter=”lan1″ Use=”cluster_interconnect”/>

    ………

    Success.

    –> It will deffer with the last time we saw.

    STEP 8: Sign with encrypted wallet and update to OCR

    su – root

    # cd $GRID_HOME/bin

    # ./gpnptool sign -p=$GPNPDIR/prf.xml -o=$GPNPDIR/prf_new.xml -ovr -w=cw-fs:peer

    # ./gpnptool put -p=$GPNPDIR/prf_new.xml

    Success

    # ./gpnptool get >> check again, if content is the same with $GPNPDIR/prf_new.xml then you are done, but crs will not run with this profile until you restart.

    # ./crsctl stop crs –f

    # ./crsctl start crs

    STEP 9: Now we run oifcfg getif — it will be warned/error which ignorable as we edited GPNP profile and its not matching with OCR

    su – root

    # cd $GRID_HOME/bin

    # ./oifcfg getif >> first time system will show below errorPRIF-30: Network information in OCR and GPnP profile differs

    # ./oifcfg delif -global lan1

    # ./oifcfg delif -global lan900

    # ./oifcfg setif -global lan900/192.168.164.0:public

    # ./oifcfg setif -global lan1/192.168.95.0:cluster_interconnect

    # ./oifcfg getif

    lan1  192.168.95.0  global  cluster_interconnect

    lan900  192.168.164.0  global  public

    STEP 10: Config SCAN, VIP and LISTENER_SCAN

    #Config SCAN

    su – root

    # cd $GRID_HOME/bin

    # ./srvctl config scan

    SCAN name: oraclecrs, Network: 1/192.168.164.0/255.255.255.0/lan900

    SCAN VIP name: scan1, IP: /192.168.97.20/192.168.97.20

    # ./srvctl remove scan  -f

    # ./srvctl add scan -n oraclecrs -k 1 -S 192.168.164.0/255.255.255.0/lan900

    #Config VIP

    # ./srvctl config vip -n oracledb08

    VIP exists: /oracledb08-vip/192.168.164.12/192.168.97.0/255.255.255.0/lan0, hosting node oracledb08

    # ./srvct modify nodeapps -n oracledb08 -A 192.168.164.12/255.255.255.0/lan900

    #Config SCAN_LISTENER – make sure LISTENER_SCAN1 is not running

    # ./srvctl status scan_listener

    SCAN Listener LISTENER_SCAN1 is enabled

    SCAN listener LISTENER_SCAN1 is not running

    # ./srvctl modify scan_listener -p TCP:1521

    # ./srvctl start scan_listener

    STEP 11: Clean stop/start CRS again

    # crsctl stop crs –f

    # crsctl start crs

Continue reading

Performance Hub Active Report – Oracle Database 12c

Performance Hub feature of EM Express provides an active report with a consolidated view of all performance data for a specified time period. The report is fully interactive; its contents are saved in a HTML file, which you can access offline using a web browser.

Generating a Performance Hub Active Report Using a SQL Script: the script is located $ORACLE_HOME/rdbms/admin/perfhubrpt.sql

@rpthtml/perfhubrpt.sql all 4065805245 1 '03/22/15 23:50:06' '03/23/15 00:00:07' 1_PerfHub_150322_2350_0000.html

Generate reports for PerfHub:

perf0

All real time or historical database performance data can be collected. Below some pics from report:

perf1

perf2

perf3

perf4

perf5

Hope this help!

Configure A Second Listener on a Separate Network in Grid Infrastructure

We have a RAC system and one day we want to add new network to cluster for other connection to database. So we decide to add new network for database. In this labs, I don’t add scan name for new network. We have a RAC system with two nodes: rac1 and rac2 running 12c.

Add new hostname to clusterware for administrator

# nano /etc/hosts

172.16.1.103   newrac1-vip.oracle.com newrac1-vip

172.16.1.104   newrac2-vip.oracle.com newrac2-vip

172.16.1.101   newrac1.oracle.com newrac1

172.16.1.102   newrac2.oracle.com newrac2

Add new network and register VIP

# srvctl add network -k 2 -S 172.16.1.0/255.255.255.0/eth2

# srvctl add vip -n rac1 -k 2 -A 172.16.1.103/255.255.255.0/eth2

# srvctl add vip -n rac2 -k 2 -A 172.16.1.104/255.255.255.0/eth2

Add new listener LISTENER_1 to cluster

# srvctl add listener -l LISTENER_1 -s -p 1521 -k 2

# crsctl start res ora.LISTENER_1.lsnr

Checking new listener

[oracle@rac1 ~]$ lsnrctl status listener_1

LSNRCTL for Linux: Version 12.1.0.1.0 – Production on 04-MAR-2014 12:08:14

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_1)))

STATUS of the LISTENER

————————

Alias                     LISTENER_1

Version                   TNSLSNR for Linux: Version 12.1.0.1.0 – Production

Start Date               04-MAR-2014 12:07:51

Uptime                   0 days 0 hr. 0 min. 22 sec

Trace Level               off

Security                 ON: Local OS Authentication

SNMP                     OFF

Listener Parameter File   /u01/app/12.1.0/grid/network/admin/listener.ora

Listener Log File         /u01/app/grid/diag/tnslsnr/rac1/listener_1/alert/log.xml

Listening Endpoints Summary…

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_1)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.1.103)(PORT=1521)))

The listener supports no services

The command completed successfully

Configure network information on node 1.

# vi $ORACLE_HOME/network/admin/tnsnames.ora

listener_newnet =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.1.103)(PORT = 1521))

)

remote_newnet =

(DESCRIPTION_LIST =

(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.1.103)(PORT = 1521)))

(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.1.104)(PORT = 1521)))

)

Configure network information on node 2.

# vi $ORACLE_HOME/network/admin/tnsnames.ora

listener_newnet =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.1.104)(PORT = 1521))

)

remote_newnet =

(DESCRIPTION_LIST =

(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.1.103)(PORT = 1521)))

(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.1.104)(PORT = 1521)))

)

Register database service to new network

alter system set LISTENER_NETWORKS='((NAME=newnet)(LOCAL_LISTENER=listener_newnet)(REMOTE_LISTENER=remote_newnet))’ sid=’*’;

Check service register by new listener

[root@rac1 ~]# lsnrctl status LISTENER_1

LSNRCTL for Linux: Version 12.1.0.1.0 – Production on 19-DEC-2014 21:17:01

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_1)))
STATUS of the LISTENER
————————
Alias                     LISTENER_1
Version                   TNSLSNR for Linux: Version 12.1.0.1.0 – Production
Start Date                19-DEC-2014 21:15:31
Uptime                    0 days 0 hr. 1 min. 29 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/12.1.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/rac1/listener_1/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.1.103)(PORT=1521)))
Services Summary…
Service “racdb” has 1 instance(s).
Instance “racdb1”, status READY, has 2 handler(s) for this service…
The command completed successfully

Cheer 🙂

Enable AWR Warehouse Feature in Oracle Cloud Control 12c 12.1.0.4

Download and install Oracle 12c Cloud Control 12.1.0.4 but to enable AWR Warehouse feature you need to apply patchset:

Apply Patch for Bug # 19176910 – Enterprise Manager for OMS Plug-ins 12.1.0.4.2

wh1

export ORACLE_HOME=/oracle/em/oem12c/oms

export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH

 

 

 

Create config and key file for weblogic

 

[oracle@oem12c OPatch]$ /oracle/em/oem12c/oms/OPatch/wlskeys/createkeys.sh –oh /oracle/em/oem12c/oms -location /oracle/19176910

Please enter weblogic admin server username: weblogic

Please enter weblogic admin server password:

Creating the key file can reduce the security of your system if it is not kept in a secured location after it is created. Creating new key…

 

Trying to get configuration and key files for the given inputs…

This operation will take some time. Please wait for updates…

User configuration file created: /oracle/19176910/config

User key file created: /oracle/19176910/key

‘createKeys’ succeeded.

 

 

Create Properties file

 

vi oms.properties

 

AdminServerURL=t3s://oem12c.oracle:7102

AdminConfigFile=/oracle/19176910/config

AdminKeyFile=/oracle/19176910/key

 

 

 

 

Analyse before patching

 

 

[oracle@oem12c 19176910]$ opatchauto apply -analyze -property_file /oracle/19176910/oms.properties

OPatch Automation Tool

Copyright (c) 2014, Oracle Corporation. All rights reserved.

 

 

OPatchauto version : 11.1.0.11.0

OUI version       : 11.1.0.12.0

Running from       : /oracle/em/oem12c/oms

Log file location : /oracle/em/oem12c/oms/cfgtoollogs/opatch/opatch2014-09-01_07-06-42AM_1.log

 

OPatchauto log file: /oracle/em/oem12c/oms/cfgtoollogs/opatchauto/19176910/opatch_oms_2014-09-01_07-06-44AM_analyze.log

 

 

WARNING: Sub-patch “18953248” skipped for incompatibility with components installed in the OMS system.

WARNING: Sub-patch “19051528” skipped for incompatibility with components installed in the OMS system.

WARNING: Sub-patch “19051540” skipped for incompatibility with components installed in the OMS system.

WARNING: Sub-patch “19051557” skipped for incompatibility with components installed in the OMS system.

WARNING: Sub-patch “19051558” skipped for incompatibility with components installed in the OMS system.

 

Configuration Validation: Success

 

 

Running apply prerequisite checks for sub-patch(es) “19051543” and Oracle Home “/oracle/em/oem12c/plugins/oracle.sysman.emas.oms.plugin_12.1.0.6.0″…

Please monitor OPatch log file: /oracle/em/oem12c/plugins/oracle.sysman.emas.oms.plugin_12.1.0.6.0/cfgtoollogs/opatch/19051543_Sep_01_2014_07_06_42/ApplyPrereq2014-09-01_07-07-07AM_2.log

Sub-patch(es) “19051543” are successfully analyzed for Oracle Home “/oracle/em/oem12c/plugins/oracle.sysman.emas.oms.plugin_12.1.0.6.0”

 

Running apply prerequisite checks for sub-patch(es) “19051532” and Oracle Home “/oracle/em/oem12c/plugins/oracle.sysman.db.oms.plugin_12.1.0.6.0″…

Please monitor OPatch log file: /oracle/em/oem12c/plugins/oracle.sysman.db.oms.plugin_12.1.0.6.0/cfgtoollogs/opatch/19051532_Sep_01_2014_07_06_42/ApplyPrereq2014-09-01_07-07-09AM_2.log

Sub-patch(es) “19051532” are successfully analyzed for Oracle Home “/oracle/em/oem12c/plugins/oracle.sysman.db.oms.plugin_12.1.0.6.0”

 

Running apply prerequisite checks for sub-patch(es) “19060193” and Oracle Home “/oracle/em/oem12c/plugins/oracle.sysman.vt.oms.plugin_12.1.0.6.0″…

Please monitor OPatch log file: /oracle/em/oem12c/plugins/oracle.sysman.vt.oms.plugin_12.1.0.6.0/cfgtoollogs/opatch/19060193_Sep_01_2014_07_06_42/ApplyPrereq2014-09-01_07-07-12AM_2.log

Sub-patch(es) “19060193” are successfully analyzed for Oracle Home “/oracle/em/oem12c/plugins/oracle.sysman.vt.oms.plugin_12.1.0.6.0”

 

Running apply prerequisite checks for sub-patch(es) “18873245” and Oracle Home “/oracle/em/oem12c/plugins/oracle.sysman.mos.oms.plugin_12.1.0.6.0″…

Please monitor OPatch log file: /oracle/em/oem12c/plugins/oracle.sysman.mos.oms.plugin_12.1.0.6.0/cfgtoollogs/opatch/18873245_Sep_01_2014_07_06_42/ApplyPrereq2014-09-01_07-07-15AM_2.log

Sub-patch(es) “18873245” are successfully analyzed for Oracle Home “/oracle/em/oem12c/plugins/oracle.sysman.mos.oms.plugin_12.1.0.6.0”

 

 

Stop OMS

 

[oracle@oem12c 19176910]$ emctl stop oms

Oracle Enterprise Manager Cloud Control 12c Release 4

Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.

Stopping WebTier…

WebTier Successfully Stopped

Stopping Oracle Management Server…

Oracle Management Server Already Stopped

Oracle Management Server is Down

 

Perform patch apply

 

opatchauto apply -property_file /oracle/19176910/oms.properties

 ——————————————————————————–

The following warnings have occurred during OPatchauto execution:

1) Sub-patch “18953248” skipped for incompatibility with components installed in the OMS system.

2) Sub-patch “19051528” skipped for incompatibility with components installed in the OMS system.

3) Sub-patch “19051540” skipped for incompatibility with components installed in the OMS system.

4) Sub-patch “19051557” skipped for incompatibility with components installed in the OMS system.

5) Sub-patch “19051558” skipped for incompatibility with components installed in the OMS system.

——————————————————————————–

OPatchauto Session completed with warnings.

Log file location: /oracle/em/oem12c/oms/cfgtoollogs/opatchauto/19176910/opatch_oms_2014-09-01_07-13-47AM_deploy.log

 OPatchauto completed with warnings.

 

 

Start OMS

 [oracle@oem12c 19176910]$ emctl start oms

Oracle Enterprise Manager Cloud Control 12c Release 4

Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.

Starting Oracle Management Server…

Starting WebTier…

WebTier Successfully Started

Oracle Management Server Successfully Started

Oracle Management Server is Up

AWR Warehouse now available

wh2

🙂

 

Upgrading Oracle Database from 12.1.0.1 to 12.1.0.2

Oracle Software Installation

dbup1 dbup2 dbup3 dbup4 dbup5 dbup6 dbup7 dbup8 dbup9 dbup10 dbup11 dbup12

 

Check Database register for current version

select substr(comp_id,1,15) comp_id,substr(comp_name,1,45)
comp_name,substr(version,1,10) version,status
from dba_registry order by modified;

dbregisbefore

Open Database in Upgrading mode

[oracle@racdb1 admin]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Wed Aug 6 05:10:16 2014

Copyright (c) 1982, 2014, Oracle.  All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup upgrade
ORACLE instance started.

Total System Global Area  734003200 bytes
Fixed Size                  2928728 bytes
Variable Size             549457832 bytes
Database Buffers          176160768 bytes
Redo Buffers                5455872 bytes
Database mounted.
Database opened.
SQL> alter pluggable database all open upgrade;

Warning: PDB altered with errors.

Perform Database Upgrading

[oracle@racdb1 admin]$ $ORACLE_HOME/perl/bin/perl catctl.pl catupgrd.sql

Argument list for [catctl.pl]
SQL Process Count     n = 0
SQL PDB Process Count N = 0
Input Directory       d = 0
Phase Logging Table   t = 0
Log Dir               l = 0
Script                s = 0
Serial Run            S = 0
Upgrade Mode active   M = 0
Start Phase           p = 0
End Phase             P = 0
Log Id                i = 0
Run in                c = 0
Do not run in         C = 0
Echo OFF              e = 1
No Post Upgrade       x = 0
Reverse Order         r = 0
Open Mode Normal      o = 0
Debug catcon.pm       z = 0
Debug catctl.pl       Z = 0
Display Phases        y = 0
Child Process         I = 0

catctl.pl version: 12.1.0.2.0
Oracle Base           = /oracle/12.0.2

Analyzing file catupgrd.sql
Log files in /oracle/12.0.2/db_1/rdbms/admin
catcon: ALL catcon-related output will be written to catupgrd_catcon_28641.lst
catcon: See catupgrd*.log files for output generated by scripts
catcon: See catupgrd_*.lst files for spool files, if any
Number of Cpus        = 2
Parallel PDB Upgrades = 2
SQL PDB Process Count = 2
SQL Process Count     = 0
New SQL Process Count = 2

…………………………………..

…………………………………..

Grand Total Time: 8825s PRIDB

LOG FILES: (catupgrdpridb*.log)

Upgrade Summary Report Located in:
/oracle/12.0.2/db_1/cfgtoollogs/SOURCEDB/upgrade/upg_summary.log

Total Upgrade Time:          [0d:2h:27m:5s]
    Time: 357s  PDB$SEED
Serial   Phase #:71 Files: 1     Time: 5s    PDB$SEED
Serial   Phase #:72 Files: 1     Time: 5s    PDB$SEED
Serial   Phase #:73 Files: 1     Time: 0s    PDB$SEED

Grand Total Time: 9174s PDB$SEED

LOG FILES: (catupgrdpdb_seed*.log)

Upgrade Summary Report Located in:
/oracle/12.0.2/db_1/cfgtoollogs/SOURCEDB/upgrade/upg_summary.log

Total Upgrade Time:          [0d:2h:32m:54s]

     Time: 2715s For CDB$ROOT
     Time: 9199s For PDB(s)

Grand Total Time: 11914s

LOG FILES: (catupgrd*.log)

Upgrade Summary Report Located in:
/oracle/12.0.2/db_1/cfgtoollogs/SOURCEDB/upgrade/upg_summary.log

Grand Total Upgrade Time:    [0d:3h:18m:34s]

Check registry for upgrade components:

dbregisafter

 

Upgrading Oracle Grid Infrastructure from 12.1.0.1 to 12.1.0.2

Download Oracle Grid Infrastructure from Oracle OTN

http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

or from My Oracle Support

https://updates.oracle.com/Orion/PatchDetails/process_form?aru=17851573

# runInstaller

Upgrade Grid infrastructure and ASM

grid1

grid2 grid3 grid4 grid5 grid6 grid7 grid8 grid9 grid10

[root@racdb1 ~]# /oracle/grid12cnew/rootupgrade.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /oracle/grid12cnew

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of “dbhome” have not changed. No need to overwrite.
The contents of “oraenv” have not changed. No need to overwrite.
The contents of “coraenv” have not changed. No need to overwrite.

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: /oracle/grid12cnew/crs/install/crsconfig_params
2014/08/05 16:19:42 CLSRSC-4015: Performing install or upgrade action for Oracle Trace File Analyzer (TFA) Collector.

2014/08/05 16:19:42 CLSRSC-4012: Shutting down Oracle Trace File Analyzer (TFA) Collector.

2014/08/05 16:19:51 CLSRSC-4013: Successfully shut down Oracle Trace File Analyzer (TFA) Collector.

2014/08/05 16:20:03 CLSRSC-4003: Successfully patched Oracle Trace File Analyzer (TFA) Collector.

2014/08/05 16:20:05 CLSRSC-464: Starting retrieval of the cluster configuration data

2014/08/05 16:20:57 CLSRSC-465: Retrieval of the cluster configuration data has successfully completed.

2014/08/05 16:20:57 CLSRSC-363: User ignored prerequisites during installation

CRS-4123: Starting Oracle High Availability Services-managed resources
CRS-2672: Attempting to start ‘ora.mdnsd’ on ‘racdb1’
CRS-2672: Attempting to start ‘ora.evmd’ on ‘racdb1’
CRS-2676: Start of ‘ora.mdnsd’ on ‘racdb1’ succeeded
CRS-2676: Start of ‘ora.evmd’ on ‘racdb1’ succeeded
CRS-2672: Attempting to start ‘ora.gpnpd’ on ‘racdb1’
CRS-2676: Start of ‘ora.gpnpd’ on ‘racdb1’ succeeded
CRS-2672: Attempting to start ‘ora.gipcd’ on ‘racdb1’
CRS-2676: Start of ‘ora.gipcd’ on ‘racdb1’ succeeded
CRS-2672: Attempting to start ‘ora.cssdmonitor’ on ‘racdb1’
CRS-2676: Start of ‘ora.cssdmonitor’ on ‘racdb1’ succeeded
CRS-2672: Attempting to start ‘ora.cssd’ on ‘racdb1’
CRS-2672: Attempting to start ‘ora.diskmon’ on ‘racdb1’
CRS-2676: Start of ‘ora.diskmon’ on ‘racdb1’ succeeded
CRS-2789: Cannot stop resource ‘ora.diskmon’ as it is not running on server ‘racdb1’
CRS-2676: Start of ‘ora.cssd’ on ‘racdb1’ succeeded
CRS-2672: Attempting to start ‘ora.cluster_interconnect.haip’ on ‘racdb1’
CRS-2672: Attempting to start ‘ora.ctssd’ on ‘racdb1’
CRS-2676: Start of ‘ora.ctssd’ on ‘racdb1’ succeeded
CRS-2676: Start of ‘ora.cluster_interconnect.haip’ on ‘racdb1’ succeeded
CRS-2672: Attempting to start ‘ora.asm’ on ‘racdb1’
CRS-2676: Start of ‘ora.asm’ on ‘racdb1’ succeeded
CRS-2672: Attempting to start ‘ora.storage’ on ‘racdb1’
CRS-2676: Start of ‘ora.storage’ on ‘racdb1’ succeeded
CRS-2672: Attempting to start ‘ora.crf’ on ‘racdb1’
CRS-2676: Start of ‘ora.crf’ on ‘racdb1’ succeeded
CRS-2672: Attempting to start ‘ora.crsd’ on ‘racdb1’
CRS-2676: Start of ‘ora.crsd’ on ‘racdb1’ succeeded
CRS-6017: Processing resource auto-start for servers: racdb1
CRS-2673: Attempting to stop ‘ora.LISTENER_SCAN1.lsnr’ on ‘racdb2’
CRS-2672: Attempting to start ‘ora.ons’ on ‘racdb1’
CRS-2677: Stop of ‘ora.LISTENER_SCAN1.lsnr’ on ‘racdb2’ succeeded
CRS-2673: Attempting to stop ‘ora.scan1.vip’ on ‘racdb2’
CRS-2677: Stop of ‘ora.scan1.vip’ on ‘racdb2’ succeeded
CRS-2672: Attempting to start ‘ora.scan1.vip’ on ‘racdb1’
CRS-2676: Start of ‘ora.scan1.vip’ on ‘racdb1’ succeeded
CRS-2672: Attempting to start ‘ora.LISTENER_SCAN1.lsnr’ on ‘racdb1’
CRS-2676: Start of ‘ora.ons’ on ‘racdb1’ succeeded
CRS-2676: Start of ‘ora.LISTENER_SCAN1.lsnr’ on ‘racdb1’ succeeded
CRS-2672: Attempting to start ‘ora.asm’ on ‘racdb1’
CRS-2676: Start of ‘ora.asm’ on ‘racdb1’ succeeded
CRS-6016: Resource auto-start has completed for server racdb1
CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
CRS-4123: Oracle High Availability Services has been started.
2014/08/05 16:24:04 CLSRSC-468: Setting Oracle Clusterware and ASM to rolling migration mode

2014/08/05 16:24:04 CLSRSC-482: Running command: ‘/oracle/grid12c/bin/crsctl start rollingupgrade 12.1.0.2.0’

2014/08/05 16:24:12 CLSRSC-482: Running command: ‘/oracle/grid12cnew/bin/asmca -silent -upgradeNodeASM -nonRolling false

-oldCRSHome /oracle/grid12c -oldCRSVersion 12.1.0.1.0 -nodeNumber 1 -firstNode true -startRolling false’

ASM configuration upgraded in local node successfully.

2014/08/05 16:24:19 CLSRSC-469: Successfully set Oracle Clusterware and ASM to rolling migration mode

2014/08/05 16:24:19 CLSRSC-466: Starting shutdown of the current Oracle Grid Infrastructure stack

2014/08/05 16:25:56 CLSRSC-467: Shutdown of the current Oracle Grid Infrastructure stack has successfully completed.

OLR initialization – successful
2014/08/05 16:31:41 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.
2014/08/05 16:37:51 CLSRSC-472: Attempting to export the OCR

2014/08/05 16:37:51 CLSRSC-482: Running command: ‘ocrconfig -upgrade oracle oinstall’

2014/08/05 16:38:37 CLSRSC-473: Successfully exported the OCR

2014/08/05 16:38:58 CLSRSC-486:
 At this stage of upgrade, the OCR has changed.
 Any attempt to downgrade the cluster after this point will require a complete cluster outage to restore the OCR.

2014/08/05 16:38:58 CLSRSC-541:
 To downgrade the cluster:
 1. All nodes that have been upgraded must be downgraded.

2014/08/05 16:38:58 CLSRSC-542:
 2. Before downgrading the last node, the Grid Infrastructure stack on all other cluster nodes must be down.

2014/08/05 16:38:58 CLSRSC-543:
 3. The downgrade command must be run on the node racdb1 with the ‘-lastnode’ option to restore global configuration data.

2014/08/05 16:39:14 CLSRSC-343: Successfully started Oracle Clusterware stack

clscfg: EXISTING configuration version 5 detected.
clscfg: version 5 is 12c Release 1.
Successfully taken the backup of node specific configuration in OCR.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user ‘root’, privgrp ‘root’..
Operation successful.
2014/08/05 16:43:43 CLSRSC-474: Initiating upgrade of resource types

2014/08/05 16:44:37 CLSRSC-482: Running command: ‘upgrade model  -s 12.1.0.1.0 -d 12.1.0.2.0 -p first’

2014/08/05 16:44:37 CLSRSC-475: Upgrade of resource types successfully initiated.

2014/08/05 16:45:16 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster … succeeded

 

[root@racdb2 ~]# /oracle/grid12cnew/rootupgrade.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /oracle/grid12cnew

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of “dbhome” have not changed. No need to overwrite.
The file “oraenv” already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying oraenv to /usr/local/bin …
The contents of “coraenv” have not changed. No need to overwrite.

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: /oracle/grid12cnew/crs/install/crsconfig_params
2014/08/05 16:45:51 CLSRSC-4015: Performing install or upgrade action for Oracle Trace File Analyzer (TFA) Collector.

2014/08/05 16:48:54 CLSRSC-4003: Successfully patched Oracle Trace File Analyzer (TFA) Collector.

2014/08/05 16:49:01 CLSRSC-464: Starting retrieval of the cluster configuration data

2014/08/05 16:49:33 CLSRSC-465: Retrieval of the cluster configuration data has successfully completed.

2014/08/05 16:49:33 CLSRSC-363: User ignored prerequisites during installation

ASM configuration upgraded in local node successfully.

2014/08/05 16:50:12 CLSRSC-466: Starting shutdown of the current Oracle Grid Infrastructure stack

2014/08/05 16:52:43 CLSRSC-467: Shutdown of the current Oracle Grid Infrastructure stack has successfully completed.

OLR initialization – successful
2014/08/05 16:56:49 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.
2014/08/05 17:01:48 CLSRSC-343: Successfully started Oracle Clusterware stack

clscfg: EXISTING configuration version 5 detected.
clscfg: version 5 is 12c Release 1.
Successfully taken the backup of node specific configuration in OCR.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user ‘root’, privgrp ‘root’..
Operation successful.
2014/08/05 17:02:17 CLSRSC-478: Setting Oracle Clusterware active version on the last node to be upgraded

2014/08/05 17:02:17 CLSRSC-482: Running command: ‘/oracle/grid12cnew/bin/crsctl set crs activeversion’

Started to upgrade the Oracle Clusterware. This operation may take a few minutes.
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.
Successfully upgraded the Oracle Clusterware.
Oracle Clusterware operating version was successfully set to 12.1.0.2.0
2014/08/05 17:03:32 CLSRSC-479: Successfully set Oracle Clusterware active version

2014/08/05 17:04:03 CLSRSC-476: Finishing upgrade of resource types

2014/08/05 17:04:12 CLSRSC-482: Running command: ‘upgrade model  -s 12.1.0.1.0 -d 12.1.0.2.0 -p last’

2014/08/05 17:04:12 CLSRSC-477: Successfully completed upgrade of resource types

PRCN-3004 : Listener MGMTLSNR already exists
2014/08/05 17:04:58 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster … succeeded

grid11 grid12

Grid Infrastructure has been upgraded to 12.1.0.2!! Next post Database upgrade.

 

 

Testing with 12c Flex ASM

 

The most significant enhancement for ASM in Oracle Database 12c is a set of features collectively called Oracle Flex ASM. Oracle Flex AS M provides for critical capabilities required for cloud computing in enterprise environments. These environments typically deploy database clusters of varying sizes that not only have stringent performance and reliability requirements, but these environments must be able to rapidly adapt to changing workloads with minimal management overhead.

Click to access oracle-12c-asm-overview-1965430.pdf

A short test with Flex ASM

Using ADRCI to monitor alertq log

ADRCI> show alert -tail 1000 -f

Reconfiguration started (old inc 6, new inc 8)
List of instances:
 1 2 (myinst: 1)
 Global Resource Directory frozen
 Communication channels reestablished
 Master broadcasted resource hash value bitmaps
 Non-local Process blocks cleaned out
 LMS 0: 0 GCS shadows cancelled, 0 closed, 0 Xw survived
 Set master node info
 Submitted all remote-enqueue requests
 Dwn-cvts replayed, VALBLKs dubious
 All grantable enqueues granted
 Submitted all GCS remote-cache requests
 Fix write in gcs resources
Reconfiguration complete (total time 0.3 secs)
2014-05-23 16:53:43.037000 +07:00
minact-scn: Master returning as live inst:2 has inc# mismatch instinc:0 cur:8 errcnt:0

Checking Database Status

SQL> select open_mode from v$database;
OPEN_MODE
——————–
READ WRITE

SQL> select instance_name from v$instance;
INSTANCE_NAME
—————-
SOURCEDB1

Stop ASM diskgroup on node1

[root@racdb1 ~]# /oracle/grid12c/bin/srvctl stop diskgroup -g DATA -n racdb1
[root@racdb1 ~]# /oracle/grid12c/bin/srvctl stop diskgroup -g ARCH -n racdb1
[root@racdb1 ~]# /oracle/grid12c/bin/srvctl stop diskgroup -g DBFS -n racdb1

 

Check the alertlog

NOTE: ASMB connected to ASM instance +ASM2 (Flex mode; client id 0x10002)
NOTE: ASMB rebuilding ASM server state
NOTE: ASMB rebuilt 2 (of 2) groups
NOTE: ASMB rebuilt 15 (of 15) allocated files
NOTE: fetching new locked extents from server
NOTE: 0 locks established; 0 pending writes sent to server
SUCCESS: ASMB reconnected & completed ASM server state

Checking Database status

SQL> select open_mode from v$database;
OPEN_MODE
——————–
READ WRITE

SQL> select instance_name from v$instance;
INSTANCE_NAME
—————-
SOURCEDB1