Installation Companion Oracle Data Guard on Amazon EC2 Configuration Guide



Similar documents
Deloitte Solutions Network (SNET) Disaster Recovery POC on Amazon EC2

HOW TO. RMAN Restore for Standby 10gR2

Recreate Physical Standby Database after Recovery of Primary Database

Clonación de una Base de Datos Oracle 11gR2 Activa usando RMAN. CLONACIÓN DE UNA BASE DE DATOS ORACLE 11gR2 ACTIVA USANDO RMAN

Instant Disaster Recovery for Oracle by Deploying on the Amazon Cloud

If you have not multiplexed your online redo logs, then you are only left with incomplete recovery. Your steps are as follows:

Oracle Data Guard for High Availability and Disaster Recovery

RMAN BACKUP & RECOVERY. Recovery Manager. Veeratteshwaran Sridhar

Oracle 12c Recovering a lost /corrupted table from RMAN Backup after user error or application issue

Oracle 11gR2 : Recover dropped tablespace using RMAN tablespace point in time recovery

Maximum Availability Architecture. Oracle Best Practices For High Availability

Backup/Restore Oracle 8i/9i/10g

Getting Started with Oracle Data Mining on the Cloud

12. User-managed and RMAN-based backups.

OBIEE Cloning. Cloning the OBIEE 11g database migration to a new host. Ashok Thiyagarajan ADVANS MARLBOROUGH, MA AND CHENNAI, INDIA

Performing Database and File System Backups and Restores Using Oracle Secure Backup

Online Backup Guide for the Amazon Cloud: How to Setup your Online Backup Service using Vembu StoreGrid Backup Virtual Appliance on the Amazon Cloud

Using RMAN to restore a database to another server in an ASM environment

DOCUMENTATION ORACLE BACKUP & RESTORE OPERATIONS

Strategies for Oracle Database Backup and Recovery: Case Studies. Mingguang Xu

Getting Dedicated with Shared Servers, and how not to.

This appendix describes the following procedures: Cisco ANA Registry Backup and Restore Oracle Database Backup and Restore

Database Recovery For Newbies

Disclaimer. Maximum Availability Architecture

Database Disaster Recovery using only RMAN Backups

Zend Server Amazon AMI Quick Start Guide

VX 9000E WiNG Express Manager INSTALLATION GUIDE

Setting up the Oracle Warehouse Builder Project. Topics. Overview. Purpose

Configuring and Integrating Oracle

Oracle Database 10g: Backup and Recovery

Implementing Microsoft Windows Server Failover Clustering (WSFC) and SQL Server 2012 AlwaysOn Availability Groups in the AWS Cloud

USER CONFERENCE 2011 SAN FRANCISCO APRIL Running MarkLogic in the Cloud DEVELOPER LOUNGE LAB

Backing Up Oracle Databases with Handy Backup

Every Silver Lining Has a Vault in the Cloud

Oracle Backup and Recover 101. Osborne Press ISBN

IBM Security QRadar SIEM Version High Availability Guide IBM

Application Notes for configuring NICE IEX Workforce Management R4.6 with Avaya Proactive Contact R5.0.1 Issue 1.0

Oracle 11g DBA Online Course - Smart Mind Online Training, Hyderabad. Oracle 11g DBA Online Training Course Content

How To Create An Easybelle History Database On A Microsoft Powerbook (Windows)

Data virtualization: playing with Oracle 12c on Docker containers

RMAN for Commando DBAs. By Charles Kim

Support Document: Microsoft SQL Server - LiveVault 7.6X

ORACLE CORE DBA ONLINE TRAINING

D12CBR Oracle Database 12c: Backup and Recovery Workshop NEW

DEPLOYMENT GUIDE Version 1.1. Configuring BIG-IP WOM with Oracle Database Data Guard, GoldenGate, Streams, and Recovery Manager

WhatsUp Gold v16.3 Installation and Configuration Guide

EXPRESSCLUSTER X for Windows Quick Start Guide for Microsoft SQL Server Version 1

RMAN What is Rman Why use Rman Understanding The Rman Architecture Taking Backup in Non archive Backup Mode Taking Backup in archive Mode

Active Directory Infrastructure Design Document

Installing and Configuring Guardium, ODF, and OAV

Secure Web Browsing in Public using Amazon

RDS Migration Tool Customer FAQ Updated 7/23/2015

Use RMAN to relocate a 10TB RAC database with minimum downtime. Tao Zuo tao_zuo@npd.com NPD Inc. 9/2011

Oracle Data Guard Fast Start Failover understood!

Deploying for Success on the Cloud: EBS on Amazon VPC. Phani Kottapalli Pavan Vallabhaneni AST Corporation August 17, 2012

ArcGIS 10.3 Server on Amazon Web Services

Deploying Virtual Cyberoam Appliance in the Amazon Cloud Version 10

HP LeftHand SAN Solutions

Deploying Windows Streaming Media Servers NLB Cluster and metasan

MATLAB on EC2 Instructions Guide

INSTALLING KAAZING WEBSOCKET GATEWAY - HTML5 EDITION ON AN AMAZON EC2 CLOUD SERVER

Using Logon Agent for Transparent User Identification

Backup Server: User Manual. Version 2.1-p2

Using Symantec NetBackup with Symantec Security Information Manager 4.5

Veritas Cluster Server Database Agent for Microsoft SQL Configuration Guide

Deploying for Success on the Cloud: EBS on Amazon VPC Session ID#11312

EMC Replication Manager Integration with Oracle Database Server

Database Selection Guide

McAfee SMC Installation Guide 5.7. Security Management Center

Reference Architecture for HP Data Protector and Oracle 11gR2 RAC on Linux

Migration Scenario: Migrating Backend Processing Pipeline to the AWS Cloud

Oracle 11g Database Administration

Installing and Configuring DB2 10, WebSphere Application Server v8 & Maximo Asset Management

Restoring To A Different Location With EBU And RMAN An AppsDBA Consulting White Paper

Chapter 9 PUBLIC CLOUD LABORATORY. Sucha Smanchat, PhD. Faculty of Information Technology. King Mongkut s University of Technology North Bangkok

Die eingesetzte ORACLE Version ist Oracle Database 10g Enterprise Edition Release

An Oracle White Paper June Enterprise Manager Cloud Control 12c Disaster Recovery with Storage Replication

Using The Hortonworks Virtual Sandbox

Oracle Database Cross Platform Migration Lucy Feng, DBAK

Virtual Appliance Setup Guide

Amazon Relational Database Service. User Guide API Version

Configuring High Availability for VMware vcenter in RMS Distributed Setup

Troubleshooting Failover in Cisco Unity 8.x

Oracle 10g ODBC Installation Guide. Voyager Version 9.0+

CA ARCserve Replication and High Availability

Veritas High Availability Agent for Oracle Installation and Configuration Guide

Zen Internet. Online Data Backup. Zen Vault Professional Plug-ins. Issue:

Opsview in the Cloud. Monitoring with Amazon Web Services. Opsview Technical Overview

TECHNICAL REPORT. Nimble Storage Oracle Backup and Recovery Guide

Symantec Database Security and Audit 3100 Series Appliance. Getting Started Guide

Deploy App Orchestration 2.6 for High Availability and Disaster Recovery

UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

How To Run An Apa On An Amazon.Com

DVS-100 Installation Guide

Installing Oracle 12c Enterprise on Windows 7 64-Bit

Embarcadero Performance Center 2.7 Installation Guide

GWAVA 5. Migration Guide for Netware GWAVA 4 to Linux GWAVA 5

CA ARCserve Replication and High Availability for Windows

Oracle Backup, Recovery, and Performance Tuning using EMC Avamar and Oracle RMAN

SevOne NMS Download Installation and Implementation Guide

Transcription:

Installation Companion Oracle Data Guard on Amazon EC2 Configuration Guide Solutions Network Narender Akula Navin Mudaliar Shakir Aleem Ahmed Sasin Gnanamoorthy September 2010

Table of contents About this guide... 1 Executive summary... 1 Assumptions... 1 Required Software... 2 Logging into the AWS Management Console... 2 Logging into the Instance using Putty SSH... 2 Data Guard Configuration... 5 Create a Standby Instance... 6 Host file configuration... 6 Prepare Primary Server and Standby Server... 6 Prepare Primary Database... 7 Prepare Standby database... 9 Update and Test connectivity between Primary and Standby... 9 Create Standby Database using RMAN... 12 Configuring Data Guard Broker... 14 Configuring Fast-Start Failover... 16 The Observer... 16 Verify redo is shipping... 16 Appendix A Data Guard init parameters... 18 Appendix B Listener.ora configuration files... 19 Appendix C Tnsnames.ora configuration files... 20 Appendix D Data Guard status verification... 21 Questions and Feedback... 22 Deloitte-DR-Cloud-BestPractices-plus2.docx

About this guide The purpose of an installation companion is to centralize a variety of product-specific information for technical practitioners so they can quickly become familiar with the installation processes of Oracle Data Guard 11g on AWS infrastructure. Installation steps have been tested using the specific documentation and software described in this document, which increases the probability of success. Installation companions may also describe lessons learned, and provide links to additional information that will help successful installation. Installation companions are not intended to replace official Oracle documentation, nor should they be used in this way. Practitioners should familiarize themselves with the official Oracle installation guide(s and critical OSS notes before starting the installation. This guide provides instructions for How to configure Data Guard on Amazon EC2 Instance. Executive summary Amazon Web Services (AWS provides on-demand dynamic Information Technology services via the Internet. This type of computing is known as Cloud Computing. The services AWS offers are a subset of Cloud Computing referred to as Platform as a Service (PaaS. With AWS, virtual servers can be quickly deployed with storage and networking that leverages the Elastic Cloud Compute (EC2 service. EC2 offers an alternative to traditional internal managed IT infrastructure. With AWS/EC2 you pay only for what you use and there are no upfront costs or long term commitments. Amazon Web Service (AWS Suite of Cloud Computing services offered by Amazon: http://aws.amazon.com/what-is-aws Elastic Cloud Computing (EC2 AWS service that provides on-demand, resizable compute capacity (servers, disk, network, etc. in the cloud: http://aws.amazon.com/ec2 Elastic Block Store (EBS Persistent block level storage volumes for Amazon EC2 instances: http://aws.amazon.com/ebs Amazon Machine Image (AMI Preconfigured server images with various operating systems (Linux and pre-installed software (databases, Oracle E-Business Suite R12. Amazon Virtual Private Cloud (Amazon VPC - Secure and seamless bridge between a company s existing IT infrastructure and the AWS cloud. It isolates a subset of Amazon EC2 infrastructure and connects AWS servers to the corporate network via a secure, IPSEC VPN tunnel. Using this connection method, Amazon EC2 instances appear on the private network as a subnet of servers that are managed using the same security processes and tools that are used for servers physically deployed within the data center. Instance A running server based on AMI image. Assumptions 1. An Amazon account for AWS, EC2 and S3 service is available. If not new accounts can be established at: http://aws.amazon.com 2. This document assumes the Oracle E-Business Suite or Oracle database is running. This document covers only data guard configuration on AWS.

Required Software 1. Firefox Browser, available at http://www.mozilla.com 2. S3 Firefox Organizer, available at https://addons.mozilla.org/en-us/firefox/addon/3247 3. Putty and Puttygen, Windows users can download and install PuTTY, a free SSH client. To download the client an installation instructions, go to the http://www.chiark.greenend.org.uk/~sgtatham/putty/. To get started, read the Amazon EC2 Getting Started Guide for instructions on setting up your AWS account and obtain your access key identifiers. Create your key pair or use existing one if available and modify your security group to include SSH access to port 22 for PuTTY. Logging into the AWS Management Console The AWS Management Console provides a graphical user interface for Amazon EC2, Amazon Elastic MapReduce, and Amazon CloudFront. Access the AWS Management Console via https://console.aws.amazon.com Below is a screenshot of the AWS Management Console Logging into the Instance using Putty SSH 1. Now run the main PuTTY application. In the main Session screen, add the Public DNS for your new Amazon EC2 Instance into the Host/IP Box. You can also name your profile if you want to reuse.

2. In the menu tree on the left, expand SSH under Connection and select Auth. Click the Browse button in the Private Key File field and load the key you just created with PuTTYgen. 3. Click the Open button at the bottom (or you can go back to the Session screen to save your configuration first. A SSH command line window will open with a prompt saying Login As:. Type root and hit enter. If you see something like this, you have successfully logged in!

4. Perform the above steps 1,2 and 3 to launch standby Server.

Data Guard Configuration Oracle Data Guard is the key high availability (HA and disaster recovery (DR solution for the Oracle Database. With Fast-Start Failover along with enhancements in Oracle Database 11g, Data Guard can failover in a few seconds. The following section covers Oracle Data Guard configuration on AWS Infrastructure using Public and Hybrid Cloud scenarios. Oracle E-Business Suite R12 Public Cloud Figure 1: Deployment with both Primary and Standby in the Cloud - using Availability Zones Primary Server: EBSR12PRM.COMPUTE-1.AMAZONAWS.COM Primary Database: VIS Hosting Facility: AWS EC2 Availability Zone: US-East 1a Standby Server: Ec2r12ebsdbs Standby Database: VISSTB Hosting Facility: AWS EC2 Availability Zone: US-East 1c

Create a Standby Instance 1. Login to Elasticfox or AWS Management Console select the Database Node AMI (ex: ami- 12769e7b and Launch Standby Instance. 2. The Launch Instance Wizard will be started. 1. Select the number of instances to start in this case 1 2. Select the instance type (i.e. size Large 3. Select Availability Zone: Same zone of Primary Database or different zone 4. Select the key pair created earlier oracledeloitteaws-east 5. Select the security group created earlier 6. Click on Launch After Instance is Launched Login to Instance as described in section Logging into the Instance using Putty SSH. Host file configuration 1. Change the /etc/host file on the primary and standby to reflect both primary server and stand by server hostnames.. 127.0.0.1 localhost.localdomain localhost 10.203.22.180 EBSR12PRM.compute-1.amazonaws.com EBSR12PRM 10.203.22.176 ec2r12ebsdbs.compute-1.amazonaws.com ec2r12ebsdbs Prepare Primary Server and Standby Server 2. Run preclone on primary database server cd /data/oracle/vis/db/tech_st/11.1.0/appsutil/scripts/vis_ebsr12prm/./adpreclone.pl dbtier 3. Copy Oracle_home(/data/oracle/VIS/db/tech_st from primary server to standby server(/data/oracle/vis/db/tech_st. 4. Run Autoconfig on Standby Node. cd /data/oracle/vis/db/tech_st/11.1.0/appsutil/clone/bin/./adcfgclone.pl dbtechstack [oracle@ec2r12ebsdbs bin]$./adcfgclone.pl dbtechstack 5. Listener on Standby Automatically started. Verify the Listener. [oracle@ec2r12ebsdbs bin]$ lsnrctl status VIS LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 06-SEP-2010 20:39:08 Copyright (c 1991, 2008, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP(HOST=ec2r12ebsdbs.compute1.amazonaws.com(PORT=15 26 STATUS of the LISTENER

------------------------ Alias VIS Version TNSLSNR for Linux: Version 11.1.0.7.0 - Production Start Date 06-SEP-2010 20:32:50 Uptime 0 days 0 hr. 6 min. 18 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /data/oracle/vis/db/tech_st/11.1.0/network/admin/vis_ec2r12ebsdbs/listener.ora Listener Log File /data/oracle/vis/db/tech_st/11.1.0/log/diag/tnslsnr/ec2r12ebsdbs/vis/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp(HOST=ec2r12ebsdbs.compute1.amazonaws.com(PORT=152 6 Services Summary... Service "VIS" has 1 instance(s. Instance "VIS", status UNKNOWN, has 1 handler(s for this service... The command completed successfully Prepare Primary Database The Following steps needs to be executed on Primary Database. 1. Enable Logging oracle@ebsr12prm tech_st]$ sqlplus / as sysdba SQL*Plus: Release 11.1.0.7.0 - Production on Wed Aug 18 15:53:36 2010 Copyright (c 1982, 2008, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0-64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> ALTER DATABASE FORCE LOGGING; 2. Add Standby redo log Files (Bug: Log should be same size of redologs SQL> alter database add standby logfile '/data/oracle/vis/db/apps_st/data/stb_redo01.log' SIZE 314572800; SQL> alter database add standby logfile '/data/oracle/vis/db/apps_st/data/stb_redo02.log' SIZE 314572800; SQL> alter database add standby logfile '/data/oracle/vis/db/apps_st/data/stb_redo03.log' SIZE 314572800; 3. Update Hosts file with Standby Node Information [oracle@ebsr12prm tech_st]$ cat /etc/hosts 10.203.22.180 EBSR12PRM.compute-1.amazonaws.com EBSR12PRM 10.203.22.176 ec2r12ebsdbs.compute-1.amazonaws.com ec2r12ebsdbs 127.0.0.1 localhost.localdomain localhost 4. Update SID_Hostname_ifile.ora with TNS entries, do not use tnsnames.ora running Autoconfig will over write changes.

[oracle@ebsr12prm tech_st]$ cat /data/oracle/vis/db/tech_st/11.1.0/network/admin/vis_ebsr12prm/vis_ebsr12prm_ifile.ora VISSTB = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP(HOST = ec2r12ebsdbs.compute-1.amazonaws.com(port = 1526 (CONNECT_DATA = (SERVICE_NAME = VIS 5. Modify the Init.ora on Primary (Appendix A [oracle@ebsr12prm dbs]$ cat VIS_EBSR12PRM_ifile.ora LOG_ARCHIVE_DEST_1='LOCATION=/data/oracle/VIS/db/archive VALID_FOR=(ALL_LOGFILES,ALL_ROLES DB_UNIQUE_NAME=VIS' LOG_ARCHIVE_CONFIG='DG_CONFIG=(VIS,VISSTB' DB_FILE_NAME_CONVERT='VIS','VIS' FAL_CLIENT='VIS' FAL_SERVER='VISSTB' log_archive_dest_2='service=visstb VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE DB_UNIQUE_NAME=VISSTB' LOG_ARCHIVE_DEST_STATE_1='ENABLE' LOG_ARCHIVE_DEST_STATE_2='ENABLE' log_archive_format='%t_%s_%r.arc' LOG_FILE_NAME_CONVERT='VIS','VIS' remote_login_passwordfile='exclusive' SERVICE_NAMES='VIS' STANDBY_FILE_MANAGEMENT='AUTO' db_unique_name=vis

Prepare Standby database 1. Modify the Init.ora on Standby (Appendix A oracle@ec2r12ebsdbs bin]$ cat /data/oracle/vis/db/tech_st/11.1.0/dbs/vis_ec2r12ebsdbs_ifile.ora LOG_ARCHIVE_DEST_1='LOCATION=/data/oracle/VIS/db/archive VALID_FOR=(ALL_LOGFILES,ALL_ROLES DB_UNIQUE_NAME=VISSTB LOG_ARCHIVE_CONFIG='DG_CONFIG=(VIS,VISSTB' DB_FILE_NAME_CONVERT='VIS','VIS' FAL_CLIENT='VISSTB' FAL_SERVER='VIS' log_archive_dest_2='service=vis VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE DB_UNIQUE_NAME=VIS' LOG_ARCHIVE_DEST_STATE_1='ENABLE' log_archive_dest_state_2='defer' log_archive_format='%t_%s_%r.arc' LOG_FILE_NAME_CONVERT='VIS','VIS' remote_login_passwordfile='exclusive' SERVICE_NAMES='VISSTB' STANDBY_FILE_MANAGEMENT='AUTO' db_unique_name=visstb 2. Copy password file from Primary to Standby. Copy ORACLE_HOME/dbs/orapwVIS from primary to ORACLE_HOME/dbs/orapwVIS on standby 3. Startup standby database in nomount state Update and Test connectivity between Primary and Standby 1. Update listener.ora as follows: (Appendix B Primary Node: VIS = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP(HOST = EBSR12PRM.compute-1.amazonaws.com(PORT = 1526 SID_LIST_VIS = (SID_LIST = (SID_DESC = (ORACLE_HOME= /data/oracle/vis/db/tech_st/11.1.0 (SID_NAME = VIS (SID_DESC = (ORACLE_HOME= /data/oracle/vis/db/tech_st/11.1.0 (SID_NAME = VIS (GLOBAL_DBNAME=VIS_DGMGRL

(SID_DESC = (ORACLE_HOME= /data/oracle/vis/db/tech_st/11.1.0 (SID_NAME = VIS (GLOBAL_DBNAME=VIS_DGB Standby Node: VIS = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP(HOST = ec2r12ebsdbs.compute-1.amazonaws.com(port = 1526 SID_LIST_VIS = (SID_LIST = (SID_DESC = (ORACLE_HOME= /data/oracle/vis/db/tech_st/11.1.0 (SID_NAME = VIS (SID_DESC = (ORACLE_HOME= /data/oracle/vis/db/tech_st/11.1.0 (SID_NAME = VIS (GLOBAL_DBNAME=VISSTB_DGMGRL (SID_DESC = (ORACLE_HOME= /data/oracle/vis/db/tech_st/11.1.0 (SID_NAME = VIS (GLOBAL_DBNAME=VISSTB_DGB 2. Update tnsnames.ora on primary and standby with following entries (Appendix C: VISSTB = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP(HOST = ec2r12ebsdbs.compute-1.amazonaws.com(port = 1526 (CONNECT_DATA = (SID = VIS VIS = (DESCRIPTION = (ADDRESS=(PROTOCOL=tcp(HOST=EBSR12PRM.compute- 1.amazonaws.com(PORT=1526 (CONNECT_DATA= (SID=VIS Run tnsping on Primary to verify: [oracle@ebsr12prm ~]$ tnsping VIS TNS Ping Utility for Linux: Version 11.1.0.7.0 - Production on 06-SEP-2010 22:01:07 Copyright (c 1997, 2008, Oracle. All rights reserved.

Used parameter files: /data/oracle/vis/db/tech_st/11.1.0/network/admin/vis_ebsr12prm/sqlnet_ifile.ora Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp(HOST=EBSR12PRM.compute- 1.amazonaws.com(PORT=1526 (CONNECT_DATA= (SID=VIS OK (10 msec [oracle@ebsr12prm ~]$ tnsping VISSTB TNS Ping Utility for Linux: Version 11.1.0.7.0 - Production on 06-SEP-2010 22:01:11 Copyright (c 1997, 2008, Oracle. All rights reserved. Used parameter files: /data/oracle/vis/db/tech_st/11.1.0/network/admin/vis_ebsr12prm/sqlnet_ifile.ora Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP(HOST = ec2r12ebsdbs.compute-1.amazonaws.com(port = 1526 (CONNECT_DATA = (SID = VIS OK (0 msec Run tnsping on Standby to verify: [oracle@ec2r12ebsdbs VIS_ec2r12ebsdbs]$ tnsping VISSTB TNS Ping Utility for Linux: Version 11.1.0.7.0 - Production on 06-SEP-2010 22:01:11 Copyright (c 1997, 2008, Oracle. All rights reserved. Used parameter files: /data/oracle/vis/db/tech_st/11.1.0/network/admin/vis_ebsr12prm/sqlnet_ifile.ora Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP(HOST = ec2r12ebsdbs.compute-1.amazonaws.com(port = 1526 (CONNECT_DATA = (SID = VIS OK (0 msec [oracle@ec2r12ebsdbs VIS_ec2r12ebsdbs]$ tnsping VIS TNS Ping Utility for Linux: Version 11.1.0.7.0 - Production on 06-SEP-2010 22:01:07 Copyright (c 1997, 2008, Oracle. All rights reserved. Used parameter files: /data/oracle/vis/db/tech_st/11.1.0/network/admin/vis_ebsr12prm/sqlnet_ifile.ora Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp(HOST=EBSR12PRM.compute- 1.amazonaws.com(PORT=1526 (CONNECT_DATA= (SID=VIS OK (10 msec 3. Logon to Primary, check the database connection oracle@ebsr12prm ~]$ sqlplus sys/syspwd@vis as sysdba SQL*Plus: Release 11.1.0.7.0 - Production on Wed Aug 18 16:24:18 2010 Copyright (c 1982, 2008, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0-64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> exit [oracle@ebsr12prm dbs]$ sqlplus sys/syspwd@visstb as sysdba SQL*Plus: Release 11.1.0.7.0 - Production on Mon Sep 6 22:25:01 2010 Copyright (c 1982, 2008, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0-64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> 4. Logon to Secondary, check the database connection [oracle@ec2r12ebsdbs dbs]$ sqlplus sys/syspwd@vis as sysdba SQL*Plus: Release 11.1.0.7.0 - Production on Wed Aug 18 16:29:24 2010 Copyright (c 1982, 2008, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0-64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> exit [oracle@ec2r12ebsdbs dbs]$ sqlplus sys/syspwd@visstb as sysdba SQL*Plus: Release 11.1.0.7.0 - Production on Wed Aug 18 16:29:34 2010 Copyright (c 1982, 2008, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0-64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> exit Create Standby Database using RMAN 1. Create cr8stndbyfrmactv.cmd with RMAN Commands on Primary Database. [oracle@ebsr12prm ~]$ cat cr8stndbyfrmactv.cmd DUPLICATE TARGET DATABASE FOR STANDBY FROM ACTIVE DATABASE NOFILENAMECHECK DORECOVER; 2. Execute RMAN Command. nohup rman target=sys/syspwd@vis auxiliary=sys/syspwd@visstb cmdfile=cr8stndbyfrmactv.cmd log=standby_creation.log & tail f standby_creation.log (Content is stripped due to size of log file [oracle@ebsr12prm ~]$ cat standby_creation.log Recovery Manager: Release 11.1.0.7.0 - Production on Wed Aug 18 16:42:09 2010 Copyright (c 1982, 2007, Oracle. All rights reserved. connected to target database: VIS (DBID=275616243 connected to auxiliary database: VIS (not mounted RMAN> DUPLICATE TARGET DATABASE FOR STANDBY FROM ACTIVE DATABASE NOFILENAMECHECK DORECOVER; 2> Starting Duplicate Db at 18-AUG-10

using target database control file instead of recovery catalog allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: SID=382 device type=disk contents of Memory Script: { backup as copy reuse file '/data/oracle/vis/db/tech_st/11.1.0/dbs/orapwvis' auxiliary format '/data/oracle/vis/db/tech_st/11.1.0/dbs/orapwvis' ; } executing Memory Script Starting backup at 18-AUG-10 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=289 device type=disk Finished backup at 18-AUG-10 contents of Memory Script: { backup as copy current controlfile for standby auxiliary format '/data/oracle/vis/db/apps_st/data/cntrl01.dbf'; restore clone controlfile to '/data/oracle/vis/db/apps_st/data/cntrl02.dbf' from '/data/oracle/vis/db/apps_st/data/cntrl01.dbf'; restore clone controlfile to '/data/oracle/vis/db/apps_st/data/cntrl03.dbf' from '/data/oracle/vis/db/apps_st/data/cntrl01.dbf'; sql clone 'alter database mount standby database'; } executing Memory Script executing Memory Script Starting backup at 18-AUG-10 using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile copy copying standby control file output file name=/data/oracle/vis/db/tech_st/11.1.0/dbs/snapcf_vis.f tag=tag20100818t164214 RECID=4 STAMP=727375336 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07 Finished backup at 18-AUG-10 Starting restore at 18-AUG-10 using channel ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: copied control file copy Finished restore at 18-AUG-10 Starting restore at 18-AUG-10 using channel ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: copied control file copy Finished restore at 18-AUG-10 sql statement: alter database mount standby database

contents of Memory Script: { set newname for tempfile 1 to "/data/oracle/vis/db/apps_st/data/temp01.dbf"; set newname for tempfile 2 to "/data/oracle/vis/db/apps_st/data/temp02.dbf"; set newname for tempfile 3 to "/data/oracle/vis/db/apps_st/data/temp03.dbf"; switch clone tempfile all; < Content trimmed> sql 'alter system archive log current'; } executing Memory Script executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME renamed tempfile 1 to /data/oracle/vis/db/apps_st/data/temp01.dbf in control file renamed tempfile 2 to /data/oracle/vis/db/apps_st/data/temp02.dbf in control file renamed tempfile 3 to /data/oracle/vis/db/apps_st/data/temp03.dbf in control file Starting backup at 18-AUG-10 using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile copy input datafile file number=00017 name=/data/oracle/vis/db/apps_st/data/sys6.dbf output file name=/data/oracle/vis/db/apps_st/data/sys6.dbf tag=tag20100818t164233 RECID=0 STAMP=0 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:25 channel ORA_DISK_1: starting datafile copy [oracle@ebsr12prm ~]$ Check for any error in the RMAN Log. Configuring Data Guard Broker 1. Setup database parameters on primary and standby database for Data Guard Broker These parameters include: (Appendix A global_names= TRUE dg_broker_start = TRUE dg_broker_config_file1 = $ORACLE_HOME/dbs/file1 dg_broker_config_file2 = $ORACLE_HOME/dbs/file2 SQL> alter system set global_names=true scope=both; SQL> alter system set DG_BROKER_START=TRUE scope=both;

SQL>ALTER SYSTEM SET DG_BROKER_CONFIG_FILE1='/data/app/oracle/product/11.1.0/db_1/dbs/DGCTPRMDB1.dat' scope=both; SQL> ALTER SYSTEM SET DG_BROKER_CONFIG_FILE2='/data/app/oracle/product/11.1.0/db_1/dbs/DGCTPRMDB2.dat' scope=both; 2. Invoke dgmgrl utility, connect to either primary using TNS dgmgrl sys/password@vis 3. Create a configuration, define primary and standby databases DGMGRL>create configuration DGCONFIG as primary database is 'VIS' connect identifier is 'VIS'; add database 'VISSTB' as connect identifier is 'VISSTB'; 4. Update configuration with property StaticConnectIdentifier 5. Enable the configuration DGMGRL>edit database 'VIS' set property StaticConnectIdentifier='VIS'; DGMGRL>edit database 'VISSTB' set property StaticConnectIdentifier='VISSTB'; DGMGRL>Enable configuration 6. Perform switchover from primary to standby and otherwise DGMGRL>Switchover to VISSTB Note: Before trying Switch over make instances using SPfile. 7. Switch to different protection modes: a Change to maxavailability: DGMGRL>edit database 'VIS' set property logxptmode=sync; DGMGRL>edit database 'VISSTB' set property logxptmode=sync; DGMGRL>edit configuration set protection mode as maxavailability; b Change to maxperformance: DGMGRL>edit configuration set protection mode as maxperformance; c Change to maxprotection: DGMGRL>edit database 'VIS' set property logxptmode=sync; DGMGRL> edit database 'VISSTB' set property logxptmode=sync; DGMGRL> edit configuration set protection mode as maxavailability; DGMGRL> edit configuration set protection mode as maxprotection;

Enabling Max Protection mode requires a restart of primary and standby database this is automatically taken care by Data Guard Broker. Standby redo log needs to be available and should be same size as online redologs. Configuring Fast-Start Failover 1. FastStartFailoverThreshold: This parameter specifies the amount of time (in seconds the observer attempts to reconnect to the primary database before starting the fast-start failover to the standby database. The default value is set to 30 seconds. DGMGRL> EDIT CONFIGURATION SET PROPERTY FastStartFailoverThreshold=6; 2. FastStartFailoverLagLimit: This property indicates the maximum amount of data loss that is permissible in order for an automatic failover to occur. DGMGRL> EDIT CONFIGURATION SET PROPERTY FastStartFailoverLagLimit=45; 3. FastStartFailoverTarget for primary and standby DGMGRL> EDIT DATABASE 'VIS' SET PROPERTY FastStartFailoverTarget='VISSTB'; DGMGRL> EDIT DATABASE 'VISSTB' SET PROPERTY FastStartFailoverTarget='VIS'; 4. Enable Flashback on the primary and standby databases 5. Once the above settings are done, enable fast start failover DGMGRL> Enable Fast_start Failover; However, Fast Start Failover needs an observer to be up and running to perform automatic failover. The Observer Since observer needs to be up and running, create a script to run in background. Observer background script: [oracle@ec2r12ebsdbs scripts]$ cat start_observer.sh dgmgrl -logfile /home/oracle/scripts/logs/observer.log sys/syspwd@vis <<EOF start observer EOF [oracle@ec2r12ebsdbs scripts]$ nohup./ start_observer.sh & Verify redo is shipping Check to see that the database is shipping redo, by connecting to the primary database and causing a log switch: SQL >alter system switch logfile;

On each database server, this query will show which logs have been sent /received and applied: SQL >select sequence#, applied, to_char(first_time mm/dd/yy hh24:mi:ss first from v$archived_log order by first_time; On the standby database server, monitor the database alert log for recovery progress. Primary on Premises and Standby on Cloud Figure 2: Architecture for Primary Site on own premises, Standby Site on Amazon Cloud

Appendix A Data Guard init parameters #Primary init.ora: LOG_ARCHIVE_DEST_1='LOCATION=/data/oracle/VIS/db/archive VALID_FOR=(ALL_LOGFILES,ALL_ROLES DB_UNIQUE_NAME=VIS' LOG_ARCHIVE_CONFIG='DG_CONFIG=(VIS,VISSTB' DB_FILE_NAME_CONVERT='VIS','VIS' FAL_CLIENT='VIS' FAL_SERVER='VISSTB' log_archive_dest_2='service=visstb VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE DB_UNIQUE_NAME=VISSTB' LOG_ARCHIVE_DEST_STATE_1='ENABLE' log_archive_dest_state_2='enable' log_archive_format='%t_%s_%r.arc' LOG_FILE_NAME_CONVERT='VIS','VIS' remote_login_passwordfile='exclusive' SERVICE_NAMES='VIS' STANDBY_FILE_MANAGEMENT='AUTO' db_unique_name=vis global_names=true DG_BROKER_START=TRUE DG_BROKER_CONFIG_FILE1='/data/oracle/VIS/db/tech_st/11.1.0/dbs/DGCVIS1.dat' DG_BROKER_CONFIG_FILE2='/data/oracle/VIS/db/tech_st/11.1.0/dbs/DGCVIS2.dat' #Standby init.ora: LOG_ARCHIVE_DEST_1='LOCATION=/data/oracle/VIS/db/archive VALID_FOR=(ALL_LOGFILES,ALL_ROLES DB_UNIQUE_NAME=VISSTB' LOG_ARCHIVE_CONFIG='DG_CONFIG=(VIS,VISSTB' DB_FILE_NAME_CONVERT='VIS','VIS' FAL_CLIENT='VISSTB' FAL_SERVER='VIS' log_archive_dest_2='service=vis VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE DB_UNIQUE_NAME=VIS' LOG_ARCHIVE_DEST_STATE_1='ENABLE' log_archive_dest_state_2='defer' log_archive_format='%t_%s_%r.arc' LOG_FILE_NAME_CONVERT='VIS','VIS' remote_login_passwordfile='exclusive' SERVICE_NAMES='VISSTB' STANDBY_FILE_MANAGEMENT='AUTO' db_unique_name=visstb global_names=true DG_BROKER_START=TRUE DG_BROKER_CONFIG_FILE1='/data/oracle/VIS/db/tech_st/11.1.0/dbs/DGCVIS1.dat' DG_BROKER_CONFIG_FILE2='/data/oracle/VIS/db/tech_st/11.1.0/dbs/DGCVIS2.dat'

Appendix B Listener.ora configuration files #Primary listener.ora: VIS = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP(HOST = EBSR12PRM.compute-1.amazonaws.com(PORT = 1526 (SID_LIST = (SID_DESC = (ORACLE_HOME= /data/oracle/vis/db/tech_st/11.1.0 (SID_NAME = VIS (SID_DESC = (ORACLE_HOME= /data/oracle/vis/db/tech_st/11.1.0 (SID_NAME = VIS (GLOBAL_DBNAME=VIS_DGMGRL (SID_DESC = (ORACLE_HOME= /data/oracle/vis/db/tech_st/11.1.0 (SID_NAME = VIS (GLOBAL_DBNAME=VIS_DGB #Standby listener.ora: VIS = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP(HOST = ec2r12ebsdbs(port = 1526 SID_LIST_VIS = (SID_LIST = (SID_DESC = (ORACLE_HOME= /data/oracle/vis/db/tech_st/11.1.0 (SID_NAME = VIS (SID_DESC = (ORACLE_HOME= /data/oracle/vis/db/tech_st/11.1.0 (SID_NAME = VIS (GLOBAL_DBNAME=VISSTB_DGMGRL (SID_DESC = (ORACLE_HOME= /data/oracle/vis/db/tech_st/11.1.0 (SID_NAME = VIS (GLOBAL_DBNAME=VISSTB_DGB

Appendix C Tnsnames.ora configuration files #Primary tnsnames.ora: VISSTB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP(HOST = ec2r12ebsdbs.compute-1.amazonaws.com(port = 1526 (CONNECT_DATA = (SID = VIS VIS = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP(HOST = EBSR12PRM.compute-1.amazonaws.com(PORT = 1526 (CONNECT_DATA = (SID = VIS VIS_LOCAL = (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp(HOST=EBSR12PRM.compute-1.amazonaws.com(PORT=1526 VIS_REMOTE = (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp(HOST=EBSR12PRM.compute-1.amazonaws.com(PORT=1526 #Standby tnsnames.ora: VISSTB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP(HOST = ec2r12ebsdbs.compute-1.amazonaws.com(port = 1526 (CONNECT_DATA = (SID = VIS VIS = (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp(HOST=EBSR12PRM.compute-1.amazonaws.com(PORT=1526 (CONNECT_DATA=(SID=VIS

Appendix D Data Guard status verification DGMGRL> show configuration Configuration Name: dgconfig Enabled: YES Protection Mode: MaxAvailability Databases: VIS - Primary database VISSTB - Physical standby database - Fast-Start Failover target Fast-Start Failover: ENABLED Current status for "dgconfig": SUCCESS DGMGRL> SHOW FAST_START FAILOVER; Fast-Start Failover: ENABLED Threshold: 6 seconds Target: VISSTB Observer: ec2r12ebsdbs Lag Limit: 45 seconds (not in use Shutdown Primary: TRUE Auto-reinstate: TRUE Configurable Failover Conditions Health Conditions: Corrupted Controlfile YES Corrupted Dictionary YES Inaccessible Logfile NO Stuck Archiver NO Datafile Offline YES Oracle Error Conditions: (none

Questions and Feedback The Deloitte Solutions Network (SNET strives to make our documents as useful as possible. We welcome your comments and questions regarding this or any other technical documents. Send your feedback or questions in an e-mail to nakula@deloitte.com or nmudaliar@deloitte.com.

About Deloitte Deloitte refers to one or more of Deloitte Touche Tohmatsu Limited, a UK private company limited by guarantee, and its network of member firms, each of which is a legally separate and independent entity. Please see www.deloitte.com/about for a detailed description of the legal structure of Deloitte Touche Tohmatsu Limited and its member firms. Deloitte provides audit, tax, consulting, and financial advisory services to public and private clients spanning multiple industries. With a globally connected network of member firms in more than 140 countries, Deloitte brings world-class capabilities and deep local expertise to help clients succeed wherever they operate. Deloitte's approximately 170,000 professionals are committed to becoming the standard of excellence. Disclaimer This publication contains general information only, and none of Deloitte Touche Tohmatsu Limited, Deloitte Global Services Limited, Deloitte Global Services Holdings Limited, the Deloitte Touche Tohmatsu Verein, any of their member firms, or any of the foregoing s affiliates (collectively the Deloitte Network are, by means of this publication, rendering accounting, business, financial, investment, legal, tax, or other professional advice or services. This publication is not a substitute for such professional advice or services, nor should it be used as a basis for any decision or action that may affect your finances or your business. Before making any decision or taking any action that may affect your finances or your business, you should consult a qualified professional adviser. No entity in the Deloitte Network shall be responsible for any loss whatsoever sustained by any person who relies on this publication. 2010 Deloitte Global Services Limited