0% found this document useful (0 votes)
229 views

Oracle DataGuard Documentation PDF

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
229 views

Oracle DataGuard Documentation PDF

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

Opera Hotel Edition

Oracle Dataguard 10g


Version 4.0.x
July 2007
Opera Hotel Edition -

Copyright
© 2007 MICROS Systems, Inc. All rights reserved. No part of this publication may be reproduced, photocopied,
stored on a retrieval system, or transmitted without the express prior written consent of the publisher. MICROS
Systems, Inc. retains the right to update or change the contents of this document without prior notice. MICROS
Systems, Inc. assumes no responsibility for the contents of this document.
OPERA is a trademark of MICROS Systems, Inc.
On Oracle and the On Oracle logo are trademarks of Oracle Corporation.
Information in this document is subject to change without notice.
MICROS Systems, Inc. makes no warranty of any kind with regard to this material, including but not limited to the
implied warranties of marketability and fitness for a particular purpose.
MICROS Systems, Inc. shall not be liable for errors contained herein or for incidental or consequential damages in
connection with the furnishing, performance, or use of this material.
Document Number:
Farid Zainol
Regional Database Administrator
Micros-Fidelio Asia Pacific
371 Beach Road
#11-00 KeyPoint
Singapore 199597
Voice: (+65) 6354 3990 / Fax: (+65) 6396 5419

MICROS Systems, Inc.


Fidelio Technologies Inc.
2640 Golden Gate Parkway
Suite 211
Naples, FL 34105
Voice: (+1239) 643-7999 / Fax: (+1239) 643-7911

MICROS-FIDELIO ASIA PACIFIC. PAGE 2 JULY 2006


Opera Hotel Edition -

Table of Contents
1.0  Introduction .............................................................................4 
2.0  Configuration options for Dataguard............................................. 4 
2.1  3- server setup ( 60 users +50 users) .......................................... 5 
2.2  2- server setup (50 users) ..........................................................6 
2.3  Recommended hardware ............................................................7 
3.0  Installation of dataguard server ................................................... 7 
3.1  Pre-Requisite checks ..................................................................7 
3.2  Installation of Single Server ........................................................ 7 
3.3  Changes on Primary Database server ........................................... 8 
3.4  Changes on Dataguard server ................................................... 11 
3.5  Copy Production database to Dataguard server ............................ 15 
3.6  Activating the Production server ................................................ 15 
3.7  Activating the Dataguard Server ................................................ 18 
4.0  Verifying Dataguard ................................................................. 21 
5.0  Dataguard Operations .............................................................. 22 
5.1  STANDBY SWITCHOVER ........................................................... 23 
5.2  STANDBY FailOVER .................................................................. 26 
6.0  Rebuilding the standby server ................................................... 28 
7.0  Scheduled Tasks ..................................................................... 33 
6.1  START_STANDBY .................................................................... 33 
6.2  daily_report............................................................................ 38 
8.0  Application Changes ................................................................ 44 
9.0  Appendix A ............................................................................. 45

MICROS-FIDELIO ASIA PACIFIC. PAGE 3 JULY 2007


Opera Hotel Edition -

1.0 INTRODUCTION

Oracle Data Guard is the most effective and comprehensive Disaster Recovery solution
available today for enterprise data

What is Dataguard?

Database software infrastructure that automates the creation and maintenance of a


duplicate or standby copy, of the production (or primary) database

If the primary database becomes unavailable (disasters, maintenance), the standby


database can be activated and can take over the data serving needs of the enterprise

Why use Dataguard?

1. Disaster Recovery & High Availability


-Easy failover/switchover between primary and standby databases
2. Complete data protection
-Guaranteed zero data loss, safeguard against data corruptions
3. Efficient utilization of system resources
-Standby databases can be used for reporting, backups, queries
4. Balance data availability against performance
-Flexible data protection/synchronization modes
5. Automatic resynchronization after restoration of network connectivity
-Automatic archive gap detection and resolution with no manual intervention
6. Centralized and simple management
-Push-button graphical interface for management and monitoring

2.0 CONFIGURATION OPTIONS FOR DATAGUARD

There are 2 available options for the setup of Oracle Dataguard. Please note that these
configurations are base installations and additional applications can be added to these
configurations with no impact to Dataguard.

An important point to take note is that Opera Single Server should be used to install the
Dataguard server unless it is not planned for it to be used as an application server.

In both cases, the setup of the server with Dataguard is similar.


2 important things to take note of are-

• Dataguard server must be installed with the same OS as the Production server.
• All servers must be installed with the same version of Oracle

MICROS-FIDELIO ASIA PACIFIC. PAGE 4 JULY 2007


Opera Hotel Edition -

2.1 3- SERVER SETUP ( 60 USERS +50 USERS)

In the diagram above, it shows the setup which consists of 3 physical servers.
There are 4 possible scenarios for this setup.

1) Normal Situation
The Database server updates the Dataguard Database
The Application server allows user connections
The Dataguard server allows user connections

2) Database Server Failure


The Dataguard Server takes the role of the Database Server
The Application server allows user connections

3) Application Server Failure


The Dataguard server takes over the role of the Application server
Users will access Opera using the Dataguard Server

4) Database and Application Server Failure


The Dataguard Server will take the roles of both the Database and Application server
The Dataguard server allows user connections

MICROS-FIDELIO ASIA PACIFIC. PAGE 5 JULY 2007


Opera Hotel Edition -

2.2 2- SERVER SETUP (50 USERS)

In the diagram above, it shows the setup which consists of 3 physical servers.
There are 3 possible scenarios for this setup.

4) Normal Situation
The Database server updates the Dataguard server.
The Dataguard server allows user connections

5) Database Server Failure


The Dataguard server takes over the role of the Database server
The Dataguard Server allows user connections

6) Dataguard Server Failure


The Database Server will allow user connections

MICROS-FIDELIO ASIA PACIFIC. PAGE 6 JULY 2007


Opera Hotel Edition -

2.3 RECOMMENDED HARDWARE

Dataguard server specifications should always be as similar to the Production database


server as possible.
These are the specifications you should take note of
• Hard Disk space
• RAM Sizing
• Processing power
• Operating System
These are important as in case of a failure on your Production servers, the Dataguard
server will be taking over as the database server.
Dataguard is NOT supported on cross-server architecture installations
(E.g. Production on Windows 2003 32-bit, Standby on Windows 2003 64-bit)

3.0 INSTALLATION OF DATAGUARD SERVER

3.1 PRE-REQUISITE CHECKS

Hard Drive Space

Make sure the hard-disk space allocated to Dataguard is similar to production.


This is very important as the Dataguard server will hold a replication of the Production
database and will fail if there is not enough space.

Installation Media

Be sure to use the same version of media kits throughout the installation.

32bit/64bit Windows

Make sure the servers are on the same version of windows. The installation of Dataguard
on cross-server architecture is not supported.

3.2 INSTALLATION OF SINGLE SERVER

Install the Opera 403 Single Server on the D:\ drive of both servers as per the Single
Server Installation document.

MICROS-FIDELIO ASIA PACIFIC. PAGE 7 JULY 2007


Opera Hotel Edition -

3.3 CHANGES ON PRIMARY DATABASE SERVER

These changes are to be made to the PRIMARY database server.


These changes do not require the database to be down.

Open your InitOPERA.ora file located at “D:\ORACLE\admin\opera\pfile”

Add the following lines to the initopera.ora file as shown


#Primary Database Primary role Parameters

db_unique_name=production
log_archive_dest_1 = "location=d:\oracle\admin\opera\archive mandatory
REOPEN=120"
log_archive_dest_2='SERVICE=standby ARCH'
log_archive_dest_state_1=ENABLE
log_archive_dest_state_2=enable
log_archive_format = %%ORACLE_SID%%T_%TS%S%R.ARC
remote_login_passwordfile=exclusive

#Primary Database Standby role Parameters

fal_server=standby
fal_client=production
standby_archive_dest='D:\oracle\admin\opera\archive\standby'
standby_file_management=auto
log_file_name_convert=('d:\oracle\oradata\opera\','d:\oracle\oradata\opera\')
db_file_name_convert=('d:\oracle\oradata\opera\','d:\oracle\oradata\opera\')

MICROS-FIDELIO ASIA PACIFIC. PAGE 8 JULY 2007


Opera Hotel Edition -

Also make sure the “Archive” section of initOPERA.ora is hashed out.

Next Log into the Production database and create an SPFILE from the Init file by issuing
“CREATE SPFILE FROM INITFILE=
’D:\ORACLE\ADMIN\OPERA\PFILE\INITOPERA.ORA’;”

MICROS-FIDELIO ASIA PACIFIC. PAGE 9 JULY 2007


Opera Hotel Edition -

Open “TNSNAMES.ORA” located in “D:\oracle\10gappr2\network\admin” or


“D:\oracle\1020\network\admin”

Create another entry pointing to STANDBY.WORLD as shown below.


This entry should point to your Dataguard server.

MICROS-FIDELIO ASIA PACIFIC. PAGE 10 JULY 2007


Opera Hotel Edition -

Create directories
“D:\ORACLE\admin\opera\archive\standby”

3.4 CHANGES ON DATAGUARD SERVER

These changes are to be made to the DATAGUARD server.

Open your InitOPERA.ora file located at “D:\ORACLE\admin\opera\pfile”

MICROS-FIDELIO ASIA PACIFIC. PAGE 11 JULY 2007


Opera Hotel Edition -

Add the following lines to the initopera.ora file as shown


#Standby Database standby role parameters

db_unique_name=standby
fal_server=production
fal_client=standby
log_file_name_convert=('d:\oracle\oradata\opera\','d:\oracle\oradata\opera\')
db_file_name_convert=('d:\oracle\oradata\opera\','d:\oracle\oradata\opera\')
standby_archive_dest='D:\ORACLE\admin\opera\archive\standby'
standby_file_management=AUTO

# Standby database primary role parameters

log_archive_dest_2='SERVICE=production'
log_archive_dest_state_2=defer
log_archive_dest_1 = "location=D:\oracle\admin\opera\archive mandatory
reopen=120"
log_archive_dest_state_1=ENABLE
log_archive_format = %%ORACLE_SID%%T_%TS%S%R.ARC
remote_login_passwordfile=exclusive

MICROS-FIDELIO ASIA PACIFIC. PAGE 12 JULY 2007


Opera Hotel Edition -

Also make sure the “Archive” section of initOPERA.ora is hashed out.

Next Log into the Dataguard database and create an SPFILE from the Init file by issuing
“CREATE SPFILE FROM INITFILE=
’D:\ORACLE\ADMIN\OPERA\PFILE\INITOPERA.ORA’;”

Open “TNSNAMES.ORA” located in “D:\oracle\10gappr2\network\admin” or


“D:\oracle\1020\network\admin”

MICROS-FIDELIO ASIA PACIFIC. PAGE 13 JULY 2007


Opera Hotel Edition -

Create another entry pointing to PRODUCTION.WORLD as shown below.


This entry should point to your Production server.

Create directories
“D:\ORACLE\admin\opera\archive\standby”

MICROS-FIDELIO ASIA PACIFIC. PAGE 14 JULY 2007


Opera Hotel Edition -

3.5 COPY PRODUCTION DATABASE TO DATAGUARD SERVER

Next would be to copy the production database to the Dataguard server. There are 2 ways
to do this.

Cold Backup (Easiest method)


Offline copy of the Data files/Redo logs. This method requires downtime.

RMAN Backup
This is explained in detail in Section 6 of this document.

3.6 ACTIVATING THE PRODUCTION SERVER

**Please note these steps require the database to have a short downtime**

Start up the Production Database.


Log into SQLPLUS and create the standby redo files using the following commands.

ALTER DATABASE ADD STANDBY LOGFILE


'd:\oracle\oradata\opera\stby_redo1.rdo' SIZE 104857600;
ALTER DATABASE ADD STANDBY LOGFILE
'd:\oracle\oradata\opera\stby_redo2.rdo' SIZE 104857600;
ALTER DATABASE ADD STANDBY LOGFILE
'd:\oracle\oradata\opera\stby_redo3.rdo' SIZE 104857600;
ALTER DATABASE ADD STANDBY LOGFILE
'd:\oracle\oradata\opera\stby_redo4.rdo' SIZE 104857600;
ALTER DATABASE ADD STANDBY LOGFILE
'd:\oracle\oradata\opera\stby_redo5.rdo' SIZE 104857600;
ALTER DATABASE ADD STANDBY LOGFILE
'd:\oracle\oradata\opera\stby_redo6.rdo' SIZE 104857600;
ALTER DATABASE ADD STANDBY LOGFILE
'd:\oracle\oradata\opera\stby_redo7.rdo' SIZE 104857600;
ALTER DATABASE ADD STANDBY LOGFILE
'd:\oracle\oradata\opera\stby_redo8.rdo' SIZE 104857600;
ALTER DATABASE ADD STANDBY LOGFILE
'd:\oracle\oradata\opera\stby_redo9.rdo' SIZE 104857600;
ALTER DATABASE ADD STANDBY LOGFILE
'd:\oracle\oradata\opera\stby_redo10.rdo' SIZE 104857600;
ALTER DATABASE ADD STANDBY LOGFILE
'd:\oracle\oradata\opera\stby_redo11.rdo' SIZE 104857600;

MICROS-FIDELIO ASIA PACIFIC. PAGE 15 JULY 2007


Opera Hotel Edition -

MICROS-FIDELIO ASIA PACIFIC. PAGE 16 JULY 2007


Opera Hotel Edition -

Next, create a standby controlfile to be used by the Dataguard server

Copy this to the standby Server

Now shutdown the database by issuing “SHUTDOWN IMMEDIATE”

Issue “STARTUP MOUNT”

Activate logging on the database by “ALTER DATABASE ARCHIVELOG”

Open the database by issuing “ALTER DATABASE OPEN”

MICROS-FIDELIO ASIA PACIFIC. PAGE 17 JULY 2007


Opera Hotel Edition -

3.7 ACTIVATING THE DATAGUARD SERVER

Start up the STANDBY Database.


Log into SQLPLUS and create the standby redo files using the following commands.

ALTER DATABASE ADD STANDBY LOGFILE


'd:\oracle\oradata\opera\stby_redo1.rdo' SIZE 104857600;
ALTER DATABASE ADD STANDBY LOGFILE
'd:\oracle\oradata\opera\stby_redo2.rdo' SIZE 104857600;
ALTER DATABASE ADD STANDBY LOGFILE
'd:\oracle\oradata\opera\stby_redo3.rdo' SIZE 104857600;
ALTER DATABASE ADD STANDBY LOGFILE
'd:\oracle\oradata\opera\stby_redo4.rdo' SIZE 104857600;
ALTER DATABASE ADD STANDBY LOGFILE
'd:\oracle\oradata\opera\stby_redo5.rdo' SIZE 104857600;
ALTER DATABASE ADD STANDBY LOGFILE
'd:\oracle\oradata\opera\stby_redo6.rdo' SIZE 104857600;
ALTER DATABASE ADD STANDBY LOGFILE
'd:\oracle\oradata\opera\stby_redo7.rdo' SIZE 104857600;
ALTER DATABASE ADD STANDBY LOGFILE
'd:\oracle\oradata\opera\stby_redo8.rdo' SIZE 104857600;
ALTER DATABASE ADD STANDBY LOGFILE
'd:\oracle\oradata\opera\stby_redo9.rdo' SIZE 104857600;
ALTER DATABASE ADD STANDBY LOGFILE
'd:\oracle\oradata\opera\stby_redo10.rdo' SIZE 104857600;
ALTER DATABASE ADD STANDBY LOGFILE
'd:\oracle\oradata\opera\stby_redo11.rdo' SIZE 104857600;

MICROS-FIDELIO ASIA PACIFIC. PAGE 18 JULY 2007


Opera Hotel Edition -

MICROS-FIDELIO ASIA PACIFIC. PAGE 19 JULY 2007


Opera Hotel Edition -

Now shutdown the database by issuing “SHUTDOWN IMMEDIATE”

Issue “STARTUP MOUNT”

Activate logging on the database by “ALTER DATABASE ARCHIVELOG”

Shutdown the database by issuing “SHUTDOWN IMMEDIATE”

Copy the standby controlfile created on the production server

MICROS-FIDELIO ASIA PACIFIC. PAGE 20 JULY 2007


Opera Hotel Edition -

Startup the Dataguard database by issuing “STARTUP NOMOUNT” and “ALTER


MOUNT STANDBY DATABASE;”

Start the Standby database by issuing “Alter database recover managed standby database
using current logfile disconnect from session;”

4.0 VERIFYING DATAGUARD

To check if Dataguard is working correctly, this must always be done after an install.

Log into the PRODUCTION server and issue “ALTER SYSTEM SWITCH LOGFILE”

MICROS-FIDELIO ASIA PACIFIC. PAGE 21 JULY 2007


Opera Hotel Edition -

Log into the Standby server and issue “SELECT SEQUENCE#,APPLIED FROM
V$ARCHIVED_LOG;”

If the logs are applied successfully, this means your Dataguard server is working
correctly.

5.0 DATAGUARD OPERATIONS

Included with this documentation are some scripts which should be copied to the D:
This should include the folders
• Standby Switchover
• Standby Failover
The Difference between a Switchover and a Failover is that after a Failover, the Standby
Database becoming a Primary now, cannot switchback to become a Standby Database
again.
In Opposition a Switchover exchanges the Database Roles (The Primary becomes a
Standby and the Standby becomes a Primary). Switchovers can be performed arbitrarily,
a Failover only once.
We will go into detail on what these scripts do.

MICROS-FIDELIO ASIA PACIFIC. PAGE 22 JULY 2007


Opera Hotel Edition -

5.1 STANDBY SWITCHOVER

A switchover is a role reversal between the primary database and one of its standby
databases. Switchover operation guarantees no data loss. This is typically done for
planned maintenance of the primary system. During a switchover, the primary database
transitions to a standby role and the standby database transitions to the primary role. The
transition occurs without having to recreate either database.

On the PRIMARY server:


Navigate to D:\scripts\Standby Switchover\Primary

This will contain the file Primary_to_standby.bat. Double click on this file to run.

Primary_to_standby.bat
sqlplus "sys/opera10g as sysdba" @Primary_to_standby.sql

Primary_to_standby.sql

spool primary_to_standby.log
alter database commit to switchover to standby with session shutdown;
shutdown immediate;
startup nomount;
alter database mount standby database;
recover managed standby database disconnect from session;
alter system set log_archive_dest_state_2=defer;
spool off

What this script does is that it will actually close the database and start it up as a standby
database.

MICROS-FIDELIO ASIA PACIFIC. PAGE 23 JULY 2007


Opera Hotel Edition -

To verify that the command completed successfully, you can either


• view the Primary_to_standby.log
OR
• Query the database with “SELECT CONTROLFILE_TYPE,OPEN_MODE
FROM V$DATABASE;” This command should state that your Controlfile_type
is “STANDBY” and the database should be “MOUNTED”

On the STANDBY server:

Navigate to D:\scripts\Standby Switchover\Primary

This will contain the file Standby_to_primary.bat. Double click on this file to run.

MICROS-FIDELIO ASIA PACIFIC. PAGE 24 JULY 2007


Opera Hotel Edition -

Standby_to_primary.bat
sqlplus "sys/opera10g as sysdba" @standby_to_primary.sql

Standby_to_Primary.sql

spool standby_to_primary.log
alter database commit to switchover to primary with session shutdown;
shutdown immediate;
startup;
alter system set log_archive_dest_state_2=enable scope=both;
spool off

What this script does is that it will actually close the database and start it up as an open
database (Production).
To verify that the command completed successfully, you can either
• view the Primary_to_standby.log
OR
• Query the database with “SELECT CONTROLFILE_TYPE,OPEN_MODE
FROM V$DATABASE;” This command should state that your Controlfile_type
is “OPEN” and the database should be “READ WRITE”

Verify that Switchover process is complete:


To verify that the switchover has completed successfully, follow steps stated in section 4
of this document.

MICROS-FIDELIO ASIA PACIFIC. PAGE 25 JULY 2007


Opera Hotel Edition -

5.2 STANDBY FAILOVER

Oracle DataGuard is a Disaster Recovery (DR) Solution for Oracle Databases. The basic
idea behind DataGuard is a Standby Database performing all changes from a Primary
Database on itself, too. So the Standby Database should be a constantly updated copy of a
Primary Database.
In case of a loss of the Primary Database, the Standby can take over the Primary Role and
act as a Primary Database. A Failover can be performed when all or most of the
information until the Unavailability of the Primary Database was propagated to the
Standby.
This should be run only from the standby server and only if the primary database is
unavailable or the primary database recovery takes a longer time.
CAUTION
DO NOT RUN THIS OPTION WITHOUT A ORACLE DBA GUIDANCE
This should be run only from the standby server and only if the primary database is unavailable or
the primary database recovery takes a longer time.

Once the old primary is available, move the database to primary and recreate the standby database.
This has to be done by an oracle DBA.

On the STANDBY server:


Navigate to D:\scripts\Standby Failover

This will contain the file Failover.bat. Double click on this file to run.

MICROS-FIDELIO ASIA PACIFIC. PAGE 26 JULY 2007


Opera Hotel Edition -

Failover.bat
sqlplus "sys/opera10g as sysdba" @failover.sql
Failover.sql
spool failover.log
alter database recover managed standby database cancel;
alter database activate standby database;
shutdown immediate;
startup;
alter system set log_archive_dest_state_2=defer;
spool off

What this script does is to finish the recovery process of the Dataguard server and Open
the database for access (Production).

To verify that the command completed successfully, you can either


• view the Failover.log
OR
• Query the database with “SELECT CONTROLFILE_TYPE,OPEN_MODE
FROM V$DATABASE;” This command should state that your Controlfile_type
is “OPEN” and the database should be “READ WRITE”

MICROS-FIDELIO ASIA PACIFIC. PAGE 27 JULY 2007


Opera Hotel Edition -

6.0 REBUILDING THE STANDBY SERVER

*Please refer to Appendix A if you are running a Single Server.


Rebuilding the failed Primary to be a standby

This is achieved by backing up the current primary and restoring it to the failed primary
as standby database. Once it is recovered as standby and log shipped started, you may
switch the roles using the switchover scripts

Step 1. Backup the current Primary database

a. Connect to target database at the current primary database server


(c:\> rman target sys/opera10g)

b. Check the default location of the backup. This can be altered by


(RMAN> show all;)
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT
'D:\backup\%U'; (This will set the default location as d:\backup, make sure the
folder exists.)

c. Backup the database

MICROS-FIDELIO ASIA PACIFIC. PAGE 28 JULY 2007


Opera Hotel Edition -

(RMAN> backup database;)

d. Backup the standby control file and switch the log file
(RMAN> backup current controlfile for standby;
RMAN> Sql “alter system archive log current”;)

e. Backup the archive files


(RMAN> backup filesperset 10 archivelog all;)

MICROS-FIDELIO ASIA PACIFIC. PAGE 29 JULY 2007


Opera Hotel Edition -

Step 2. Copy the backup files to the failed primary under same folder

Step 3. Prepare for restore


a. Shutdown the database if it is running

MICROS-FIDELIO ASIA PACIFIC. PAGE 30 JULY 2007


Opera Hotel Edition -

b. Delete all the datafiles,redo logs, standby redo logs, control files from
D:\oracle\opera\oradata folder

c. Mount the database

Step 4. Restore and recover standby database

a. Connect to target DB and auxiliary database (failed primary) (Run this from
current primary)

rman target sys/opera10g auxiliary sys/opera10g@production

b. Restore and recover datafiles


(RMAN> duplicate target database for standby dorecover nofilenamecheck;)

MICROS-FIDELIO ASIA PACIFIC. PAGE 31 JULY 2007


Opera Hotel Edition -

Step 5. Once restore and recovery is over start the standby database on the failed
primary using the start_standby.bat under the scripts folder

Step 6. Make sure the log shipping is working fine

a. From current primary run “ archive log list;” to find the next archive log

b. Run “alter system switch logfile;” to switch log file

MICROS-FIDELIO ASIA PACIFIC. PAGE 32 JULY 2007


Opera Hotel Edition -

c. On Standby, Make sure the logfile is received and applied on the standby b
running “select sequence#,applied from v$archived_log order by sequence#;”

Step 7. Once log shipping and applying are functional, you may switch the roles
using the switchover procedure explained above. Please note users will be
disconnected during the switchover.

7.0 SCHEDULED TASKS

You will be required to set up 2 Scheduled tasks for the DATAGUARD server.
They are
• START_STANDBY
• DAILY_REPORT
Both these batch files are included in the Script folder which should be in D:\
6.1 START_STANDBY

This batch file will be run at each server start up to allow the standby database to start
correctly.

MICROS-FIDELIO ASIA PACIFIC. PAGE 33 JULY 2007


Opera Hotel Edition -

START_STANDBY.BAT

SET ORACLE_SID=OPERA
SQLPLUS "SYS/opera10g AS SYSDBA" @D:\SCRIPTS\START_STANDBY.SQL
SQLPLUS "SYS/opera10g@production AS SYSDBA"
@D:\SCRIPTS\refresh_archivedest.SQL

START_STANDBY.SQL

SHUTDOWN IMMEDIATE;
STARTUP NOMOUNT;
ALTER DATABASE MOUNT STANDBY DATABASE;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE using current logfile
DISCONNECT FROM SESSION;
EXIT

Open Scheduled Tasks which is in your Control Panel and double click on Add
Scheduled Task

Click on Next

MICROS-FIDELIO ASIA PACIFIC. PAGE 34 JULY 2007


Opera Hotel Edition -

Select Browse

MICROS-FIDELIO ASIA PACIFIC. PAGE 35 JULY 2007


Opera Hotel Edition -

Select D:\Scripts\START_STANDBY.BAT and click on OPEN

Select for this task to be performed, “When my computer starts”

MICROS-FIDELIO ASIA PACIFIC. PAGE 36 JULY 2007


Opera Hotel Edition -

Key in a username and password with rights to the machine.

Click on Finish to complete the setup of this job.

Restart the standby server and make sure that Dataguard is up and running by issuing
“SELECT CONTROLFILE_TYPE,OPEN_MODE FROM V$DATABASE;”
This command should state that your Controlfile_type is “STANDBY” and the
database should be “MOUNTED”

MICROS-FIDELIO ASIA PACIFIC. PAGE 37 JULY 2007


Opera Hotel Edition -

6.2 DAILY_REPORT

This batch file will be used to generate and send out a report daily to the IT staff of the
property on the status of the dataguard server.
Open Scheduled Tasks which is in your Control Panel and double click on Add
Scheduled Task

Click on Next

MICROS-FIDELIO ASIA PACIFIC. PAGE 38 JULY 2007


Opera Hotel Edition -

Select Browse

Select D:\scripts\DAILY_REPORT.bat and click on OPEN

MICROS-FIDELIO ASIA PACIFIC. PAGE 39 JULY 2007


Opera Hotel Edition -

Select this job to be run daily and click on next

MICROS-FIDELIO ASIA PACIFIC. PAGE 40 JULY 2007


Opera Hotel Edition -

Set the Start time to 4:00AM and click on Next

Click on Finish to complete the setup

MICROS-FIDELIO ASIA PACIFIC. PAGE 41 JULY 2007


Opera Hotel Edition -

Now navigate to D:\scripts\send_report.bat and edit it with wordpad

You will have to replace a few entries


PROPERTYNAME Short property name
[email protected] Mail address to send report to (comma separated)
Mailserver SMTP Server of the property
[email protected] The sender of the mail

After this has been set-up, run D:\scripts\DAILY_REPORT.bat and the mail should be
sent out to the mail addresses set up. This report can also be found in D:\scripts\report.txt

MICROS-FIDELIO ASIA PACIFIC. PAGE 42 JULY 2007


Opera Hotel Edition -

Reading the Daily Report:

Deleting Applied Archive files


------------------------------

deleting OPERAT_001S004680609523929.ARC
deleting OPERAT_001S004690609523929.ARC
deleting OPERAT_001S004700609523929.ARC

4 rows selected.
(This deletes the archive logs which are no longer needed.)

Archive Gaps
-------------
Archive Gap as on 04/06/07 04:00 is 0
(This should be 0, If not, your databases are out of sync)

Process on Standby Server


--------------------------
ARCH CONNECTED
ARCH CONNECTED
MRP0 WAIT_FOR_LOG
RFS RECEIVING
(make sure MRP is running, if not please run d:\scripts\start_standby.bat)

Logs Not Applied


----------------

0
(This should be 0, If not there is a problem apply the logs to the standby server.)

Disk space on G Drive


Volume in drive D has no label.
Volume Serial Number is 9C4B-B234

Directory of D:\

31/05/2007 09:14 AM <DIR> Install Media


30/05/2007 03:18 PM <DIR> micros
25/05/2007 12:54 PM <DIR> MicrosSupportTemp
30/05/2007 03:35 PM <DIR> oracle
04/06/2007 04:00 AM <DIR> scripts
30/05/2007 06:00 PM <DIR> standby_flashback
28/09/2001 06:00 PM 164,864 UNWISE.EXE

MICROS-FIDELIO ASIA PACIFIC. PAGE 43 JULY 2007


Opera Hotel Edition -

1 File(s) 164,864 bytes


6 Dir(s) 95,522,238,464 bytes free
(Make sure there is enough space available for archive shipping)

FINDATA 356
FININDX 28
LOGDATA 12
LOGINDX 88
NAMEDATA 376
NAMEINDX 132
OPERA_DATA 147
OPERA_INDX 97
OXI_DATA 361
OXI_INDX 494
QUICKDATA 463
QUICKINDX 453
RATEDATA 414
RATEINDX 390
RESVDATA 380
RESVINDX 296
SYSAUX 6
SYSTEM 10
TOOLS 0
UNDOTBS1 582

20 rows selected.
(Free space on Production DB, Just for information Only)

Instances and No of Opera Users


-------------------------------

1 2
(No. Of Opera users on Production database Just for information only)

8.0 APPLICATION CHANGES

As for application changes, when a failover occurs, we will have to rerun


OAPPCFGED.exe which is located in D:\micros\opera\tools and point it to the standby
server.

This will effectively update all entries and config files to point to the standby server.

MICROS-FIDELIO ASIA PACIFIC. PAGE 44 JULY 2007


Opera Hotel Edition -

9.0 APPENDIX A

Additional steps required if target database is installed with Opera Single Server

As you can see below, the datafile attached to SYS_READ tablespace has a different
resetlogs_time compared to other datafiles, you may get errors while backing up the
database using RMAN.

Workaround in this case is make the tablespace read write (this will set the resetlogs_time
same as others) before backup and set it back to read only after standby sever is up.

MICROS-FIDELIO ASIA PACIFIC. PAGE 45 JULY 2007

You might also like