How To Open Standby Database When Primary Database Is Lost

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarANKUSH THAVALI
  • 27 Sep, 2023
  • 0 Comments
  • 1 Min Read

How To Open Standby Database When Primary Database Is Lost

How To Open Standby Database When Primary Database Is Lost.

If your primary database is not accessible or crashed for any issue, then we can use the standby database.

Follow the Below  steps for opening standby database when the primary database is lost:

1. start the standby database in mount stage.
shut immediate;
startup mount;

2. Check the protection_mode and database_role.

SQL> SELECT OPEN_MODE,PROTECTION_MODE,DATABASE_ROLE FROM V$DATABASE;
OPEN_MODE PROTECTION_MODE DATABASE_ROLE
---------- -------------------- ----------------
MOUNTED MAXIMUM PERFORMANCE PHYSICAL STANDBY

PLEASE NOTE: If protection_mode is other than maximum performance, then alter it as below.

SQL> ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE;

  1. Recover standby database:
SQL> RECOVER STANDBY DATABASE;
Make sure all archives has been applied in this process.
  1. Finish the recovery process:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;

Database altered
  1. Activate the standby database:

SQL> ALTER DATABASE ACTIVATE PHYSICAL STANDBY DATABASE;

Database altered.
  1. Check the status:


SQL> SELECT OPEN_MODE,PROTECTION_MODE,DATABASE_ROLE FROM V$DATABASE;
OPEN_MODE PROTECTION_MODE DATABASE_ROLE
---------- -------------------- ----------------
MOUNTED MAXIMUM PERFORMANCE PRIMARY

  1. Open the database:
 
SQL> ALTER DATABASE OPEN;
Now application can start using this database.

Hope it Helps!