Inicio > Oracle > PROCEDIMIENTO PARA LEVANTAR DATAGUARD EN CASO DE CAIDAS

PROCEDIMIENTO PARA LEVANTAR DATAGUARD EN CASO DE CAIDAS

Domingo, 2 de agosto de 2009 Dejar un comentario Ir a comentarios

Me paso que tuvé que dejar disponible un dataguard que se había reiniciado, y bueno googleando y buscando por metalink pille algunas cosillas interesantes y aca dejo un procedimiento para poder dejar disponible un datagurd, en la practica no es complicado, sólo que hay que tener claro como se debe subir para que quede aplicando las secuencias de la BD primaria.-

 

 

1.- Verificar AlertLog de ambas instancias
2.- Levantar en modo “mount” el ASM [STANDBY]

 

 

 

bash-3.00$ echo $ORACLE_SID

+ASM

bash-3.00$ sqlplus “/as sysdba”

 

SQL*Plus: Release 10.2.0.3.0 – Production on Dom Jul 19 10:48:03 2009

 

Copyright (c) 1982, 2006, Oracle. All Rights Reserved.

 

Connected to an idle instance.

 

SQL> startup mount

ASM instance started

 

Total System Global Area 130023424 bytes

Fixed Size 2071104 bytes

Variable Size 102786496 bytes

ASM Cache 25165824 bytes

ASM diskgroups mounted

SQL> exit

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 – 64bit Production

With the Partitioning, OLAP and Data Mining options

bash-3.00$ echo $ORACLE_SID

+ASM

 

3.- Levantar en modo “nomount” la instancia PROD [STANDBY]

 

bash-3.00$ export ORACLE_SID=PROD

bash-3.00$ echo $ORACLE_SID

PROD

bash-3.00$ sqlplus “/as sysdba”

 

SQL*Plus: Release 10.2.0.3.0 – Production on Dom Jul 19 10:50:26 2009

 

Copyright (c) 1982, 2006, Oracle. All Rights Reserved.

 

Connected to an idle instance.

 

SQL> startup nomount

ORACLE instance started.

 

Total System Global Area 1,5032E+10 bytes

Fixed Size 2098928 bytes

Variable Size 939526416 bytes

Database Buffers 1,3942E+10 bytes

Redo Buffers 148893696 bytes

 

4.- Cambiar a modo “mount standby” la instancia PROD [STANDBY]

 

SQL> alter database mount standby database;

 

Database altered.

 


5.- Activar el proceso de recuperación y replicación de archivelogs [STANDBY]

 

SQL> alter database recover managed standby database disconnect from session;

 

Database altered.

 

6.- Verificar si los procesos MRP0 y RFS se encuentran activos [STANDBY]

 

bash-3.00$ cd /home/oracle

bash-3.00$ sqlplus “/as sysdba”

 

SQL*Plus: Release 10.2.0.3.0 – Production on Dom Jul 19 10:53:05 2009

 

Copyright (c) 1982, 2006, Oracle. All Rights Reserved.

 

 

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 – 64bit Production

With the Partitioning, OLAP and Data Mining options

 

SQL> @status

 

PROCESS STATUS THREAD# SEQUENCE# BLOCK# BLOCKS

——— ———— ———- ———- ———- ———-

ARCH CONNECTED 0 0 0 0

ARCH CONNECTED 0 0 0 0

ARCH CONNECTED 0 0 0 0

ARCH CONNECTED 0 0 0 0

ARCH CONNECTED 0 0 0 0

ARCH CONNECTED 0 0 0 0

MRP0 WAIT_FOR_LOG 1 28806 0 0

 

7 rows selected.

 

NOTA: Proceso RFS, no se encuentra arriba, se debe verificar el listener y la comunicación entre PRODUCCION y DATAGUARD

 

7.- Verificar y Levantar listener [STANDBY]

 

 

SQL> exit

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 – 64bit Production

With the Partitioning, OLAP and Data Mining options

bash-3.00$ lsnrctl status

 

LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.3.0 – Production on 19-JUL-2009 10:54:01

 

Copyright (c) 1991, 2006, Oracle. All rights reserved.

 

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))

TNS-12541: TNS:no listener

TNS-12560: TNS:protocol adapter error

TNS-00511: No listener

IBM/AIX RISC System/6000 Error: 79: Connection refused


bash-3.00$ lsnrctl start

 

LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.3.0 – Production on 19-JUL-2009 10:54:05

 

Copyright (c) 1991, 2006, Oracle. All rights reserved.

 

Starting /oracle/OraHomeDb/bin/tnslsnr: please wait…

 

TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.3.0 – Production

System parameter file is /oracle/HomeDb/network/admin/listener.ora

Log messages written to /oracle/HomeDb/network/log/listener.log

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dataguard)(PORT=1721)))

 

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1721))

STATUS of the LISTENER

————————

Alias LISTENER

Version TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.3.0 – Production

Start Date 19-JUL-2009 10:54:06

Uptime 0 days 0 hr. 0 min. 1 sec

Trace Level off

Security ON: Local OS Authentication

SNMP ON

Listener Parameter File /oracle/HomeDb/network/admin/listener.ora

Listener Log File /oracle/HomeDb/network/log/listener.log

Listening Endpoints Summary…

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dataguard)(PORT=1721)))

The listener supports no services

The command completed successfully

 

8.- Verificar sincronización en Dataguard [STANDBY]

 

bash-3.00$ sqlplus “/as sysdba”

 

SQL*Plus: Release 10.2.0.3.0 – Production on Dom Jul 19 10:54:25 2009

 

Copyright (c) 1982, 2006, Oracle. All Rights Reserved.

 

 

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 – 64bit Production

With the Partitioning, OLAP and Data Mining options

 

SQL> @status

 

PROCESS STATUS THREAD# SEQUENCE# BLOCK# BLOCKS

——— ———— ———- ———- ———- ———-

ARCH CONNECTED 0 0 0 0

ARCH CONNECTED 0 0 0 0

ARCH CONNECTED 0 0 0 0

ARCH CONNECTED 0 0 0 0

ARCH CONNECTED 0 0 0 0

ARCH CONNECTED 0 0 0 0

MRP0 WAIT_FOR_LOG 1 28806 0 0

 

7 rows selected.

 

NOTA: Se debe validar que el proceso RFS se encuentre disponible.-

 

SQL> /

 

PROCESS STATUS THREAD# SEQUENCE# BLOCK# BLOCKS

——— ———— ———- ———- ———- ———-

ARCH CONNECTED 0 0 0 0

ARCH CONNECTED 0 0 0 0

ARCH CONNECTED 0 0 0 0

ARCH CONNECTED 0 0 0 0

ARCH CONNECTED 0 0 0 0

ARCH CONNECTED 0 0 0 0

MRP0 WAIT_FOR_GAP 1 28806 0 0

RFS IDLE 0 0 0 0

RFS IDLE 0 0 0 0

RFS IDLE 0 0 0 0

RFS IDLE 1 28806 1 20480

RFS IDLE 2 19225 0 0

RFS IDLE 2 19224 0 0

 

13 rows selected.

 

SQL> /

 

PROCESS STATUS THREAD# SEQUENCE# BLOCK# BLOCKS

——— ———— ———- ———- ———- ———-

ARCH CONNECTED 0 0 0 0

ARCH CONNECTED 0 0 0 0

ARCH CONNECTED 0 0 0 0

ARCH CONNECTED 0 0 0 0

ARCH CONNECTED 0 0 0 0

ARCH CONNECTED 0 0 0 0

MRP0 WAIT_FOR_LOG 1 28808 0 0

RFS IDLE 0 0 0 0

RFS IDLE 0 0 0 0

RFS IDLE 0 0 0 0

RFS IDLE 0 0 0 0

RFS IDLE 0 0 0 0

RFS IDLE 0 0 0 0

 

13 rows selected.

 

 

Se valida que los procesos RFS y MRP0 se encuentran disponibles y aplicando archivelogs.-

 

Saludos

 

Juanjo

Categories: Oracle Tags: , ,
  1. Sin comentarios aún.
  1. Sin trackbacks aún.