Purpose
Promotes the Standby Sequencer to the Active state if Unity is inactive and configured for manual failover.
Syntax
SEQUENCER TAKEOVER [BY FORCE];Parameters
- BY FORCE
- This option forces a Standby Sequencer to become active if sequencers were in Not in Peer when the Active Sequencer went down, or if the repositories were not fully synchronized.
Usage Considerations
- This command is only valid if the Sequencers are in Peer state when the Active Sequencer went down. In this case, the Standby mode is Standby - Synchronized when the SEQUENCER TAKEOVER command is issued.
- The Unity repository local to the Standby Sequencer must be accessible and fully synchronized for the SEQUENCER TAKEOVER command to succeed. The SEQUENCER TAKEOVER command fails if the local repository is not fully synchronized.
- If the SEQUENCER TAKEOVER command fails due to failure of the repository to synchronize, verify that the remote repository is UP . Otherwise, use the BY FORCE option.
Using the BY FORCE parameter is not recommended unless no other option is available. If you specify and execute SEQUENCER TAKEOVER BY FORCE, the other repository in the cluster becomes invalid. You must synchronize Unity repositories before starting the DOWN Sequencer. This option enables placing an unsynchronized Sequencer into Standby state.
Repositories that are unsynced from the use of the BY FORCE parameter are automatically synced by Unity. You can run the following script as needed. The repositorySync.sh script synchronizes Unity repositories. It is located in the following directory:
/opt/teradata/unity/repository
When run, repositorySync.sh collects information for the Repository to backup and restore to. This information includes:
- The TDPID of the source/destination repository.
- The user and password to use for the backup and restore process. This user must have privileges to perform the operation. The recommendation is "dbc" for username and password.
- The user and password to use for modifying the repository tables. This is typically the unity user.
- The name of the unity repository database. This is generally the same as the unity user.
unityadmin> /etc/init.d/unity start sequencer./repositorySync.sh Teradata Unity Repository Sync Script Copyright (C) 2005-2015 by Teradata Corporation All Rights Reserved ======================= IMPORTANT =========================== This scripts performs a backup and restore of the unity repositories For this script to run properly and successfully, you must: Ideally, ensure that the sequencers are not running. If the sequencers must be running, ensure that the active sequencer's repository is set as the active repository when providing input to this script If there is a running active sequencer in the cluster, ensure that repository sync has been paused. You can do this from unityadmin by running: unityadmin> repository sync pause; Once the script is finished, resume sync by running: unityadmin> repository sync resume; NOTE: In all cases, the standby sequencer, if any, must be down Press enter key to continue: Please provide source repository information to backup from... Please provide the source tdpid [bltor]: bltor Please enter the port for bltor [1025]: 1025 Please enter the username to backup from tdpid bltor This user must have access to the necessary backup functions, etc. dbc is the recommendation for this operation [dbc]: dbc Please provide the password for dbc: Please provide unity repository db name on bltor [unityrepository]: unityrepository Please provide the username that can update tables in unityrepository [unityrepository]: unityrepository Please provide the password for unityrepository: Connecting to bltor on 1025 as dbc... Connection succeeded Connecting to bltor on 1025 as unityrepository... Connection succeeded, checking for repository table... Repository check succeeded! Please provide the destination tdpid [fast]: fast Please enter the port for fast [1025]: 1025 Please enter the username to restore to tdpid fast This user must have access to the necessary restore functions, etc. dbc is the recommendation for this operation [dbc]: dbc Please provide the password for dbc: Please provide unity repository db name on fast [unityrepository]: unityrepository Please provide the username that can update tables in unityrepository [unityrepository]: unityrepository Please provide the password for unityrepository: unityrepository Connecting to fast on 1025 as dbc... Connection succeeded Connecting to fast on 1025 as unityrepository... Connection succeeded ======================================== Please confirm the following information ======================================== Repository to backup from: Tdpid : bltor Port : 1025 Backup user : dbc Database update user : unityrepository Repository database : unityrepository Repository to restore to: Tdpid : fast Port : 1025 Restore user : dbc Database restore user : unityrepository Repository database : unityrepository Type 'yes' to continue, 'no' to re-enter values, 'flip' to switch the source and destination repositories or 'quit' to quit Is this above information correct [yes]: yes This script will now run the backup/restore operations as well as setting various values in the repository tables Cleaning up existing sync data Creating directory /opt/teradata/unity/bin/23859 for all backup/restore operations This directory will be deleted if the script completes successfully =============== STARTING BACKUP ==================== Backing up repository at bltor,dbc into /opt/teradata/unity/bin/23859 directory Backup finished successfully =============== STARTING RESTORE ==================== Starting restore to fast,dbc db unityrepository Restore finished successfully Removing directory /opt/teradata/unity/bin/23859 =============== FINALIZING DATABASES =================== Finalizing source database Finalizing destination database Script finished successfully - Repositories are now in sync
Examples
- Active Sequencer is DOWN
- Standby Sequencer is STANDBY (SYNCHRONIZED)
unityadmin> SEQUENCER STATUS;
unityadmin>
HA Status : Down/Unknown
Log Replication Mode : Asynchronous
Failover Mode : Manual
Individual Sequencer States
---------------------------
unknown host/port : DOWN
unity2:5344 : STANDBY (SYNCHRONIZED)
Sequencer State Counts
----------------------
Standby (Synchronized) Count : 1
Down Count : 1
---------------------------------------------
Process Identifier : rb_seq
Process Type : Sequencer
Region Name : rb
Current Status : Down
---------------------------------------------
Process Identifier : to_seq
Process Type : Sequencer
Region Name : to
Current Status : Up - Processing this Unityadmin connection
---------------------------------------------
Process Identifier : to_wdg
Process Type : Watchdog
Region Name : to
Current Status : Up
---------------------------------------------
Process Identifier : rb_wdg
Process Type : Watchdog
Region Name : rb
Current Status : Up
Run SEQUENCER TAKEOVER. Live operation updates display when running unityadmin in synchronous mode.
unityadmin> SEQUENCER TAKEOVER;
Operation Number : 1
Operation Name : Sequencer Takeover
User : admin
User Name : Main Administration User
Start Time : 01/17 15:44:17
Updates:
01/17 15:44:17 [-] Info: Sending takeover request
01/17 15:44:19 [-] Info: Sequencer HA takeover request succeeded
01/17 15:44:19 [-] Info: Operation finished
Status : Finished (1)
Finish Time : 01/17 15:44:19
If not running unityadmin in synchronous mode, unityadmin provides an operation number.
unityadmin> SEQUENCER TAKEOVER;
The request is currently processing as operation number 1.
You may check its status using the command 'operation check 1'.
If not running in synch mode, you can run OPERATION CHECK with the provided operation number to view details.
unityadmin> OPERATION CHECK 1;
Operation Number : 1
Operation Name : Sequencer Takeover
User : admin
User Name : Main Administration User
Progress (%) : 100
Status : Finished (1)
Start Time : 01/17 15:45:46
Finish Time : 01/17 15:45:47
Updates:
01/17 15:45:46 [-] Info: Sending takeover request
01/17 15:45:47 [-] Info: Sequencer HA takeover request succeeded
01/17 15:45:47 [-] Info: Operation finished
Once the operation completes, you can run SEQUENCER STATUS to verify that the Standby Sequencer is in Active state.
unityadmin> SEQUENCER STATUS;
HA Status : Not In Peer (Cannot failover)
Log Replication Mode : Asynchronous
Failover Mode : Manual
Individual Sequencer States
---------------------------
unknown host/port : DOWN
unity2:5344 : ACTIVE
Sequencer State Counts
----------------------
Active Count : 1
Down Count : 1
---------------------------------------------
Process Identifier : rb_seq
Process Type : Sequencer
Region Name : rb
Current Status : Down
---------------------------------------------
Process Identifier : to_seq
Process Type : Sequencer
Region Name : to
Current Status : Up - Processing this Unityadmin connection
---------------------------------------------
Process Identifier : to_wdg
Process Type : Watchdog
Region Name : to
Current Status : Up
---------------------------------------------
Process Identifier : rb_wdg
Process Type : Watchdog
Region Name : rb
Current Status : Up