Regarding next_change#

50 views
Skip to first unread message

Ganesh

unread,
Sep 30, 2009, 10:02:08 AM9/30/09
to ORACLE_DBA_EXPERTS
I am using 8i. I would like to know how exactly the next_change# is
updated. On my Oracle server the "list backup" command returns
following:

*****************
RMAN> list backup;

RMAN-03022: compiling command: list

List of Backup Sets
Key Recid Stamp LV Set Stamp Set Count Completion Time
------- ---------- ---------- -- ---------- ----------
----------------------
1 1 698720723 0 698720644 1 28-SEP-09

List of Backup Pieces
Key Pc# Cp# Status Completion Time Piece Name
------- --- --- ----------- ----------------------
------------------------
1 1 1 AVAILABLE 28-SEP-09 BE_01kqb8c4_1_1

List of Datafiles Included
File Name LV Type Ckp SCN Ckp
Time
---- ------------------------------------- -- ---- ----------
-------------
1 C:\ORACLE\ORADATA\ORCL\SYSTEM01.DBF 0 Full 362797 28-
SEP-09
2 C:\ORACLE\ORADATA\ORCL\RBS01.DBF 0 Full 362797 28-
SEP-09
3 C:\ORACLE\ORADATA\ORCL\USERS01.DBF 0 Full 362797 28-
SEP-09
4 C:\ORACLE\ORADATA\ORCL\TEMP01.DBF 0 Full 362797 28-
SEP-09
5 C:\ORACLE\ORADATA\ORCL\TOOLS01.DBF 0 Full 362797 28-
SEP-09
6 C:\ORACLE\ORADATA\ORCL\INDX01.DBF 0 Full 362797 28-
SEP-09
7 C:\ORACLE\ORADATA\ORCL\DR01.DBF 0 Full 362797 28-
SEP-09
8 C:\ORACLE\ORADATA\ORCL\TEST01.DBF 0 Full 362797 28-
SEP-09

List of Backup Sets
Key Recid Stamp LV Set Stamp Set Count Completion Time
------- ---------- ---------- -- ---------- ----------
----------------------
4 4 698939872 0 698939794 5 30-SEP-09

List of Backup Pieces
Key Pc# Cp# Status Completion Time Piece Name
------- --- --- ----------- ----------------------
------------------------
4 1 1 AVAILABLE 30-SEP-09 BE_05kqhuci_1_1

List of Datafiles Included
File Name LV Type Ckp SCN Ckp
Time
---- ------------------------------------- -- ---- ----------
-------------
1 C:\ORACLE\ORADATA\ORCL\SYSTEM01.DBF 0 Full 362846 30-
SEP-09
2 C:\ORACLE\ORADATA\ORCL\RBS01.DBF 0 Full 362846 30-
SEP-09
3 C:\ORACLE\ORADATA\ORCL\USERS01.DBF 0 Full 362846 30-
SEP-09
4 C:\ORACLE\ORADATA\ORCL\TEMP01.DBF 0 Full 362846 30-
SEP-09
5 C:\ORACLE\ORADATA\ORCL\TOOLS01.DBF 0 Full 362846 30-
SEP-09
6 C:\ORACLE\ORADATA\ORCL\INDX01.DBF 0 Full 362846 30-
SEP-09
7 C:\ORACLE\ORADATA\ORCL\DR01.DBF 0 Full 362846 30-
SEP-09
8 C:\ORACLE\ORADATA\ORCL\TEST01.DBF 0 Full 362846 30-
SEP-09

******************

But I get following output for query to get max(next_change#)

SQL> select max(next_change#) from v$archived_log;

MAX(NEXT_CHANGE#)
-----------------
362799

I am expecting a value near to 362846 to get displayed as output to
this query. (But the value displayed is nearer to SCN for earlier
backup) I am not able to understand why the next_change# is not
getting updated. Please let me know whether I am missing something
here.

Thanks in advance,
Ganesh Tambat

ddf

unread,
Oct 1, 2009, 4:02:01 PM10/1/09
to ORACLE_DBA_EXPERTS
Comments embedded.

On Sep 30, 9:02 am, Ganesh <ganesh.tam...@gmail.com> wrote:
> I am using 8i.

8.1.6 ro 8.1.7? It DOES make a difference.

> I would like to know how exactly the next_change# is
> updated.

Then you read here:

http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76961/ch37.htm#6831

and discover that NEXT_CHANGE# is the first SCN in the first change
number in the next log to be archived. This is the first SCN in the
current redo log being written.
Because you don't understand how the view is populated. I explained
this at the top of this response.

> (But the value displayed is nearer to SCN for earlier
> backup) I am not able to understand why the next_change# is not
> getting updated.

It is, you simply don't know what causes that view to update. When
the current redo log group is archived you'll then see the
next_change# value increase, likely far past the value you'd expect to
see.

> Please let me know whether I am missing something
> here.
>

You are, and it's been explained to you.

> Thanks in advance,
> Ganesh Tambat


David Fitzjarrell
Reply all
Reply to author
Forward
0 new messages