Operating System - HP-UX
1747986 Members
4498 Online
108756 Solutions
New Discussion юеВ

ALTER DATABASE OPEN RESETLOGS;

 
Enrico Venturi
Super Advisor

ALTER DATABASE OPEN RESETLOGS;

Hello colleagues,
I perform the online backup of a database DBSNML and I copy the relevant files to another machine; here I've created another instance of a database DBSNML1 ...
After the creation, while the DB is empty, I perform the controfile backup by:
ALTER DATABASE BACKUP CONTROLFILE TO TRACE;

After that I import the DBSNML datafiles, then I perform a startup nomount and a I create the new controlfile by setting the database name to DBSNML1

After that I try to startup the DB: it's ok, but when I open it it requires the recovery of the system.dbf ...

How can I solve this problem?

Enrico
3 REPLIES 3
Hari Kumar
Trusted Contributor

Re: ALTER DATABASE OPEN RESETLOGS;

Have you done Shutdown cleanly, i mean Shutdown immediate,
You need to switch log files immediately after the point in time that you want to recover to. I believe that this will give you the last change that you are looking for ,
then u do clean shutdown and then follow again with all the procedure(copying all the files ), u have done with.

Hope u got,
Thanks
Information is Wealth ; Knowledge is Power
twang
Honored Contributor

Re: ALTER DATABASE OPEN RESETLOGS;

If you are sure that the last shutdown was not normal or immediate, recovery is not required. Then you can "CREATE CONTROLFILE REUSE set DATABASE RESETLOGS" to recreate the database.
Stan_17
Valued Contributor

Re: ALTER DATABASE OPEN RESETLOGS;

Hi,

when you say, you copied relevant files, did you copy the recent archive logs that were generated after the hotbackup started. besides, are you switching logfiles at the end of your hotbackup script. if not then, thats the problem.

so do a hotbackup which has a switch logfile statement at the end of your backup script, copy all datafiles, archivelogs to the another machine.

startup nomount;
create controlfile set dbsnml1...restlogs...
recover database using backup controlfile
feed the necessary archivelogs
alter database open resetlogs.

hth,
Stan