Please find the steps that I have followed,
1.Move Rman backup to Standby Server,
sql>startup nomount;
>rman target /
rman > restore standby controlfile from
'/backup/rman/hhhhh';
rman> sql "alter database mount standby
database"
rman > catalog backuppiece '/backup/rman/hhhh';
rman > catalog backuppiece '/backup/rman/hhhh';
run
{
set newname for datafile 4 to
'/oradata1/db/data/users01.dbf';
set newname for datafile 3 to '/oradata1/db/data/undotbs01.dbf';
set newname for datafile 2 to
'/oradata1/db/data/sysaux01.dbf';
set newname for datafile 1 to
'/oradata1/db/data/system01.dbf';
set newname for datafile 5 to
'/oradata1/db/data/undotbs02.dbf';
set newname for datafile 6 to
'/oradata1/db/data/indx_1.dbf';
set newname for datafile 7 to '/oradata1/db/data/16k.dbf';
set newname for datafile 8 to '/oradata1/db/data/bs.dbf';
set newname for datafile 9 to
'/oradata1/db/data/er.dbf';
set newname for datafile 10 to '/oradata1
db/data/prod.dbf';
set newname for datafile 11 to
'/oradata2/db/data/prod_2.dbf';
set newname for datafile 12 to
'/oradata2/db/data/prod_3.dbf';
set newname for datafile 13 to
'/oradata2/db/data/prod_4.dbf';
set newname for datafile 14 to '/oradata2/db/data/rman.dbf';
set newname for datafile 15 to '/oradata2/db/data/om.dbf';
set newname for datafile 16 to '/oradata2/db/data/om_1.dbf';
set newname for datafile 17 to '/oradata2/db/data/ys.dbf';
set newname for datafile 18 to
'/oradata2/db/data/example.dbf';
set newname for datafile 19 to
'/oradata2/db/data/prod_5.dbf';
set newname for datafile 20 to '/oradata2/db/data/01.dbf';
set newname for datafile 21 to
'/oradata2/db/data/system02.dbf';
set until scn 2281756927;
Restore database;
Switch datafile all;
Recover database;
}
sql> Recover standby database;
2.To open the database,
sql> Alter database recover managed standby database
finish force;
sql>Alter database commit to switchover to primary;
sql>alter database open;
(While opening the database, it will try to create redologs
on the specified path in controlfile.
If that path physically does not exist, it will fail.. We
can create new redolgs here by specifying rename command -SQL)
>lsnrctl start
No comments:
Post a Comment