DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: cannot restore database from hot backup

Hybrid View

  1. #1
    Join Date
    Oct 2006
    Posts
    4

    cannot restore database from hot backup

    We use oracle 7.3.2 on sco
    We have an identical backup server that we are trying to replicate oracle data onto.

    We have the source machine in Archivelog mode. We run a hot backup and are then trying to restore this onto the backup server.

    We start by restoring the datafiles and control file onto the second server.
    We then run 'recover database using backup controlfile until change XXXX'
    This completes with Media recovery complete.

    Then we run 'alter database open resetlogs' and we get error.
    ORA-001194: File 2 needs more recovery to be consistent
    ORA-01110: data file 2: '/db/xxxxx.dbf'

    What should we do? This file is already in the location, but it may not be up to date - we thought it would be updated by recover command?

  2. #2
    Join Date
    Jun 2006
    Location
    Chennai, INDIA
    Posts
    72
    Hi,
    Check the following views, u may get some meaningful info.
    V$RECOVER_FILE
    V$RECOVERY_STATUS

    Do update us with more info.

    Thanks,
    Kam.

  3. #3
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492

    Cool


    Try using RMAN to clone the db.
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  4. #4
    Join Date
    Jun 2006
    Posts
    259
    First he is running 7.3.2... Don't use RMAN with that oracle release.

    After taking the hot backup how are you relocating/restoring the files?

    Simplest approach is to simply do an ftp copy of everything while the DB is down. However if that is not an option then the following should work just fine.

    1. Alter system switch logfile (noting the log number that is archived)
    2a. Put each tablespace in backup mode (1 at a time).
    (alter tablespace <> begin backup)
    2b. ftp the datafiles in the tablespace to your backup server.
    2c. End the backup for the tablespace.
    2d. Repeat steps 2a - dc for all tablespaces.

    3a. switch log files..
    3b. Copy the control file to the backup server
    4. copy the Init files to the backup server
    5. copy the redo log files to the backup server
    6. copy the archive log files to the backup server ( see step 1... )

    7. Perform recover: recover database
    8. It will prompt you for the archive log files.
    9. There should be no need to perform an open with reset logs.

  5. #5
    Join Date
    Oct 2006
    Posts
    4

    Thanks for replies

    Kam
    v$recover_file does not show file 2 at all.
    The files it does show say ONLINE.
    v$recovery_status does not return any records

    ixion
    We have a script that does pretty much what you have outlined and puts it on tape. We then restore this tape onto the backup server.
    The control file we use is created by the ALTER DATABASE BACKUP CONTROLFILE TO TRACE command.

    The only thing that could be an issue is the redo log files are not up to date on the backup server but I thought the archive logs is all that is required to freshen the database from its original backuped up state.

    We are using the backed up control file and database as our starting point and then applying the archive logs. As new archive logs get created, we apply them to the backup server.

    Our intention was to create a standby server with the database as close as possible in time to the live server.

    Is there a better way of doing this ?

  6. #6
    Join Date
    Apr 2003
    Location
    Gourock, Scotland
    Posts
    102
    You may have to specify one of your online redo logs to bring the datafile into a consistent state - we have had that scenario in the past, even with a preceding switch logfile.
    If I have to choose between two evils, I always like to choose the one I haven't tried yet.

  7. #7
    Join Date
    Oct 2006
    Posts
    4
    I have tried this restore process again and have been able to restore the database to the backup machine correctly this time (I think this is a hit and miss affair as sometimes it works and sometimes it does not).

    Once the database has been restored, how can we apply the archive logs to roll the database forward in time so it is closer to the live server?

    Trying the recover database gives no recovery required.
    Trying the recover database using backup controlfile until change XXX;
    comes back with wanting a SCN file that has already been applied.
    ORA-00279: Change xxxx generated at xxxx needed for thread 1
    ORA-00289: Suggestion: xxx.log
    ORA-00280: Change xxxx for thread 1 is in seq #xxx
    Specify log: {=suggested | filename | AUTO | CANCEL}
    ORA-00326: log begins at change xxx, need earlier change xxx
    ORA-00334: archived log: xxx.log

  8. #8
    Join Date
    Jun 2006
    Posts
    259
    Quote Originally Posted by altr
    I have tried this restore process again and have been able to restore the database to the backup machine correctly this time (I think this is a hit and miss affair as sometimes it works and sometimes it does not).
    You need the online logs most likely, backups of which should be taken at the end of the tablespace backup not the begining.


    Quote Originally Posted by altr
    Once the database has been restored, how can we apply the archive logs to roll the database forward in time so it is closer to the live server?
    .
    You need to set it up as a "standby" in order to "roll forward" If that is truly what you want to do.. Lookup/search for standby database. (configuration is much more manual and error prone for oracle 7.x)

    Quote Originally Posted by altr
    Trying the recover database gives no recovery required.
    Thats because none is required, Youve recovered the DB.

  9. #9
    Join Date
    Oct 2006
    Posts
    4

    standby

    Thanks again ixion.
    We do not backup online logs at the moment. It was our understanding that all that is required to get the database back up to the current point in time was to apply the archive log and the error we had was asking for the archive log.

    This log was on the backup yet it was as though Oracle ignored it. If we backup the online logs and restore them to the backup machine won't that upset Oracle?

    With regard to setting up as standby database, I could not find much information about doing that with version 7.3.2 - Can you suggest where I can get some help/information or can you suggest another way to achieve our goal?

    Also once the database is recovered, should you not be able to apply further archieve logs to bring it forward in time without the use of online logs if the database is running in ARCHIVELOG?

  10. #10
    Join Date
    Jun 2006
    Posts
    259
    Quote Originally Posted by altr
    Thanks again ixion.
    We do not backup online logs at the moment. It was our understanding that all that is required to get the database back up to the current point in time was to apply the archive log and the error we had was asking for the archive log.
    OK, well maybe you need to archive the last log using "alter system switch logfile" and back it up at the end of your backup... It seems your missing something...

    Quote Originally Posted by altr
    This log was on the backup yet it was as though Oracle ignored it. If we backup the online logs and restore them to the backup machine won't that upset Oracle?
    Nope.. Should work just fine.

    Quote Originally Posted by altr
    With regard to setting up as standby database, I could not find much information about doing that with version 7.3.2 - Can you suggest where I can get some help/information or can you suggest another way to achieve our goal?
    Googled and found this...
    http://www.geocities.com/kgkrish/dow...standby_73.pdf

    Quote Originally Posted by altr
    Also once the database is recovered, should you not be able to apply further archieve logs to bring it forward in time without the use of online logs if the database is running in ARCHIVELOG?
    No.... Archivelog mode causes archives to be generated not recovered. Standby will allow you to continue recovery of archived logs.

    You really should upgrade to oracle 10.2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width