If primary stack failed or does not respond.
We can force a secondary stack member to become primary in some situations and this can be achieved only if both the Primary and Secondary are configured with same stack-priority.
Database Synchronization needs to executed before switching over as the database needs to shared between two stacks.
(Switch2500) #system switchover force
Executing this command may cause disruption of traffic while mastership is
switched over. Do you want to continue [y/n]: y
(Switch2500) #show system switchover
Secondary Switchover status
System-state : synchronized to primary
Configuration : synchronized to primary
Database : synchronized to primary