1 FUNCTION get_max_checkpoint(sessionnum IN NUMBER)
2 RETURN number IS
3 ckpt number;
4 BEGIN
5 select ckpt_scn into ckpt
6 from
7 (select c.ckpt_scn ckpt_scn
8 from system.logmnr_restart_ckpt$ c
9 where c.session# = sessionnum and
10 c.valid = 1 order by ckpt_scn desc)
11 where rownum = 1 ;
12 return ckpt;
13 END get_max_checkpoint;