Tags

, , , ,

i.e.

SQL> set linesize 2000
select sysdate,sum(apply_finish) apply_finish,
sum(apply_lag) apply_lag,
sum(transport_lag) transport_lag,
sum(startup_time) startup_time,
min(TIME_COMPUTED) TIME_COMPUTED
from
(
select
decode(name,’apply finish time’,to_number(substr(value,2,2))86400+to_number(substr(value,5,2))3600 +to_number(substr(value,8,2))60 +to_number(substr(value,11,2)),0) apply_finish,
decode(name,’apply lag’,to_number(substr(value,2,2))
86400+to_number(substr(value,5,2))3600 +to_number(substr(value,8,2))60 +to_number(substr(value,11,2)),0) apply_lag,
decode(name,’transport lag’,to_number(substr(value,2,2))86400+to_number(substr(value,5,2))3600 +to_number(substr(value,8,2))*60 +to_number(substr(value,11,2)),0) transport_lag,
decode(name ,’estimated startup time’,value,0) startup_time,
TIME_COMPUTED
from v$dataguard_stats
where name in (
‘apply finish time’,
‘apply lag’,
‘estimated startup time’,
‘transport lag’ )
)
/

SYSDATE APPLY_FINISH APPLY_LAG TRANSPORT_LAG STARTUP_TIME TIME_COMPUTED


22-NOV-13 2 66 66 11 11/22/2013 14:20:59



To defeat transportation lag, basicly drop and recreate the standby redo logs… ie.

select * from v$log; –> size
select * from v$logfile; –> name

alter database recover managed standby database cancel ;
alter system set standby_file_management=’MANUAL’ ;

alter database drop logfile group 21;
alter database drop logfile group 22;
alter database drop logfile group 23;
alter database drop logfile group 24;
alter database drop logfile group 25;
alter database drop logfile group 26;

ALTER DATABASE ADD STANDBY LOGFILE GROUP 21 ‘/…/stbyredo21a.log’ size 512m REUSE;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 22 ‘/…/stbyredo22a.log’ size 512m REUSE;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 23 ‘/…/stbyredo23a.log’ size 512m REUSE;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 24 ‘/…/stbyredo24a.log’ size 512m REUSE;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 25 ‘/…/stbyredo25a.log’ size 512m REUSE;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 26 ‘/…/stbyredo26a.log’ size 512m REUSE;

alter system set standby_file_management=’AUTO’ ;
alter database recover managed standby database disconnect from session;
select process, status, thread#, sequence#, block#, blocks from v$managed_standby;

select sysdate,sum(apply_finish) apply_finish,
sum(apply_lag) apply_lag,
sum(transport_lag) transport_lag,
sum(startup_time) startup_time,
min(TIME_COMPUTED) TIME_COMPUTED
from
(
select
decode(name,’apply finish time’,to_number(substr(value,2,2))86400+to_number(substr(value,5,2))3600 +to_number(substr(value,8,2))60 +to_number(substr(value,11,2)),0) apply_finish,
decode(name,’apply lag’,to_number(substr(value,2,2))
86400+to_number(substr(value,5,2))3600 +to_number(substr(value,8,2))60 +to_number(substr(value,11,2)),0) apply_lag,
decode(name,’transport lag’,to_number(substr(value,2,2))86400+to_number(substr(value,5,2))3600 +to_number(substr(value,8,2))*60 +to_number(substr(value,11,2)),0) transport_lag,
decode(name ,’estimated startup time’,value,0) startup_time,
TIME_COMPUTED
from v$dataguard_stats
where name in (
‘apply finish time’,
‘apply lag’,
‘estimated startup time’,
‘transport lag’ )
)
/

SYSDATE APPLY_FINISH APPLY_LAG TRANSPORT_LAG STARTUP_TIME TIME_COMPUTED


22-NOV-13 1 296 0 11 11/22/2013 14:42:14

Advertisements