How to open Standby DB when Primary is lost

Case: The primary is lost, we need to open the standby database.

sqlplus / as sysdba

STARTUP MOUNT

-- Check the status of DB

SELECT DB_UNIQUE_NAME, OPEN_MODE, PROTECTION_MODE, DATABASE_ROLE FROM V$DATABASE;

RECOVER STANDBY DATABASE;

==> CANCEL

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;

ALTER DATABASE ACTIVATE PHYSICAL STANDBY DATABASE;

ALTER DATABASE OPEN;

-- Check the status of DB

SELECT DB_UNIQUE_NAME, OPEN_MODE, PROTECTION_MODE, DATABASE_ROLE FROM V$DATABASE;