Virtual Data Guard Environment

I am going to setup the following virtual machines

So we will need to configure 4 virtual machines

primarydg01

This will act as the primary database, I will be configuring a standard 11G oracle installation on Oracle Enterprise Linux 5 update 5. I will configure two additional disks to using in ASM for the DATA and FLASH area's

  • 1 vCPU
  • 2GB RAM
  • 30GB O/S disk
  • 4GB DATA disk (used by ASM)
  • 4GB FLASH disk (used by ASM)
  • Network connection
  • Oracle Enterprise Linux 5 update 5
brokerdg01

This will act as the Data Guard Broker I will be installing Weblogic, a database and the Enterprise Manager Grid Control, I will not be using ASM.

  • 2 vCPU
  • 2.5GB RAM
  • 50GB O/S disk
  • Network connection
  • Oracle Enterprise Linux 5 update 5
physicaldg01

This will act as the physical standby database, I will be configuring a standard 11G oracle installation, using Oracle Enterprise Linux 5 update 5. I will configure two additional disks to using in ASM for the DATA and FLASH area's

  • 1 vCPU
  • 2GB RAM
  • 30GB O/S disk
  • 4GB DATA disk (used by ASM)
  • 4GB FLASH disk (used by ASM)
  • Network connection
  • Oracle Enterprise Linux 5 update 5
logicaldg01

This will start life as a physical standby database then we will turn it into a logical standby database, it will has the same basic setup as the above servers.

  • 1 vCPU
  • 2GB RAM
  • 30GB O/S disk
  • 4GB DATA disk (used by ASM)
  • 4GB FLASH disk (used by ASM)
  • Network connection
  • Oracle Enterprise Linux 5 update 5

I have a VMware test environment at home that allows me to create machines very fast, if you are interested how VMware works then take a look at my VMware section.

Primary Database Server

The primary database server was installed with Linux using a standard installation, turning off the firewall and SELinux. To prepare them for Oracle I have used the YUM utility and oracle-validated RPM, this RPM will configure the following

Prepare Oracle using oracle-validated

## as root
cd /etc/yum.repos.d
wget http://public-yum.oracle.com/public-yum-el5.repo

## Edit the downloaded repo file and enable any of the sections you require

## install oracle-validated
yum list |grep -i oracle
yum install oracle-validated

The only thing that it did miss is that you need to install the libaio-devel and unixODBC-devel libraries, which you can use YUM to install for you and set the Oracle password.

I will be using ASM and will create a 4GB DATA group and a 4GB FLASH group, I will be using the two additional 4GB disks when I created the VM.

I will create a simple database called "PROD1" on the primarydg01, I selected to install the sample schema as well. I will install only the Oracle binaries on physicaldg01 and logicaldg01 and setup the ASM.

I have configured archiving and checked the tnsnames.ora file and setup a basic FLASH area, all pretty standard suff.

To see how I have setup host files, listener files, broker configuration, etc see my complete setup guide

Grid Control

Firstly the Virtual Machine needs to be a bit more powerful and you do require more disk space, I have allocated 50GB, this will allow me to install and keep the installation binaries, I have also increased the memory to 2.5GB. Again I have prepared the Linux server in the same way as the primary database server, I also used the oracle-validated RPM to prepare the server for Oracle, I will not be using ASM instead I will use standard filesystems.

Prepare Oracle using oracle-validated

## as root
cd /etc/yum.repos.d
wget http://public-yum.oracle.com/public-yum-el5.repo

## Edit the downloaded repo file and enable any of the sections you require

## install oracle-validated
yum list |grep -i oracle
yum install oracle-validated

I have a section on how to install and configure grid control and also how to install the grid agent onto the various databases.

Physical Standby DB Preparation

Now that we have a Grid Control server configured and the primary database server setup and with the grid control agent running, we are ready to prepare the physical standby server, again Linux was installed the same way as the primary and the server prepared using the oracle-validated RPM. To get the server ready for Data Guard I performed the following

I have a couple section on how to setup a physical standby database

Logical Standby DB Preparation

Setting up a Logical database is the same as setting up a physical one

I have a couple section on how to setup a logical standby database