Re: Duplicating from copy of a standby with standby controlfile

  • From: Mark Burgess <mark@xxxxxxxxxxxxxxxxxxxxxxxxx>
  • To: don@xxxxxxxxx, Niall Litchfield <niall.litchfield@xxxxxxxxx>
  • Date: Tue, 11 Feb 2014 09:29:55 +1100

We do this with a combination of ZFS snapshots and clones from the standby 
database - no backupsets as such.

The method we have implemented to have the correct controlfile in place is:

1. Stop media recovery on the standby database.
2. Take the ZFS snapshot and clone of the relevant file systems.
3. Mount the snapshot database - this needs the control_files parameter 
pointing to the location of the clone file system.
4. Rename the redo logs - SQL script does this.
5. Rename the datafiles - we use RMAN to catalog the datafile copies and then 
do a switch to copy.
6. Backup the existing controlfile and restore the controlfile <— this is the 
important bit as it gives you a normal control file and not a standby 
controlfile.
7. Recover until cancel on the database using backup controlfile.
8. Open database with reset logs.

I have this scripted up - the database piece is independent of the method used 
to provide the copy of the datafiles.

I can send through the scripts if you are interested.

Regards,

Mark Burgess




On 11 February 2014 at 8:39:13 am, Don Seiler (don@xxxxxxxxx) wrote:

OK I've played a little more with the duplicate steps (using target-less 
duplication with BACKUP LOCATION specification) and so far it seems to only 
work with backups, not with datafile copies. I'd like to keep using the 
datafile copy method as it saves time, and our database is nearly 25Tb. 
Creating a "backup as copy" of the database and remounting the disks saves us 
from having to backup and then restore the datafiles which would take far too 
much time.

Like I said, this method works great but so far requires a primary controlfile. 
It's really only an extra step when we do the refresh from the standby side but 
I'd like to see if we can do it without having to do that step, just to 
simplify and script as much as possible.


On Sat, Feb 8, 2014 at 1:46 PM, Don Seiler <don@xxxxxxxxx> wrote:
Version is 11.2.0.3. I'll explore the duplicate options. Anyone done it with 
data file copies target than backup set? I'd rather not do active our require 
connection to primary or standby other than the initial backup as copy.

Other related posts: