dataguard如何查看延迟

 

1.主库的scn与备库的scn做比较,得出时间差

select (to_date(to_char(scn_to_timestamp((select current_scn from v$database)),
                        'YYYY-MM-DD HH24:MI:SS'),
                'YYYY-MM-DD HH24:MI:SS') -
       to_date(to_char(scn_to_timestamp((select current_scn
                                           from v$database@link_to_slave_pdb1)),
                        'YYYY-MM-DD HH24:MI:SS'),
                'YYYY-MM-DD HH24:MI:SS')) * 24 * 60 "delaytime(分钟)"
  from dual;

 

posted @ 2021-07-26 11:03  slnngk  阅读(367)  评论(0编辑  收藏  举报