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: Question: SCN too large for archive-log restore

Re: Question: SCN too large for archive-log restore

From: Andy Hassall <andy_at_andyh.co.uk>
Date: Tue, 01 Feb 2005 21:45:32 +0000
Message-ID: <h2uvv0hlkkf17e59qhigo1aedh8moq1tg2@4ax.com>


On 1 Feb 2005 13:25:13 -0800, "DW" <dwhittier_at_shaw.ca> wrote:

>I have an 8i database which I want to refresh into a test environment,
>so developers can have an up-to-date copy at all times.
>
>The idea is to bring an existing cold backup over to the new instance,
>restore it, mount it, and then nightly, copy over the redo logs from
>the source database and recover the logs up to the point of the latest
>commit on the source database.
>
>I am attempting to extract the SCN from the source database, which I
>would then pass to a SQL statement against the target, saying 'recover
>database until change ####'.
>
>To get the SCN, I am trying to 'SELECT min (CHECKPOINT_CHANGE#) FROM
>V_$DATAFILE'. Within TOAD, I get a value (a very large value,
>admittedly); but if I run the same query from SQL++ on the UNIX server
>which hosts the database, I get an exponent value rather than a whole
>number. the exponent is roughly 2.2E+12. I cannot get a whole number
>from SQL++ which I could then pass to the recover statement.
>
>Presumably, my SCN is going to be the same regardless where I pull it
>from. Will I have to 'reset' my SCN by some mechanism, or is there some
>way I can set the format of the output of the SQL statement such that
>it returns a whole number?

andyh_at_excession ~
$ sqlplus test/test_at_test101

SQL*Plus: Release 9.2.0.5.0 - Production on Tue Feb 1 21:43:30 2005

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production With the Partitioning and Data Mining options

SQL> select 9999999999999 x from dual;

         X



1.0000E+13

SQL> set numwidth 14
SQL> /              X



 9999999999999
-- 
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Received on Tue Feb 01 2005 - 15:45:32 CST

Original text of this message

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