Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle 8.0.5:Questions about SNAPTIME$$ field in snaphot log tables...

Re: Oracle 8.0.5:Questions about SNAPTIME$$ field in snaphot log tables...

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 29 Jul 1999 12:03:30 GMT
Message-ID: <37a54208.90008555@newshost.us.oracle.com>


A copy of this was sent to patrik.filipsson_at_frispar.se (if that email address didn't require changing) On Thu, 29 Jul 1999 06:45:58 GMT, you wrote:

>Hi!
>
>I am using Oracle 8.0.5 (SCO Unixware)and I created a snapshot log
>table using the command:
>CREATE SNAPSHOT LOG ON...
>The snapshot log table is created without any problems. However, when I
>insert a row in the master table, a row in the snapshot log table is
>created having the field SNAPTIME$$ set to 01-JAN-00. When I check the
>date further, I discover that the year is set to 4000. Maybe I dont't
>know what the field is used for but the date 1 Jan, 4000 seems kind of
>strange. I was hoping that SNAPTIME$$ was used to keep track of when
>the change in the master table was made. If this is the case, does
>anyone know why I get the strange date? I have checked sysdate and I
>get the date I expect.
>

the snaptime$$ is used to coordinate many snapshots using the same snapshot log. When a snapshot grabs its rows to refresh -- it'll update the snaptime$$ column. A snapshot only grabs rows pointed to by entries in the snapshot log such that the snaptime$$ is greater then the time of their last refresh (assuming your system won't be running in the year 4000). So, when I grab my rows from the snapshot log, i update the snaptime$$ column with the time I grabbed them. Then the next time i come back to the snapshot log, i will not re-pull a row i pulled last time.

When the last snapshot uses a row in the snapshot log -- it'll clear it out of there. In the most common case -- a single snapshot exists, the snaptime$$ column will never appear to change, it'll always be that date in the future and the single snapshot will delete that log entry before you see it update that column...

>Thanx for any input in advance
>Patrik Filipsson
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.

--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Jul 29 1999 - 07:03:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US