When Oracle Database 11.2 Release 2 was released, DBAs and developers were exposed to the following new features.  Most of the books that you see out there only focus on new features up to this point.  Almost each year, Oracle released a new Patchset.  Lot of folks are not aware that Oracle adds new features to each Patchset.   Even with each PSU (Patchset updates), little features here and there are introduced.  See below for the major enhancements that were released with the major Patchsets. New Features New Features

To work on VMware Fusion, set the following on the .vmx file; without this entry, the scsi_id command does not return any values by default.
disk.EnableUUID = “TRUE”

Retrieve and generate a unique SCSI identifier with the scsi_id command:

[root@rhel59dra ~]# /sbin/scsi_id -g -u -s /block/sdc

[root@rhel59dra ~]# /sbin/scsi_id -g -u -s /block/sdd
[root@rhel59dra ~]# /sbin/scsi_id -g -u -s /block/sde
[root@rhel59dra ~]# /sbin/scsi_id -g -u -s /block/sdf

Add entries to a custom udev rules file

[root@rhel59dra ~]# cat /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/$parent", RESULT=="36000c29b80c12910ca4e6a95a1949d8b", NAME="ASMOCR01", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/$parent", RESULT=="36000c29344da4eab5b78409de3706424", NAME="ASMOCR02", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/$parent", RESULT=="36000c291cd542d388fdee223fa90ca69", NAME="ASMOCR03", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sdf[0-9]", BUS=="scsi", PROGRAM=="/usr/bin/udevinfo -q name -p %p", RESULT=="%k", PROGRAM=="scsi_id -g -u -d /dev/$parent", RESULT=="36000c296666187fd5223c0a34ca52f71", NAME="ASMDATA0%n", OWNER="oracle", GROUP="dba", MODE="0660"

For disks with multiple partitions, the syntax in the udev rules are different.

KERNEL==”sd[c-z]1″, BUS==”scsi”, PROGRAM=”/sbin/scsi_id -g -u -s /block/%P”, RESULT==”3*”, NAME=”ASM%c”, OWNER=”oracle”, GROUP=”dba”, MODE=”0660″

To make sure that udev rules work:

[root@rhel59dra ~]# udevtest /block/sdc/sdc1
[root@rhel59dra ~]# udevtest /block/sdd/sdd1
[root@rhel59dra ~]# udevtest /block/sde/sde1
[root@rhel59dra ~]# udevtest /block/sdf/sdf1    
[root@rhel59dra ~]# udevtest /block/sdf/sdf2    
[root@rhel59dra ~]# udevtest /block/sdf/sdf3    
[root@rhel59dra ~]# udevtest /block/sdf/sdf4    

Restart udev rules:
RHEL 5: /sbin/udevcontrol reload_rules
RHEL 6: /sbin/udevadm control –reload-rules

Verify that proper devices are created

[root@rhel59dra ~]# ls -l /dev/ASM*

brw-rw---- 1 oracle dba 8, 81 May 15 23:45 /dev/ASMDATA01
brw-rw---- 1 oracle dba 8, 82 May 15 23:45 /dev/ASMDATA02
brw-rw---- 1 oracle dba 8, 83 May 15 23:45 /dev/ASMDATA03
brw-rw---- 1 oracle dba 8, 84 May 15 23:45 /dev/ASMDATA04
brw-rw---- 1 oracle dba 8, 33 May 15 23:45 /dev/ASMOCR01
brw-rw---- 1 oracle dba 8, 49 May 15 23:45 /dev/ASMOCR02
brw-rw---- 1 oracle dba 8, 65 May 15 23:45 /dev/ASMOCR03 

Written by Charles Kim, Oracle ACE Director

Here’s a simple stored procedure that I’ve been using for about a decade. From the application or from database triggers, if I want to record anything to the alert log, I can simply invoke this stored procedure and write error messages to the alert log.

Most of the DBAs have implemented alert log scanners and will send alert notifications if new ORA- error messages pop up in the alert log file.

create or replace procedure edba_write_alert

( p_message varchar2,
  p_oranum NUMBER default 20001)
dbms_system.ksdwrt(2, 'ORA-'||to_char(p_oranum)||': '||p_message);
grant execute on edba_write_alert to public; 

Prior to 11.2, the following set of init.ora parameters were recommended:


Going forward with 11.2 and higher, oracle recommends setting memory_target to approximately 1.5 GB. Also, you will notice that we are leveraging memory_target versus sga_target which insinuates that we are not using huge pages for ASM memory structures:

alter system set memory_target=1536m scope=spfile;

The equation for the process parameters is:

Processes=25 + (10 + max number of concurrent database file creations, and file extend operations possible) * n.

Where n is the number of databases connecting to ASM.

Posted by Charles Kim, Oracle ACE Director

Posted in ASM

Basic instructions for adding a new node to the RAC cluster:

1. First on the target node, create /u01/app/oraInventory (empty) and owned by oracle:dba
2. On the target node, make sure /u01/app/11.2.0 directory is created and empty. This directory needs to be owned as: oracle:dba
3. Run addnode.ksh (shown below) on an existing RAC node with parameters replaced as oracle
4. As instructed, execute root.sh on target node as root

Here’s all the caveats:
1. It is buggy on the cluvfy side for It had bugs in also. I recall we had to set IGNORE_PREADDNODE_CHECKS to Y back then, and it looks like we still have to.
2. /u01/app/oraInventory has to be pre-created and owned by oracle:dba and has to be completely empty
3. /u01/app/11.2.0 needs to be owned by oracle:dba. The /u01/app/11.2.0/grid directory cannot exist … even as an empty directory. The addnode.sh script attempts to do a “mkdir grid” as oracle, and if it fails, it dies.
4. It died on me twice at “crsctl start listener -n “target_node” … have to create default listener first
5. I did not leverage the -noCopy method. This working example will copy the Grid Home from source RAC node to the new RAC node via scp/ssh. I don’t think it is a big deal … added about 5 minutes to the overall time (see below).

Copying to remote nodes (Saturday, May 4, 2013 8:52:50 PM CDT)  ............................................................................................... 96% Done.  
Home copied to new nodes  Saving inventory on nodes (Saturday, May 4, 2013 8:56:03 PM CDT)  

Here’s the contents to the add node shell script:

+ASM1 > cat addnode.ksh
export ORACLE_HOME=/u01/app/11.2.0/grid
cd $ORACLE_HOME/oui/bin
./addNode.sh -silent "CLUSTER_NEW_NODES={rhel59drb}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={rhel59drb-vip}" "CLUSTER_NEW_PRIVATE_NODE_NAMES={rhel59drb-priv}"

Executing the addnode.ksh shell script:

+ASM1 > ./addnode.ksh
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB.   Actual 3186 MB    Passed
Oracle Universal Installer, Version Production
Copyright (C) 1999, 2011, Oracle. All rights reserved.
Performing tests to see whether nodes rhel59drb are available
............................................................... 100% Done.
Cluster Node Addition Summary
Global Settings
   Source: /u01/app/11.2.0/grid
   New Nodes
Space Requirements
   New Nodes
         /: Required 6.47GB : Available 7.27GB
Installed Products
   Product Names
      Oracle Grid Infrastructure
      Sun JDK
      Installer SDK Component
      Oracle One-Off Patch Installer
      Oracle Universal Installer
      Oracle USM Deconfiguration
      Oracle Configuration Manager Deconfiguration
      Enterprise Manager Common Core Files
      Oracle DBCA Deconfiguration
      Oracle RAC Deconfiguration
      Oracle Quality of Service Management (Server)
      Installation Plugin Files
      Universal Storage Manager Files
      Oracle Text Required Support Files
      Automatic Storage Management Assistant
      Oracle Database 11g Multimedia Files
      Oracle Multimedia Java Advanced Imaging
      Oracle Globalization Support
      Oracle Multimedia Locator RDBMS Files
      Oracle Core Required Support Files
      Bali Share
      Oracle Database Deconfiguration
      Oracle Quality of Service Management (Client)
      Expat libraries
      Oracle Containers for Java
      Perl Modules
      Secure Socket Layer
      Oracle JDBC/OCI Instant Client
      Oracle Multimedia Client Option
      LDAP Required Support Files
      Character Set Migration Utility
      Perl Interpreter
      PL/SQL Embedded Gateway
      OLAP SQL Scripts
      Database SQL Scripts
      Oracle Extended Windowing Toolkit
      SSL Required Support Files for InstantClient
      SQL*Plus Files for Instant Client
      Oracle Net Required Support Files
      Oracle Database User Interface
      RDBMS Required Support Files for Instant Client
      RDBMS Required Support Files Runtime
      XML Parser for Java
      Oracle Security Developer Tools
      Oracle Wallet Manager
      Enterprise Manager plugin Common Files
      Platform Required Support Files
      Oracle JFC Extended Windowing Toolkit
      RDBMS Required Support Files
      Oracle Ice Browser
      Oracle Help For Java
      Enterprise Manager Common Files
      Deinstallation Tool
      Oracle Java Client
      Cluster Verification Utility Files
      Oracle Notification Service (eONS)
      Oracle LDAP administration
      Cluster Verification Utility Common Files
      Oracle Clusterware RDBMS Files
      Oracle Locale Builder
      Oracle Globalization Support
      Buildtools Common Files
      Oracle RAC Required Support Files-HAS
      SQL*Plus Required Support Files
      XDK Required Support Files
      Agent Required Support Files
      Parser Generator Required Support Files
      Precompiler Required Support Files
      Installation Common Files
      Required Support Files
      Oracle JDBC/THIN Interfaces
      Oracle Multimedia Locator
      Oracle Multimedia
      HAS Common Files
      Assistant Common Files
      HAS Files for DB
      Oracle Recovery Manager
      Oracle Database Utilities
      Oracle Notification Service
      Oracle Netca Client
      Oracle Net
      Oracle JVM
      Oracle Internet Directory Client
      Oracle Net Listener
      Cluster Ready Services Files
      Oracle Database 11g
Instantiating scripts for add node (Saturday, May 4, 2013 8:52:48 PM CDT)
.                                                                 1% Done.
Instantiation of add node scripts complete
Copying to remote nodes (Saturday, May 4, 2013 8:52:50 PM CDT)
...............................................................................................                                 96% Done.
Home copied to new nodes
Saving inventory on nodes (Saturday, May 4, 2013 8:56:03 PM CDT)
.                                                               100% Done.
Save inventory complete
The following configuration scripts need to be executed as the "root" user in each new cluster node. Each script in the list below is followed by a list of nodes.
/u01/app/11.2.0/grid/root.sh #On nodes rhel59drb
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as "root"
    3. Run the scripts in each cluster node
The Cluster Node Addition of /u01/app/11.2.0/grid was successful.
Please check '/tmp/silentInstall.log' for more details.

On the Target Node, execute root.sh:

[root@rhel59drb db_backup]# /u01/app/11.2.0/grid/root.sh
Check /u01/app/11.2.0/grid/install/root_rhel59drb_2013-05-04_21-18-28.log for the output of root script
[root@rhel59drb db_backup]# tail -f /u01/app/11.2.0/grid/install/root_rhel59drb_2013-05-04_21-18-28.log
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/11.2.0/grid
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.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
User ignored Prerequisites during installation
OLR initialization - successful
Adding Clusterware entries to inittab
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node rhel59dra, number 1, and is terminating
An active cluster was found during exclusive startup, restarting to join the cluster
clscfg: EXISTING configuration version 5 detected.
clscfg: version 5 is 11g Release 2.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Preparing packages for installation...
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
+ASM1 > crs_stat -t -v
HA Resource                                        Target     State            
-----------                                        ------     -----            
ora.DATA.dg                                        ONLINE     ONLINE on rhel59dra
ora.FRA.dg                                         ONLINE     ONLINE on rhel59dra
ora.LISTENER.lsnr                                  ONLINE     ONLINE on rhel59dra
ora.LISTENER_SCAN1.lsnr                            ONLINE     ONLINE on rhel59drb
ora.LISTENER_SCAN2.lsnr                            ONLINE     ONLINE on rhel59dra
ora.LISTENER_SCAN3.lsnr                            ONLINE     ONLINE on rhel59dra
ora.LSNR_GTRRAC.lsnr                               ONLINE     ONLINE on rhel59dra
ora.OCR_VOTE.dg                                    ONLINE     ONLINE on rhel59dra
ora.asm                                            ONLINE     ONLINE on rhel59dra
ora.cvu                                            ONLINE     ONLINE on rhel59dra
ora.dtccrac.db                                     ONLINE     ONLINE on rhel59dra
ora.gsd                                            OFFLINE    OFFLINE          
ora.net1.network                                   ONLINE     ONLINE on rhel59dra
ora.oc4j                                           ONLINE     ONLINE on rhel59dra
ora.ons                                            ONLINE     ONLINE on rhel59dra
ora.registry.acfs                                  ONLINE     ONLINE on rhel59dra
ora.rhel59dra.ASM1.asm                             ONLINE     ONLINE on rhel59dra
ora.rhel59dra.LISTENER_RHEL59DRA.lsnr              ONLINE     ONLINE on rhel59dra
ora.rhel59dra.LSNR_GTRRAC_RHEL59DRA.lsnr           ONLINE     ONLINE on rhel59dra
ora.rhel59dra.gsd                                  OFFLINE    OFFLINE          
ora.rhel59dra.ons                                  ONLINE     ONLINE on rhel59dra
ora.rhel59dra.vip                                  ONLINE     ONLINE on rhel59dra
ora.rhel59drb.ASM2.asm                             ONLINE     ONLINE on rhel59drb
ora.rhel59drb.LISTENER_RHEL59DRB.lsnr              ONLINE     ONLINE on rhel59drb
ora.rhel59drb.LSNR_GTRRAC_RHEL59DRB.lsnr           ONLINE     ONLINE on rhel59drb
ora.rhel59drb.gsd                                  OFFLINE    OFFLINE          
ora.rhel59drb.ons                                  ONLINE     ONLINE on rhel59drb
ora.rhel59drb.vip                                  ONLINE     ONLINE on rhel59drb
ora.scan1.vip                                      ONLINE     ONLINE on rhel59drb
ora.scan2.vip                                      ONLINE     ONLINE on rhel59dra
ora.scan3.vip                                      ONLINE     ONLINE on rhel59dra 
Posted in RAC