Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to OPEN RESETLOGS when not recovering?

1,036 views
Skip to first unread message

argo...@my-deja.com

unread,
Mar 27, 2000, 3:00:00 AM3/27/00
to
Hi all,

We are using Oracle 7.3.4.

I shutdown the database and did a full backup
of all the files.

I wanted to OPEN RESETLOGS and whack all the
archived redo information.

In svrmgrl, I did:

connect internal
alter database open resetlogs


but got the error:
ORA-01139: RESETLOGS option only valid after an incomplete database
recovery

Trying the command:
alter database recover database

gave:

ORA-00283: Recovery session canceled due to errors
ORA-00264: no recovery required


What do I need to do, to reset the archiving to the beginning?


Thanks,

Argosy

Sent via Deja.com http://www.deja.com/
Before you buy.

Allan Plesniarski

unread,
Mar 27, 2000, 3:00:00 AM3/27/00
to
fake recovery then resetlogs:

SVRMGRL> recover database until cancel;
Media recovery complete - comes back right away because datafiles are
consistent
SVRMGRL> alter database open resetlogs; - will write or overwrite
logfiles in path stored in controlfiles

In article <8bo1s5$8uf$1...@nnrp1.deja.com>,

Eugene Firyago

unread,
Mar 27, 2000, 3:00:00 AM3/27/00
to

From svrmgrl (the database must be open and quiet):

connect internal
alter system switch logfile;
shutdown
startup mount
recover until cancel
...
<say "cancel" at the first "suggestion" prompt>
...
alter database open resetlogs;
shutdown
exit

Don't forget to make a full database backup before and after that operation.

<argo...@my-deja.com> wrote in message news:8bo1s5$8uf$1...@nnrp1.deja.com...

Brian Peasland

unread,
Mar 28, 2000, 3:00:00 AM3/28/00
to
Why do you want to do this? I'm not sure what you meant by "whack all
the archived redo information". After a cold backup, the old archived
redo logs are no longer necessary. You do not need to tell the Oracle db
anything about this. During recovery, you restore from your full backup
and then apply only those redo logs since that backup. Can you explain
why you want to open the database with RESETLOGS?

Thanks,
Brian


argo...@my-deja.com wrote:
>
> Hi all,
>
> We are using Oracle 7.3.4.
>
> I shutdown the database and did a full backup
> of all the files.
>
> I wanted to OPEN RESETLOGS and whack all the
> archived redo information.
>
> In svrmgrl, I did:
>
> connect internal
> alter database open resetlogs
>
> but got the error:
> ORA-01139: RESETLOGS option only valid after an incomplete database
> recovery
>
> Trying the command:
> alter database recover database
>
> gave:
>
> ORA-00283: Recovery session canceled due to errors
> ORA-00264: no recovery required
>
> What do I need to do, to reset the archiving to the beginning?
>
> Thanks,
>
> Argosy
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

--
========================================
Brian Peasland
Raytheons Systems at
USGS EROS Data Center
These opinions are my own and do not
necessarily reflect the opinions of my
company!
========================================

Eugene Firyago

unread,
Mar 28, 2000, 3:00:00 AM3/28/00
to
You can make offline backup of a database running in archivelog mode if you
brought it down normally. It works for recovery as any online backup set
does (to apply redo). Sometimes that trick with RESETLOGS is used to re-set
archive redo sequence to 1.

Eugene.


Brian Peasland <peas...@edcmail.cr.usgs.gov> wrote in message
news:38E0BD4A...@edcmail.cr.usgs.gov...

Brian Peasland

unread,
Mar 29, 2000, 3:00:00 AM3/29/00
to
Eugene,

I'm still not sure why one wants to reset the archive redo sequence
in this case. I'm very familiar with the RESETLOGS concept. But what I
haven't seen is a good reason to open the database with RESETLOGS
without having performed recovery first. If you've just done a cold
backup, why open with RESETLOGS? What does resetting the archive redo
sequence have to do with opening a database after a cold backup? To me,
it seems like an unnecessary step. Is there some reason that I'm
missing?

Thanks,
Brian

Eugene Firyago

unread,
Mar 29, 2000, 3:00:00 AM3/29/00
to
Ok, it makes no much sense doing resetlogs without real recovery (joust for
re-set redo sequence to 1) however it helps to open a database in case all
database online redo logs are lost or corrupted.

Eugene.


Brian Peasland <peas...@edcmail.cr.usgs.gov> wrote in message

news:38E20C3F...@edcmail.cr.usgs.gov...

Paul de Anguera

unread,
Apr 3, 2000, 3:00:00 AM4/3/00
to
In article <8bo1s5$8uf$1...@nnrp1.deja.com>,
argo...@my-deja.com wrote:
..

>I shutdown the database and did a full backup
>of all the files.
>
>I wanted to OPEN RESETLOGS and whack all the
>archived redo information.
Not sure what you mean by "Whack." If you wanted
to be able to remove the archived redo logs
without harming your ability to recover the
database, you achieved that when you did the cold
backup (assuming you did not need to recover to a
point in time prior to the cold backup).

If you want to copy the archived redo logs offline
(on tape for example) and remove the disk copies
of them, you can do that as soon as you have shut
down the database. For that matter, you could do
it sooner (several times a day for example if you
don't have enough room to keep a day's worth on
disk) provided you are careful not to copy an
archived redo log that is in the act of being
written by the archive log writer.

The archived redo logs are tied to the database by
their low and high System Change Numbers (SCNs)
and by the checkpoint number. There is no way to
"whack" this relationship, and if there were, it
would destroy your ability to apply the logs
during a recovery.


>
>In svrmgrl, I did:
>
>connect internal
>alter database open resetlogs
>but got the error:
>ORA-01139: RESETLOGS option only valid after an incomplete database
>recovery

If you recover a database and don't bring it up to
current (or you rebuild the controlfile so Oracle
doesn't know when "current" is) you open the
database this way to tell Oracle you now want the
incomplete state of recovery to be considered the
current state. You didn't recover the database,
so the option is not appropriate in your case.


>
>Trying the command:
>alter database recover database
>gave:
>ORA-00283: Recovery session canceled due to errors
>ORA-00264: no recovery required

You didn't restore anything, so there is nothing to recover.

>What do I need to do, to reset the archiving to the beginning?

If by beginning you mean System Change Number 1,
I'm pretty sure you don't really want to do that.
It sounds like you want to have a set of archived
redo logs for each interval between cold backups
that does not include any earlier logs. You can
do this by removing the logs from the system while
the database is shutdown for your cold backup.

Backup and recovery are topics which you should
fully master before you need them. Rather than
asking questions here and getting incomplete ideas
of how it works, please invest in a class.

Paul de Anguera | "You can't write a chord ugly enough to say
Reply to: | what you want to say sometimes, so you have to
deanguer@ | rely on a giraffe filled with whipped cream."
quidnunc.net | - Frank Zappa

0 new messages