How do I perform a main database switchover using a CLI script?

Purpose

Perform this procedure to use a CLI script to switch the primary and standby database roles. Before you perform the procedure, ensure that you understand the following implications of a switchover.

  • The primary and standby database roles are reversed.

  • The primary main server connects to the new primary database.

  • Archive logging begins on the new primary database.

  • The primary main server directs each auxiliary server to connect to the new primary database.

CAUTION 

CAUTION

Service Disruption

The execution of a database switchover depends on how the database switchover behavior is configured.

It is recommended that you review How do I configure main database switchover behavior? before you attempt to perform this procedure to verify the current database switchover configuration.

Steps
 

Log in to the primary main server station as the nsp user.


Open a console window.


Enter the following at the CLI prompt:

bash$ /opt/nsp/nfmp/server/nms/bin/switchoverdb.bash -u username -p password

where username and password are the login credentials of an NFM-P user with the required privilege level and scope of command

The script displays the following confirmation message:

The standby database will become the new primary database, and the old primary will become the new standby. Do you want to proceed? (YES/no) :


Enter the following to initiate the switchover:

YES ↵

The NFM-P server initiates a database switchover. Progress is indicated by a rolling display of dots in the console window. The database switchover is complete when the CLI prompt reappears.


Close the console window when the database switchover is complete.

End of steps