Monday, April 15, 2013

data guard apply lag feature

to show the lag statistics while logical standby db is applying archived log to catch up the primary, after disk space issue is solved.

$ cat chk_dg_stats.sql
select name, value, time_computed from v$dataguard_stats
/


14:48:22 SYS@DGLOGI> @chk_dg_stats

NAME                             VALUE                                                            TIME_COMPUTED
-------------------------------- ---------------------------------------------------------------- ------------------------------
transport lag                    +00 00:00:00                                                     04/10/2013 14:48:26
apply lag                        +00 22:29:25                                                     04/10/2013 14:48:26
apply finish time                +00 00:00:27.008                                                 04/10/2013 14:48:26
estimated startup time           21                                                               04/10/2013 14:48:26

14:48:26 SYS@DGLOGI> @chk_dg_stats

NAME                             VALUE                                                            TIME_COMPUTED
-------------------------------- ---------------------------------------------------------------- ------------------------------
transport lag                    +00 00:00:00                                                     04/10/2013 14:48:35
apply lag                        +00 16:35:59                                                     04/10/2013 14:48:35
apply finish time                +00 00:00:18.451                                                 04/10/2013 14:48:35
estimated startup time           21                                                               04/10/2013 14:48:35

14:48:35 SYS@DGLOGI> @chk_dg_stats

NAME                             VALUE                                                            TIME_COMPUTED
-------------------------------- ---------------------------------------------------------------- ------------------------------
transport lag                    +00 00:00:00                                                     04/10/2013 14:48:37
apply lag                        +00 14:47:50                                                     04/10/2013 14:48:37
apply finish time                +00 00:00:17.303                                                 04/10/2013 14:48:37
estimated startup time           21                                                               04/10/2013 14:48:37

[A14:48:37 SYS@DGLOGI> @chk_dg_stats

NAME                             VALUE                                                            TIME_COMPUTED
-------------------------------- ---------------------------------------------------------------- ------------------------------
transport lag                    +00 00:00:00                                                     04/10/2013 14:48:39
apply lag                        +00 14:35:43                                                     04/10/2013 14:48:39
apply finish time                +00 00:00:12.345                                                 04/10/2013 14:48:39
estimated startup time           21                                                               04/10/2013 14:48:39

14:48:39 SYS@DGLOGI> @chk_dg_stats

NAME                             VALUE                                                            TIME_COMPUTED
-------------------------------- ---------------------------------------------------------------- ------------------------------
transport lag                    +00 00:00:00                                                     04/10/2013 14:48:46
apply lag                        +00 10:45:32                                                     04/10/2013 14:48:46
apply finish time                +00 00:00:06.826                                                 04/10/2013 14:48:46
estimated startup time           21                                                               04/10/2013 14:48:46

14:48:46 SYS@DGLOGI> @chk_dg_stats

NAME                             VALUE                                                            TIME_COMPUTED
-------------------------------- ---------------------------------------------------------------- ------------------------------
transport lag                    +00 00:00:00                                                     04/10/2013 14:48:49
apply lag                        +00 07:49:19                                                     04/10/2013 14:48:49
apply finish time                +00 00:00:05.111                                                 04/10/2013 14:48:49
estimated startup time           21                                                               04/10/2013 14:48:49

14:48:49 SYS@DGLOGI> @chk_dg_stats

NAME                             VALUE                                                            TIME_COMPUTED
-------------------------------- ---------------------------------------------------------------- ------------------------------
transport lag                    +00 00:00:00                                                     04/10/2013 14:50:13
apply lag                        +00 00:00:00                                                     04/10/2013 14:50:13
apply finish time                +00 00:00:00.000                                                 04/10/2013 14:50:13
estimated startup time           21                                                               04/10/2013 14:50:13