Oracle Training Oracle Support
Oracle Training
SQL Tuning Consulting
Oracle Tuning Consulting
Data Warehouse Consulting
Oracle Project Management
Oracle Security Assessment
Unix Consulting
Burleson Books
Burleson Articles
Burleson Web Courses
Burleson Qualifications
Oracle Internals Magazine
Oracle Links
Oracle Monitoring
Remote Support Benefits
Remote Plans & Prices
Our Automation Strategy
What We Monitor
Oracle Apps Support
Print Our Brochure
Contact Us (e-mail)
Oracle Job Opportunities
Oracle Consulting Prices
 

Free Oracle Tips


 
HTML Text AOL
 
 

How to Switch Roles in Oracle Real Application Clusters Guard

September 18,  2003
Don Burleson

 

When restoring from a failover, after resilience has been restored using the restore command, the primary role and the secondary role are inverted. If you want to restore the roles to their original nodes, then use the switchover command. The switchover command is equivalent to issuing the move_primary command and then the restore command.

As with the move_primary command, if a number of seconds is specified in the switchover command, then the number of seconds is applied to the shutdown transactional statement that is part of moving the primary role. For example:

PFSCTL> switchover 20

A default value of 30 seconds is used if no interval is specified.

The following example shows what happens when the switchover command is used. Invoke pfsctl:

# pfsctl

The output shows that the value of oracle_service is set to AULT:

PFSCTL for aultsun1: Version 9.2.0.1.0 - Production on Mar 24 200318:15:10
(c) Copyright 2001 , 2002 Oracle Corporation. All rights reserved.
Welcome to PFSCTL. Type HELP for additional information.

ORACLE_SERVICE is set to AULT
DB_NAME is set to AULT

The status command would then be used to see the location for the primary and secondary roles:

PFSCTL> status

The output will be similar to the following:

aultsun1
Info: Pack PFS_AULT_aultsun1 started.
aultsun2
Info: Pack PFS_AULT_aultsun2 started.
Info: Local database instance is up.
Info: Remote database instance is up.
Info: Running primary role locally.
Info: Running secondary role on remote node.
Info: Cluster is up.
Info: Local node part of the cluster.
Info: Remote node part of the cluster.
Info: No internal process is running locally.
Info: No internal process is running remotely.
status command succeeded.

This output shows that the local host, aultsun1, has the primary role and the remote host, aultsun2, has the secondary role.

Next, enter the switchover command:

PFSCTL> switchover

If the configuration is correct and operational, the output is similar to the following:

switchover command succeeded.

Now, when the status command is issued:

PFSCTL> status

The output will be similar to the following:

aultsun1
Info: Pack PFS_AULT_aultsun1 started.
aultsun2
Info: Pack PFS_AULT_aultsun2 started.
Info: Local database instance is up.
Info: Remote database instance is up.
Info: Running secondary role locally.
Info: Running primary role on remote node.
Info: Cluster is up.
Info: Local node part of the cluster.
Info: Remote node part of the cluster.
Info: No internal process is running locally.
Info: No internal process is running remotely.
status command succeeded.

It shows that aultsun1 has the secondary role and aultsun2 has the primary role. The switchover was successful.

If you like Oracle tuning, check out my latest book
"Oracle Tuning: The Definitive Reference". 

It's 980 pages of hard-core tuning insights, tips and scripts, and you can buy it direct from the publisher for 30%-off. 

 

 
 

 

 

Burleson Consulting
One Burleson Plaza - First Floor - RN3
 2729 Rocky Ford Road • Kittrell, NC, 27544

Email: • Phone (252) 431-0049

Copyright © 1996, 1997, 1998, 1999, 2000, 2001, 2002 by Burleson Enterprises, Inc. All rights reserved.