Wednesday, 1 October 2014

Active Dataguard Nasıl Yapılır

İlk olarak primary veritabanı kontrol edilir.

  SQL> select status,instance_name,database_role from v$instance,v$database;
  STATUS       INSTANCE_NAME    DATABASE_ROLE
  ------------ ---------------- ----------------
  OPEN         prim             PRIMARY

  SQL> select max(sequence#) from v$archived_log;
  MAX(SEQUENCE#)
  --------------
  40

Sonrasında physical standby veritabanı kontrol edilir.

  SQL> select status,instance_name,database_role from v$database,v$instance;
  STATUS   INSTANCE_NAME DATABASE_ROLE
  -------- ------------- ---------------------
  MOUNTED  stnd          PHYSICAL STANDBY
 

SQL> select max(sequence#) from v$archived_log where applied='YES';
  MAX(SEQUENCE#)
  --------------
  40

physical standby veritabanında MRP process'i kontrol edilir.

  SQL> select process,status,sequence# from v$managed_standby;
  PROCESS   STATUS        SEQUENCE#
  --------- ------------ ----------
  ARCH      CONNECTED     0
  ARCH      CONNECTED     0
  ARCH      CONNECTED     0
  ARCH      CONNECTED     0
  RFS       IDLE          41
  RFS       IDLE          0
  RFS       IDLE          0
  RFS       IDLE          0
  MRP0      WAIT_FOR_LOG  41
  9 rows selected.

MRP process'i durdurulur, database açılır ve MRP process'i yeniden başlatılır.

  SQL> alter database recover managed standby database cancel;
  Database altered.

  SQL> alter database open;
  Database altered.

 SQL> select status,instance_name,database_role,open_mode from v$database,v$instance;
  STATUS INSTANCE_NAME  DATABASE_ROLE    OPEN_MODE
  ------ -------------- ---------------- ---------------
  OPEN   stnd           PHYSICAL STANDBY READ ONLY

 SQL> alter database recover managed standby database disconnect from session;
  Database altered.

Pyshical standby veritanında MRP process'i kontrol edilir.

  SQL> select process,status,sequence# from v$managed_standby;
  PROCESS   STATUS        SEQUENCE#
  --------- ------------ ----------
  ARCH      CONNECTED     0
  ARCH      CONNECTED     0
  ARCH      CONNECTED     0
  ARCH      CONNECTED     0
  RFS       IDLE          41
  RFS       IDLE          0
  RFS       IDLE          0
  RFS       IDLE          0
  MRP0      WAIT_FOR_LOG  41
  9 rows selected.

No comments:

Post a Comment