Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

What is the Failover ? and how will you handled that ?

Answer:
In short, the failover is the deformation of the production (primary) database and activating standby database as the primary. It is not reversible. When enabled, re-create the standby database. What to do in case of failover:

(Important note: Nijam is the primary server and Benz is the standby server)

1. [Nijam] If the primary database is accessible and running, then it must provided  to send redo buffer to the standby database.
SQL> alter system flush redo to standby_db_name;
SQL>alter system archive log current;

If you don’t receive an error, you can continue with step 5th. In this case, the system can be opened by zero data loss. If you receive an error, We continue with step 2 to open the system at least data loss.

2. [Benz] We must run the following query to learn last applied archive log sequence number.
sql> select unique thread# as thread, max(sequence#) over (partition by thread#) as last from v$archived_log;
3. [Nijam’dan Benz’ye] If you can access archive logs which are not copied to standby then copy archives to standby. After copy archive log files we must register them to standby database. This operation must be done for every thread.
SQL> alter database register physical logfile '/oracle/ora11g/dbs/arch/ TALIP_991834413_1_102.arc ';

4. [Benz] Check the standby database for redo gap. If there is a gap then we must copy archive log files and register.
sql> select thread#, low_sequence#, high_sequence# from v$archive_gap;
sql> alter database register physical logfile '/oracle/ora11g/dbs/arch/ talip_991834413_1_101.arc ';
As a result of the above query until it returns to zero.

5. [Benz] Stop the redo apply process in standby database.
sql> alter database recover managed standby database cancel;

6. [Benz] Finish to apply archive logs copied from primary.
sql> alter database recover managed standby database finish;

If you get an error, it means there are redo logs not applied. Consider 2th and 4th steps. You can also continue with following command;
sql> alter database activate physical standby database;
In this situation you can open database in 8th step.  If you get no error, continuw with

7. [Benz] Switch standby database to primary database.
sql> alter database commit to switchover to primary with session shutdown;

8. [Benz] Open database.
sql> alter database open;

After opening standby database as primary with failover you must take full backup.
Failover ile Standby veritabanı primary olarak açıldığında mutlaka full yedek alınmalıdır. And as soon as possible  you must configure a new standby database. Please note that our data are very valuable for us

Comments

Popular posts from this blog

How to find the server is whether standby (slave) or primary(master) in Postgresql replication ?

7 Steps to configure BDR replication in postgresql

How to Get Table Size, Database Size, Indexes Size, schema Size, Tablespace Size, column Size in PostgreSQL Database

Ora2PG - Oracle/MySQL to Postgres DB migration Version 20.0

PostgreSQL Introduction