|
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. |
|