The objective is "How to move the data guard standby server to new sever" this could be due to Data center migration.
This we can perform using RMAN Auxiliary in DR new server and connection to remote old DR server.
Which rman Auxiliary command can copy the datafile from old to new server then we can twick the tns for log ship to new server in PROD.
Note: The New server Oracle Grid,Oracle Home,storage ASM disk group, are similar to the New server.
Step-1:
Copy InitSID.ora and orapwSID* from DR1 to DR2
create pfile='/tmp/initSID.ora' from spfile;
scp /tmp/initSID.ora NEW_DR_HOST_IP:/tmp
scp orapwBTZFC* NEW_DR_HOST_IP:/u01/app/oracle/product/11.2.0/db_1/db
Step-2:
Update tnsname.ora in the New DR Server
/u01/app/11.2.0/grid/network/admin
/u01/app/oracle/product/11.2.0/db_1/network/admin
SID_old = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = OLD_DR_HOST_IP)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SID) (UR = A)))
SID_new = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = NEW_DR_HOST_IP)(PORT = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SID)(UR = A)))
SID = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = NEW_DR_HOST_IP)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SID)(UR = A)))
Step-3:
Add new listener in GRID home with different port,So that we will not use the scan listener for RMAN auxiliary.
DRListener =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = NEW_DR_HOST_IP)(PORT = 1522))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
)
)
SID_LIST_DRListener =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
(SID_NAME = SID)
)
)
lsnrctl start DRListener
Step-4:
Update tnsname.ora in the Old DR Server
/u01/app/oracle/product/11.2.0/db_1/network/admin
SID_old = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = OLD_DR_HOST_IP)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SID) (UR = A)))
SID_new = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = NEW_DR_HOST_IP)(PORT = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SID)(UR = A)))
Step-5:
Cancel the recover and start the old DR in read only mode.
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE cancel;
alter database open read only;
Step-6:
Start up nomount the db in new DR server and perform RMAN Auxiliary.
SQL>startup nomount;
and in RMAN perform duplication.
[oracle@ ]$rman target sys/*****@SID_old auxiliary sys/*****@SID_new
RMAN> duplicate target database for standby from active database nofilenamecheck;
.......
.......
.......
datafile 13 switched to datafile copy
input datafile copy RECID=1185 STAMP=880973915 file name=+ASM_DATA01/btzfcstd/datafile/obip.355.880973047
Finished Duplicate Db at 29-MAY-15
RMAN>
Now start the recovery.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
Step-7:
Once done update the prod tns host name to new server DR server IP.
/u01/app/11.2.0/grid/network/admin
/u01/app/oracle/product/11.2.0/db_1/network/admin
and check logs are shipping to new DR server.
MISC:
SELECT MESSAGE FROM V$DATAGUARD_STATUS;
select error,status from gv$archive_dest where dest_id=2;
alter system set log_archive_dest_state_2=defer;
alter system set log_archive_dest_state_2=enable;
select error,status from gv$archive_dest where dest_id=2;
select thread#, max(sequence#) from v$log_history group by thread# order by thread#;
This we can perform using RMAN Auxiliary in DR new server and connection to remote old DR server.
Which rman Auxiliary command can copy the datafile from old to new server then we can twick the tns for log ship to new server in PROD.
Note: The New server Oracle Grid,Oracle Home,storage ASM disk group, are similar to the New server.
Step-1:
Copy InitSID.ora and orapwSID* from DR1 to DR2
create pfile='/tmp/initSID.ora' from spfile;
scp /tmp/initSID.ora NEW_DR_HOST_IP:/tmp
scp orapwBTZFC* NEW_DR_HOST_IP:/u01/app/oracle/product/11.2.0/db_1/db
Step-2:
Update tnsname.ora in the New DR Server
/u01/app/11.2.0/grid/network/admin
/u01/app/oracle/product/11.2.0/db_1/network/admin
SID_old = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = OLD_DR_HOST_IP)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SID) (UR = A)))
SID_new = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = NEW_DR_HOST_IP)(PORT = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SID)(UR = A)))
SID = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = NEW_DR_HOST_IP)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SID)(UR = A)))
Step-3:
Add new listener in GRID home with different port,So that we will not use the scan listener for RMAN auxiliary.
DRListener =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = NEW_DR_HOST_IP)(PORT = 1522))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
)
)
SID_LIST_DRListener =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
(SID_NAME = SID)
)
)
lsnrctl start DRListener
Step-4:
Update tnsname.ora in the Old DR Server
/u01/app/oracle/product/11.2.0/db_1/network/admin
SID_old = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = OLD_DR_HOST_IP)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SID) (UR = A)))
SID_new = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = NEW_DR_HOST_IP)(PORT = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SID)(UR = A)))
Step-5:
Cancel the recover and start the old DR in read only mode.
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE cancel;
alter database open read only;
Step-6:
Start up nomount the db in new DR server and perform RMAN Auxiliary.
SQL>startup nomount;
and in RMAN perform duplication.
[oracle@ ]$rman target sys/*****@SID_old auxiliary sys/*****@SID_new
RMAN> duplicate target database for standby from active database nofilenamecheck;
.......
.......
.......
datafile 13 switched to datafile copy
input datafile copy RECID=1185 STAMP=880973915 file name=+ASM_DATA01/btzfcstd/datafile/obip.355.880973047
Finished Duplicate Db at 29-MAY-15
RMAN>
Now start the recovery.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
Step-7:
Once done update the prod tns host name to new server DR server IP.
/u01/app/11.2.0/grid/network/admin
/u01/app/oracle/product/11.2.0/db_1/network/admin
and check logs are shipping to new DR server.
MISC:
SELECT MESSAGE FROM V$DATAGUARD_STATUS;
select error,status from gv$archive_dest where dest_id=2;
alter system set log_archive_dest_state_2=defer;
alter system set log_archive_dest_state_2=enable;
select error,status from gv$archive_dest where dest_id=2;
select thread#, max(sequence#) from v$log_history group by thread# order by thread#;
1 comment:
Data center migrationis a multi-step process that involves a lot of careful planning. Cloud migration technologies are similar to their physical data center counterparts, though they often offer a different way of performing the migrations.
Post a Comment