Re: Get last record or...
From: ddf <oratune_at_msn.com>
Date: Wed, 2 Dec 2009 14:11:28 -0800 (PST)
Message-ID: <25713b60-7f8b-4b9c-aca2-24773fd09521_at_m16g2000yqc.googlegroups.com>
On Dec 2, 2:09 pm, eAddict <eadd..._at_gmail.com> wrote:
> I have a database that was cloned a bit ago. I was looking at v
> $log_history on the Data Guard side of things and found some wierd
> stuff.
>
> RECID STAMP THREAD# SEQUENCE# FIRST_CHANGE# FIRST_TIM
> NEXT_CHANGE# RESETLOGS_CHANGE# RESETLOGS
> ---------- ---------- ---------- ---------- ------------- ---------
> ------------ ----------------- ---------
> 1 697091099 1 51477 2.5076E+10 08-SEP-09
> 2.5076E+10 1 08-AUG-00
> 2 697091109 1 51478 2.5076E+10 08-SEP-09
> 2.5077E+10 1 08-AUG-00
> 3 697091310 1 1 2.5089E+10 09-SEP-09
> 2.5089E+10 2.5089E+10 09-SEP-09
> 4 697092131 1 2 2.5089E+10 09-SEP-09
> 2.5089E+10 2.5089E+10 09-SEP-09
> 5 697092803 1 3 2.5089E+10 09-SEP-09
> 2.5090E+10 2.5089E+10 09-SEP-09
> .
> .
> .
> 2518 704544170 1 2516 2.6956E+10 02-DEC-09
> 2.6956E+10 2.5089E+10 09-SEP-09
> 2519 704544171 1 2517 2.6956E+10 02-DEC-09
> 2.6956E+10 2.5089E+10 09-SEP-09
> 2520 704544203 1 2518 2.6956E+10 02-DEC-09
> 2.6956E+10 2.5089E+10 09-SEP-09
>
> 2520 rows selected.
>
> So when I go to see the last log that was applied I see 51478 and NOT
> 2520.
> So, how can I do any of the following:
> (a) remove the erroneous records from v$log_history
> (b) set up a query so I get the correct result (ie 2520)
>
> Thanks!
> Vince
Date: Wed, 2 Dec 2009 14:11:28 -0800 (PST)
Message-ID: <25713b60-7f8b-4b9c-aca2-24773fd09521_at_m16g2000yqc.googlegroups.com>
On Dec 2, 2:09 pm, eAddict <eadd..._at_gmail.com> wrote:
> I have a database that was cloned a bit ago. I was looking at v
> $log_history on the Data Guard side of things and found some wierd
> stuff.
>
> RECID STAMP THREAD# SEQUENCE# FIRST_CHANGE# FIRST_TIM
> NEXT_CHANGE# RESETLOGS_CHANGE# RESETLOGS
> ---------- ---------- ---------- ---------- ------------- ---------
> ------------ ----------------- ---------
> 1 697091099 1 51477 2.5076E+10 08-SEP-09
> 2.5076E+10 1 08-AUG-00
> 2 697091109 1 51478 2.5076E+10 08-SEP-09
> 2.5077E+10 1 08-AUG-00
> 3 697091310 1 1 2.5089E+10 09-SEP-09
> 2.5089E+10 2.5089E+10 09-SEP-09
> 4 697092131 1 2 2.5089E+10 09-SEP-09
> 2.5089E+10 2.5089E+10 09-SEP-09
> 5 697092803 1 3 2.5089E+10 09-SEP-09
> 2.5090E+10 2.5089E+10 09-SEP-09
> .
> .
> .
> 2518 704544170 1 2516 2.6956E+10 02-DEC-09
> 2.6956E+10 2.5089E+10 09-SEP-09
> 2519 704544171 1 2517 2.6956E+10 02-DEC-09
> 2.6956E+10 2.5089E+10 09-SEP-09
> 2520 704544203 1 2518 2.6956E+10 02-DEC-09
> 2.6956E+10 2.5089E+10 09-SEP-09
>
> 2520 rows selected.
>
> So when I go to see the last log that was applied I see 51478 and NOT
> 2520.
> So, how can I do any of the following:
> (a) remove the erroneous records from v$log_history
> (b) set up a query so I get the correct result (ie 2520)
>
> Thanks!
> Vince
How do you know the records are 'erroneous'? The output looks perfectly fine to me. Your last log is by date, not by sequence# and if you order the results by date your last log sequence applied is 2518, with 2519 the next in line.
I can't see what there is to 'fix'.
David Fitzjarrell Received on Wed Dec 02 2009 - 16:11:28 CST