Flashback queries

2003-12-24 Thread Jonathan Gennick
It's been awhile since I've looked at flashback queries, and
I have a couple questions:

* Given an SCN, is there any way to know for certain whether
a flashback query to that SCN is possible? Can a non-DBA
user determine this?

* Is there an easy way to determine how much undo data my
database is (hopefully) retaining? In other words, can I
easily determine how far back in the past I *can* go?

Yes, here it is Christmas eve, and I'm working away...

Best regards,

Jonathan Gennick --- Brighten the corner where you are
http://Gennick.com * 906.387.1698 * mailto:[EMAIL PROTECTED]

Join the Oracle-article list and receive one
article on Oracle technologies per month by 
email. To join, visit http://four.pairlist.net/mailman/listinfo/oracle-article, 
or send email to [EMAIL PROTECTED] and 
include the word subscribe in either the subject or body.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jonathan Gennick
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


Re: Flashback queries

2003-12-24 Thread Jonathan Lewis
Answers in-line

Regards

Jonathan Lewis
http://www.jlcomp.demon.co.uk

  The educated person is not the person
  who can answer the questions, but the
  person who can question the answers -- T. Schick Jr


One-day tutorials:
http://www.jlcomp.demon.co.uk/tutorial.html


Three-day seminar:
see http://www.jlcomp.demon.co.uk/seminar.html
UK___November


The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html


- Original Message - 
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Sent: Wednesday, December 24, 2003 9:44 PM


 It's been awhile since I've looked at flashback queries, and
 I have a couple questions:

 * Given an SCN, is there any way to know for certain whether
 a flashback query to that SCN is possible? Can a non-DBA
 user determine this?


No, not without doing it.
As a general principle, you can always be in a position where
one querycan flash back to SCN = t1, but another query can't
because the two queries require undo from different segments.

 * Is there an easy way to determine how much undo data my
 database is (hopefully) retaining? In other words, can I
 easily determine how far back in the past I *can* go?


No.

You could mess about with dumping segment header blocks
and looking at the 'retention' table, which has a timestamp
per extent of the most recent commit recorded against that
extent.  The highest (most recent) timestamp would be a
valid bound for the earliest point in time that you could
reach - but depending on luck, size of extents, etc. you
might get some queries going a lot further back.


 Yes, here it is Christmas eve, and I'm working away...


 Best regards,

 Jonathan Gennick --- Brighten the corner where you are
 http://Gennick.com * 906.387.1698 * mailto:[EMAIL PROTECTED]

 Join the Oracle-article list and receive one
 article on Oracle technologies per month by
 email. To join, visit
http://four.pairlist.net/mailman/listinfo/oracle-article,
 or send email to [EMAIL PROTECTED] and
 include the word subscribe in either the subject or body.

 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.net
 -- 
 Author: Jonathan Gennick
   INET: [EMAIL PROTECTED]

 Fat City Network Services-- 858-538-5051 http://www.fatcity.com
 San Diego, California-- Mailing list and web hosting services
 -
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jonathan Lewis
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).