-
Hi,
I am testing out database recovery by exporting a full dump file of the database while the database is still open (hot backup) and using the dump file to copy into another machine to make sure that all the files are available and the database is working fine.
When I tried to startup the database, I got the following errors:
ora-01122: database file 17 failed verification check
ora-01110: database file 17 '/app/oracle......./archive.dbf'
ora-01207:file is more recent than controlfile - old controlfile
Question1: Is it because i did a hot backup and whenever there is a write, the controlfile sequence will change, which is why the file is more recent than controlfile?
Question 2: How do i solve this error? What could be the cause of them?
Later, I did a 'recover database using controlfile until cancel' and I did an 'alter database open resetlogs', then I have encountered another set of errors:
ora-01194: file 1 needs more recovery to be consistent
ora-01110: '/app/oracle...../system01.dbf'
Question 3: How do i overcome this set of errors?
Question 4: Is there any proper ways of recovering from hot backup?
Thank you so much for sharing :) Pls help!
-
Hi,
Did you use the consistent option during the export as your database was in use?
Baliga
-
In Active database, even if you take a hot backup and restore, restore with archive logs and the latest controlfile,(get controlfile using alter database backup controlfile as '.....';). and then let oracle do recovery, if it gives errors, then run manual recovery.
The problem here is, u did not get the controlfile after the hot backup.
U do recover database using backup controlfile, only when u loase the controlfiles and u have the recent backup.
Right noe , u have lost everything, restore everything from backup.
-
Hi,
first you will have to use consistent=Y during the export 'cause there are some system objects which will get exported and later this will lead to inconsistency.
-
Hi,
You need to recover more datafiles.
I have also encountered this situation.
Connect to server manager and then connect internal.
You should use 'alter database recover datafile
as specified by the system.
Then again restart the machine.If you require more files to recover the system will tell you the names of those datafiles.
Hope this helps
bye
-
there is one old article on metalink:
Note:3286.1 V6 Recovery - How It Works and Some Examples
It explains quite a lot, regadles of V6 of Oracle.
Disclaimer: what is said bellow could be wrong :-)
To question 1
ora-01207:file is more recent than controlfile - old controlfile
Looks like you tried to recover database with OLD control file. In that case you need to specify
recover [until cancel, etc] using backup controlfile
That 'backup controlfile' clause is only needed to allow database to pass sequence numbers recorded in control file.
To error:
ora-01194: file 1 needs more recovery to be consistent
ora-01110: '/app/oracle...../system01.dbf'
When I get this error while doing a recovery using "recover [until cancel, etc] using backup controlfile", the solution is to apply latest online redo log.
Then recover gives message "media recovery completed" and database opens with reset logs.
However I am amazed why it is that way, as all datafiles seems to be checkpointed at the same SCN before applying that latest online redo log.
-
Hi,
Thanks for sharing your experiences. I am trying to do a recovery using physical backup (tape backup), however i have encountered the controlfile errors which is caused by the write to database duing the backup. In this case, how am i going to recover from physical backup without encountering the controlfile errors? Do i use 'alter database backup controlfile to trace' command and with this i can restore the control files using the physical backup too?
In the second case is that during an export, will it export controlfiles too? Is that why consistent=Y must be stated?
I need more help in this topic... Thanks everyone! :)
-
Well I dont know what did you do.
To start with EXPORT is NOT a hot backup, it is a logical backup
When you say you start up the database, whcih database are we talking about here the new one or the old one which you exported?
Consistent has nothing to do with your situation, it is used to avoid inconsistent data when you export when there DML going
-
if you have recent control file, then it should not be a problem just to 'recover database [until cancel]' I suppose.
By the way, how you perform hot backup, via RMAN or alter tablespace begin/end backup and OS utility to copy files?
-
if you do NOT have any control files or the trace like control file, create it manually! Then use
recover database using backup controlfile until cancel
With this option Oracle doesnt know when to stop so you will have to be careful here, very. Nevertheless i would backup the existing database just in case you have to apply recovery again if your first attempt fails
But anyway I dont see how the heck an EXPORT would lead you to this situation
-
recovery from 'ora-01194: file 1 needs more recovery to be consistent' may depend if your database is or is not in archivelog mode. When I talked about online redo log required to get out of this error, I was talking about scenariou when database was in NOARCHIVELOG. In such case the only logs one can use for recovery are online logs...
-
Hi,
I am sorry that maybe I did not make myself clear enough or i have make a mistake when I explained the situations and asking questions. :P I am asking for 2 different recovery methods: (1) recover using physcial backup (using tape ,without archiving) for a 24x7 hrs database (2) recover using full export
(1) For physical backup, there is a chance that controlfile sequence no might jumped during backup and when recover, there will be an error stating that the 'ora-01207:file is more recent than controlfile - old controlfile'. How am I going to solve this error?
(2) As for full export backup, am i able to recover the database by just importing? do i have to create any controlfiles or tablespaces?
Pls advice, thank u so much! :)
-
old control file error can be resolved via backup control file clause.
It instructs Oracle to do a recovery on restored datafiles that are checkpointed after control file backup was done.
Normally control file is backuped after datafiles, thus it is more recent.
full database import/export is different approach:
recovery deals with database at block level, w/o knowing what is in database.
exp/imp utility deals with database at sql level: it just runs sql(DDL and DML to load table data) stored in dump file on some already precreated database.
The difference is in speed ( full database import via imp is slow process), accuracy(at block level you can be sure that you will get database clone, with full db imp it is not so trivial at all), granurality (you can not recover separate tables with recovery), migration(recovery is limited to oracle version, platform and init.ora parameters, mostly db block size, exp/imp can be used to migrate database).
-
HI,
If during my physical backup to tape, I start to backup all the datafiles first and backup the controlfile as the last one to have the last sequence number. In this case, will I be able to avoid the old controlfile error? Will this be able to work? Thanks!
-
let´s clear something up
Are you in archive log mode? Because you said
"I am asking for 2 different recovery methods: (1) recover using physcial backup (using tape ,without archiving) " without archiving what do you mean?
you can backup control file in two ways, a binary copy and a SQL like script to recreate the control file, which one do you have?
-
do you use rman for backups? if so, then it includes controlfile in backup set properly if database backup is done. Otherwise most backup scripts for RMAN use kind of that sequence:
tablespaces(i.e. datafiles)
control file
archive logs (issue archive log before to archive online redo logs)
If you use alter tablespace begin/end backup and os utility, then I suppose you need to backup controlfile after tablespace backup (at least after alter tablespace begin backup).
Look into metalink for more regarding those non-rman issues.
-
anyway, for 24x7 db backups are pretty useless. How long it will take to restore from tape? Then to recover(apply all logs)?
Standby database or may be replication is a good method for 24x7. We rely on standby database and it saved us couple of times.