BUILD:
Have a template ready for the database, check the /u01,/u02 , etc..
Should have same exact Structure on both servers, pre-create all necessary directories including OACLE_ADMIN/sid/audump, bdump, cdump, and so on.
Create the pfile for primary site (the sid =prod) DB_unique_name = prod_pri
Create the pfile for secondary site (the sid=prod) , exact same sid , DB_unique_name = prod_SBY (create spfile from pfile on both sites).
Create password file with user sys identic on both site.
Create exact same directories structure on the secondary site.
Create database prod using dbca on the secondary side.
Shutdown the primary and Startup mount; alter db crate controlfile for standby as '/tmp/stndby.ctl'.
Move the standby controlfile to secondary site /tmp.
Alter database add standby redolog…3 groups.(on the primary, if not already there)
Create rman account and catalog on primary (optional, rman can use controlfile too).
Configure rman channel, disk location ( /u04/rman/bkup), etc…
Do full RMAN backup including all logfiles+ controlfile for standby
Scp all the RMAN files to the secondary site
On the secondary site
Connect to target (check the sbid and be careful to connect to right DB)
Connect to auxiliary /
Run a duplicate database command with standby option, it should be successful (other wise standby database will not work), should not get any tablespace or media recovery error.
If issue with RMAN (manually copy all db files, control files, redo and archived ones to secondary)
Modify network files tnsnames.ora and listener.ora , reload listener on secondary
TEST:
Test order:
On the primary crate table and insert into it, wait few minutes
Archive log list to see the log seq number
1- startup mount (not needed is already mounted)
2- alter database recover managed database disconnect from session; should not get any errors
3- archive log list, see the sequences , should be the same last seq number, if not wait few minutes
4- alter database recover managed database cancel; should not get any error.
5- Alter database open read only; should not get any error.
6- Query the table, should see same as on the other site.
7- Go back to: 2 (disconnect from session) if error go back to step 1 , then (disconnect from session).
8- On the seconday standby side always check for mrp , do pps mrp , you should see ora_mrp0_sid
9- If not able to alter database recover managed database disconnect from session then shutdown, startup nomount, alter database mount; then do alter database recover managed database disconnect from session ; this should work fine.
Switch over:
P is current primary (is currently open for all operations)
1- from P , shutdown and startup (this is to disconnect all connections)
2- from S, alter database recover managed standby database cancel;
3- from P, alter system set log_archive_dest_state_2=defer;
4- from P, alter database commit to switchover to physical standby with session shutdown;
a. shutdown immediate
b. startup nomount
c. alter database mount (standby database);
d. check v$database and v$instance and archivelog list
5- go to standby site
6- recover managed standby database cancel;
7- alter database recover managed standby database cancel;
8- alter database commit to switchover to primary with session shutdown;
9- check the v$database and v$instance
10- Shutdown immediate
11- startup
12- alter system set log_archive_dest_state_2=enable;
go back to P,
alter database recover managed database disconnect from session ;
this should work fine., this enable the mrp0-sid process on the now standby side server.
goto TEST section and verify.
Caution : All materials are provided as research paper , we do not accept any reliability or responsibility in any case.
Use it at your own risks.
0 comments:
Post a Comment