Operating System - HP-UX
1748163 Members
3652 Online
108758 Solutions
New Discussion юеВ

Re: ORACLE redo logs identifying

 
Yogeeraj_1
Honored Contributor

Re: ORACLE redo logs identifying

hi Enrico,

to determine this, the following should help:
sys@MYDB.MU> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u02/oracle/admin/mydb/arch
Oldest online log sequence 15155
Next log sequence to archive 15157
Current log sequence 15157
sys@MYDB.MU>

Using SQL, the same thing can be queried as follows:
sys@MYDB.MU> select thread#, sequence#
2 from v$log
3 where status = 'CURRENT';

THREAD# SEQUENCE#
__________ __________
1 15157

Elapsed: 00:00:00.03
sys@MYDB.MU>

Which implies that the next required archived log file would have sequence: 15158

hope this helps!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Enrico Venturi
Super Advisor

Re: ORACLE redo logs identifying

Unfortunately it doesn't work .........
see the following traces:

SVRMGR> set autorecovery on;
Autorecovery ON

SVRMGR> alter database recover automatic from '/usr/osres/WarmArchive/1354RM/' database until cancel using backup controlfile;
alter database recover automatic from '/usr/osres/WarmArchive/1354RM/' database until cancel using backup controlfile
*
ORA-00279: change 53464 generated at 10/03/2006 07:58:13 needed for thread 1
ORA-00289: suggestion : /usr/osres/WarmArchive/1354RM/arch_1_7.arc
ORA-00280: change 53464 for thread 1 is in sequence #7
ORA-00278: log file '/usr/osres/WarmArchive/1354RM/arch_1_7.arc' no longer needed for this recovery
ORA-00308: cannot open archived log '/usr/osres/WarmArchive/1354RM/arch_1_7.arc'
ORA-27037: unable to obtain file status
HP-UX Error: 2: No such file or directory
Additional information: 3

SVRMGR> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /usr/osres/WarmArchive/1354RM/
Oldest online log sequence 0
Next log sequence to archive 1
Current log sequence 1

SVRMGR> select THREAD#, SEQUENCE# from v$log where status='CURRENT';
THREAD# SEQUENCE#
---------- ----------
1 1
1 row selected.
SVRMGR>

Yogeeraj_1
Honored Contributor

Re: ORACLE redo logs identifying

hi,

now it is much clearer.

You are issueing a "ALTER DATABASE OPEN RESETLOGS;"!!


If you do this your logfiles are no longer in sync! You will never be able to apply your archivelog files.

I am not sure that noresetlogs will work in this case..

If you are using the OFF database only for query, you may issue:
sql> alter database open read only


with this you will be able to later recover your database by applying the new archived logs!


hope this helps!

kind regards
yogeeraj



No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Enrico Venturi
Super Advisor

Re: ORACLE redo logs identifying

No chance to find a solution.
No answers to my question: just a show of the know how of each one.
Yogeeraj_1
Honored Contributor

Re: ORACLE redo logs identifying

hi Enrico,

Sorry, I think i was not *clear* enough.

1. Since you are doing a resetlog, you will not be able to apply the next archived logfile.

2. The SQL statement do give you the information you require.
select THREAD#, SEQUENCE# from v$log where status='CURRENT';

The next archived log file that you will need is sequence#+1

If you need any further clarification, please do let us know.

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)