Operating System - HP-UX
1753418 Members
4784 Online
108793 Solutions
New Discussion юеВ

Restore in Standby database

 
Kaustubh Kane
Advisor

Restore in Standby database

Hi,
We have a redundant system where we have two physical databases in redundant configuration. While performing backup we store the Record Id in our database image. While performing restore on Standby we compare the Record Id of the Active database with the Record Id in the image, if the two record ids are found to be equal then the restore is allowed to be performed else the restore is not performed.
In this way we make sure that we always restore the latest image (taken of the active database).

But we had faced an issue:
Say I am taking a backup on Active side and it failed at certain stage. The stage at which it failed was after the Record ID got incremented.

I am trying to restore the backup image on Standby. This image was taken before backup on Active started failing. As we compare the Record Id of the Active database with Record Id in the image the restore would fail (the record in Active got incremented when the backup process failed).

Now the situation is that we cannot take a backup on Active because it is failing and we cannot restore on Inactive because the Record Ids in Active database and backup image are not equal.

Could you please suggest some way?
Is comparing Record Ids between backup image and Active database the only way we can ensure that image used to restore on Inactive is the latest one? Please suggest.

Waiting for your kind reply.

Regards,
Kaustubh.
3 REPLIES 3
Berd
Trusted Contributor

Re: Restore in Standby database

What toolset are you using to perform the backup/restores ???
Kaustubh Kane
Advisor

Re: Restore in Standby database

Hi,
Basically we have created our own shell scripts for backup and restore. From these scripts we invoke the RMAN utility to perform the backup and restore.

Regards,
Kaustubh Kane.
Ben Dehner
Trusted Contributor

Re: Restore in Standby database

As best as I understand this issue, this is not a problem with Oracle, but a problem with your backup/restore procedures and scripts. Actually, two problems: 1) the backup no longer works, and 2) the restore won't run because of this "Record ID" problem. I'm not sure what this "Record ID" that you are referring to is, but I don't recognize it as part of Oracle or RMAN.

The basic thing you need to do is fix the backup problem. If the backup has failed, you don't want to try and restore to the standby anyway, regardless of the Record ID. If your current standby is from the most recent successful backup, there's probably no point in doing another restore until you get the backup problem fixed. If there is a more recent backup you want to restore from, then you need to fix the restore scripts so that you can override the Record ID check.

If you want to do a standby database, I'm confused why you are going through this complex backup/restore process at all. I'd strongly recommend looking at Oracle Dataguard. Once you have a physical standby database in place, Oracle uses the REDO and/or ARCHIVE logs to keep the standby in sync automagically.
Trust me, I know what I'm doing