Tuesday, June 4, 2013

Oracle RAC Timezone woes and solution


Recently had a timezone issue with an Oracle 11gR2 RAC cluster. Even though I had set the host time and date, for some reason it did not get propagated to the Oracle RAC configuration.

There are couple of ways to set timezone for an Oracle 11.2 RAC cluster. First is the easy way by using srvctl commands:

srvctl setenv database -d -T =

srvctl setenv database -d racdb -T TZ=US/Eastern

In the first case, if this did not work, we need to edit a configuration file called s_crsconfig_{racnodename}_env.txt located under the $GRID_HOME/crs/install directory.

Here is my example for the edits performed of the above file on both RAC nodes, using first node as sample:

[root@racnode1$ vi /oracle/11.2.0/grid/crs/install/s_crsconfig_racnode1_env.txt

### This file can be used to modify the NLS_LANG environment variable, which determines the charset to be used for messages.

### For example, a new charset can be configured by setting NLS_LANG=JAPANESE_JAPAN.UTF8

### Do not modify this file except to change NLS_LANG, or under the direction of Oracle Support Services



TZ=US/Pacific

NLS_LANG=AMERICAN_AMERICA.AL32UTF8

TNS_ADMIN=

ORACLE_BASE=


Restart the Oracle 11.2 Clusterware services and database and run srvctl to confirm setting changes.

Monday, June 3, 2013

Migrating single instance Oracle 11g database to Oracle 11gR2 RAC and ASM

Recently over the past few years, I've been involved with customer engagements to migrate legacy single instance environmnents to Oracle 11gR2 RAC and ASM. In this post, I will detail out the high level steps on how to perform this for ERP environments with SAP and Oracle.

I will spend a few blog posts on this topic due to the complex nature of migrating from single instance to Oracle RAC.


1. Migrate single instance Oracle non-ASM to Oracle 11gR2 RAC and ASM

2. Migrate single instance Oracle ASM to Oracle 11gR2 RAC.

SAP ECC 7.x now allows you to directly install Oracle ASM in the new Oracle 11gR2 Grid infrastructure environment. This means that you can build and configure your Oracle 11gR2 ASM disks and provision them without having to first migrate with RMAN from single instance Oracle to ASM.

Case 1: Migrate single instance Oracle non-ASM to Oracle 11gR2 RAC and ASM

The steps to migrate Oracle single instance to Oracle 11gR2 RAC are as follows:

1. Install Oracle 11gR2 Grid infrastructure

2. Provision disks for ASM

3. Configure and create ASM instances

4. Use RMAN to transfer non-ASM Oracle database to ASM configuration

5. Install Oracle 11gR2 RAC database software in new ORACLE_HOME

6. Perform cluster infrastructure configuration for public, private, VIP, and SCAN requirements per Oracle 11gR2 documentation

7. Install Oracle 11gR2 RAC grid infrastructure for a cluster

8. Use rconfig to complete the migration to Oracle 11gR2 RAC

Note: for SAP with Oracle RAC, you MUST use Oracle 11.2.0.2 or later release to obtain support from SAP. ASM must use a ACFS fileystem as well.

Case 2: Migrate single instance Oracle ASM to Oracle 11gR2 RAC

The steps for case 2 are as follows for an environment with Oracle single instance and ASM:

1. Install Oracle 11gR2 RAC database software in new ORACLE_HOME

2. Run the rootcrs.pl -deconfig -force script for single instance GRID_HOME with Oracle ASM

3. Install Oracle 11gR2 RAC Grid infrastructure for new GRID_HOME on cluster node hosts

4. Add ASM disks from single instance to cluster services with ASMCA utility

5. Migrate single instance with rconfig scripts

I will add details in future posts as the tasks are very complex and involved. For now, I wanted to give a high level summary since this is not well documented.