dbTalk Databases Forums  

Get last record or...

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Get last record or... in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
eAddict
 
Posts: n/a

Default Get last record or... - 12-02-2009 , 01:09 PM






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

Reply With Quote
  #2  
Old   
ddf
 
Posts: n/a

Default Re: Get last record or... - 12-02-2009 , 04:11 PM






On Dec 2, 2:09*pm, eAddict <eadd... (AT) gmail (DOT) com> wrote:
Quote:
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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.