Showing posts with label rac. Show all posts
Showing posts with label rac. Show all posts

Thursday, February 14, 2013

Creating an 11.2.0.2 RAC Logical Standby Database

Yesterday I created an 11.2.0.2 RAC logical standby database for an 11.2.0.2 RAC primary database. Here are the steps.
You create a logical standby database by first creating a physical standby database and then transitioning it to a logical standby database. So first I created a physical standby database "belmont" for primary database "gilroy":
SQL> SELECT db_unique_name,name,open_mode,database_role FROM v$database;
DB_UNIQUE_NAME                 NAME      OPEN_MODE            DATABASE_ROLE
------------------------------ --------- -------------------- ----------------
belmont                        GILROY    MOUNTED              PHYSICAL STANDBY
Before converting it to a logical standby, you need to stop Redo Apply on the physical standby database:
SQL> alter database recover managed standby database cancel;
A LogMiner dictionary must be built into the redo data so that the LogMiner component of SQL Apply can properly interpret changes it sees in the redo. To build the LogMiner dictionary, issue the following statement on primary database:
SQL> EXECUTE DBMS_LOGSTDBY.BUILD;
All auxiliary instances have to be shut down and disable the cluster on the target standby if your standby is a RAC (in my case). Shut down all but the instance on which the MRP was running (your actual target instance). Once they are all done, then disable the cluster and bounce the standby:
SQL> alter system set cluster_database=false scope=spfile;
SQL> shutdown immediate;
SQL> startup mount exclusive;
Now you are ready to tell MRP that it needs to continue applying redo data to the physical standby database until it is ready to convert to a logical standby database:
SQL> alter database recover to logical standby fremont;
In above statement, you changed the actual database name of the standby to "fremont" so it can become a logical standby database. Data Guard will change the database name (DB_NAME) and set a new database identifier (DBID) for the logical standby.
At this point, you can re-enable the cluster database parameter, if you had a RAC, and then restart and open the new logical standby database:
SQL> alter system set cluster_database=true scope=spfile;
SQL> shutdown;
SQL> startup mount;
SQL> alter database open resetlogs;
Issue the following statement to start SQL Apply in real-time apply mode using the IMMEDIATE keyword:
SQL> alter database start logical standby apply immediate;

Wednesday, October 10, 2012

Preparing Raw Devices for RAC on OEL 5u8

This demo is done with an OEL 5u8 x86_64 running as a guest in VirtualBox 4.2 on a Windows 7 host.

Add 3 new fixed-size VDI files to this VM:

ASM1 - 16 GB
ASM2 - 16 GB
OracleInstall - 12 GB

ASM1 and ASM2 will be used for raw devices for RAC.

Create partition tables on /dev/sdb (ASM1) and /dev/sdc (ASM2):


Create raw devices using these partitions.

Add udev raw device binding rules to /etc/udev/rules.d/60-raw.rules:

ACTION=="add", KERNEL=="sdb1", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdc1", RUN+="/bin/raw /dev/raw/raw2 %N"

Add udev raw device permission rules to /etc/udev/rules.d/65-raw-permissions.rules:

KERNEL=="raw1", OWNER="ttadmin", GROUP="oinstall", MODE="660"
KERNEL=="raw2", OWNER="ttadmin", GROUP="oinstall", MODE="660"

Now restart udev:


Repeat above steps on all other nodes belong to the same RAC.

References:


Sunday, September 23, 2012

RAC Upgrade from 11.2.0.2 to 11.2.0.3

First you need to patch vanilla 11.2.0.2 RAC to 11.2.0.2.5
1. Apply patch 6880880 to upgrade OPatch
2. Apply patch 13653086 to upgrade to 11.2.0.2.5

Apply one-off patch 12539000
1. Apply patch 12539000

Patch environment to 11.2.0.3
1. Apply patch 10404530