Hello Folks, here I am with very old topic of system migration. And since you are here, you must want to know more about advanced migration procedure distribution monitor. And I am ensuring you that after reading this you can use this option like a champ.
I am not going to explain all the stuff like what, why etc. but yes here you will definitely find the answer on how to use it?
For simplifying the usage I clubbed Distribution Monitor with SWPM.
Here, below are the assumptions.
- NfsShare:/shared mount point is shared to all servers ( Source DB, Target DB, Host1 Host2,….. Host<n> )
- Download DISTMON.SAR ( SAP Note: 855772 )
- I am assuming that you are well versed with export/import optimization if not there already is a lot of material available online.
- In this blog, our source system is non-unicode and target will be unicode, Unicode related task are already completed in the source system.
- Source and Target DB is Oracle.
Follow basic steps which you are following from so long for migration procedure:
- Run Export Preparation in the source DB system. (It will Generate DBSIZE file)
- Prepare Target system and Select Run Migration Monitor Manually in SWPM options.
- Once you continue with SWPM on target system it will stop at Import ABAP screen.
Now Real Downtime begins…
- Perform table splitting using SWPM.
- Start DB Export of the source system and Select Run Migration Monitor Manually in SWPM Export options.
Yes, small trick is needed to start the fun… As we know, the basic execution flow of SWPM is as below.
SWPM will perform all the task as per SAP standard and stop at Migration monitor step here we will use distribution monitor to distributor the load between the servers.
Now lets start with Distribution Monitor Preparation.
- Below is the file structure and the binaries we require on Host1 and Host2.
|File Structure||Content Description|
|Host1:/Local/Java||Host2:/Local/Java||latest Java Runtime Environment|
|Host1:/Local/OracleClient||Host2:/Local/OracleClient||Uncar Oracle Client|
|Host1:/Local/oracon_exp||Host2:/Local/oracon_exp||Source: tnsname.ora, sqlnet.ora and SSFS_SID.DAT|
|Host1:/Local/oracon_imp||Host2:/Local/oracon_imp||Target: tnsname.ora, sqlnet.ora and SSFS_SID.DAT|
It’s recommended to put all folder on local mount point apart from /shared/exp.
- Now we have to Run DM in the Preparation Mode for which lets prepare distribution_monitor_cmd_properties file in /Local/DistributionMonitor1
Note: Known Issue Copy *.TPL file from DB to DATA folder
- Once File is ready execute ./distributionmonitor.sh -p on any host, distribution monitor will check all directory structure and created *TPL, *.SQL, *.WHR files in respective directory.
Note: Known Issue Copy .SQL / .LST from ddl directory to host1/DB/ORA/ and host2/DB/ORA/
After successful preparation Start Distribution Monitor in Export mode on each node (host1 and host2).
Note: copy distribution_monitor_cmd_properties used for preparation from /Local/DistributionMonitor1 to /Local/DistributionMonitor2
- Set Export Environment for the connectivity to the source DB server.
Run : /distribution_monitor.sh -e [On host1 and host2]
- Similarly open two more session and set Import environment and start import process.
Run : ./distribution_monitor.sh -i [On host1 and host2]
After Export and import is completed copy *.log and *.TSK file from both host1/importinstalldir and host2/importinstalldir to working directory of target SWPM and click on next button in the SWPM webgui page, it will check tsk file for missing object if any and continue with the other SWPM steps.
- You can use order by just create order_by.txt file in the DISTMON directory.
- In this blog table distribution is done automatically by distribution monitor but we can edit distribution.txt in the DISTMON directory and decide table or package distribution between different host during the preparation phase.
- You can run preparation phase for N no. of times.
- For checking the status run ./distribution_monitor.sh -d [Display Mode]
- For Failed tasks check *.log files in exportinstalldir & importinstalldir in the respective host.
- For changing no. of job during the run time change jobNum parameter in import_monitor_cmd.properties & export_monitor_cmd.properties files. You will find these files in DistributionMonitor<X> folder.
- Do not set jobNum=0 it will start all the R3 jobs from the queue.
- I have not created any additional user on host1 or host2, just set the environment for export or import for any user having access to the file structure. In my case I have used root user.
Thanks for your time.
This blog is for sharing knowledge, do give it a try.
Goodbye and see you next time!