This discussion is archived
2 Replies Latest reply: Jan 24, 2013 7:19 AM by User477708-OC RSS

switch database to copy

User477708-OC Journeyer
Currently Being Moderated
11.2.0.2
all datafiles in asm under +DATADG
put database in mount mode.
rman
allocate channel c1 as '+BUDATADG'
backup as copy; -- all datafiles are copied to +BUDATADG
switch database to copy; -- database now using the copied datafiles.

Is there an easy way to switch back to the datafiles on +DATADG without doing a full copy back and in effect reversing the steps?

something like "switch database to original"
  • 1. Re: switch database to copy
    moreajays Pro
    Currently Being Moderated
    Hi,

    There is no option to switch backup to original copy of datafiles , use same approach for previous +DATADG

    Thanks,
    Ajay More
    http://www.moreajays.com
  • 2. Re: switch database to copy
    User477708-OC Journeyer
    Currently Being Moderated
    moreajays wrote:
    Hi,

    There is no option to switch backup to original copy of datafiles , use same approach for previous +DATADG
    Just as an FYI: I played with this for a bit and there actually is a way to go back. When you switch to the copy, go to RMAN and do
    list copy of database;
    and I was surprised to see the original database files as a known copy. I tried to switch back
    switch database to copy;
    and it failed straight back over to the original files. I played a bit further, as long as in mount mode, it will switch seamlessly between both no problem. Any changes require a "recover database" for it to catch up.


    edit: working example noted here
    http://dba-tips.blogspot.ie/2011/11/switch-database-to-rman-copy-backup-and.html

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points