We have to install MDM in my company but when i have a look on documentation bout command to start and stop script, i see :

MDM_script.png

So I am not very happy with this 🙁

So i have devellop one :

mdmadm> ksh mdm_master help

usage: mdm_master action [option1] [option2]

action can be start, stop, status, repair, backup

#### start ####

if “mdm_master  start” without option, it will ask you confirmation before starting/mounting each repository.

if “mdm_master start ALL”, it will start everything without asking confirmation.

if “mdm_master start ALL MOUNT”, it will start everything and just mount repositories (no start on them).

#### stop ####

if “mdm_master  stop” without option, it will ask you confirmation before stopping/unmounting each repository.

if “mdm_master stop ALL”, it will stop everything without asking confirmation.

if “mdm_master stop ALL MOUNT”, it will just stop repositories and let them mounted.

#### repair ####

if “mdm_master  repair” without option, it will ask you confirmation before checking/repairing each repository.

if “mdm_master repair ALL”, it will check/repair everything without asking confirmation.

#### backup ####

  if “mdm_master backup” without option, it will  backup of each repository without confirmation.


You need to configure config file for get some variable setup :

ORACLE_USER=

ORACLE_PASSWORD=

ADMIN_PASS_REPO=

DBHOST=

DBPORT=

ORACLE_HOME=

ORACLE_SID=

OS_USER=

OS_PASSWORD=

SYS_NUMBER_MDS=

SYS_NUMBER_MDIS=

SID_MDM=

LD_LIBRARY_PATH=/usr/sap/${SID_MDM}/MDS${SYS_NUMBER_MDS}/exe:$LD_LIBRARY_PATH:/usr/sap/${SID_MDM}/MDIS${SYS_NUMBER_MDIS}/exe

LOGICAL_HOSTNAME=

As you can see, even if you have several repositories, script need only one password. In fact, if the Admin’s password is not the password define in config file, script will setup it to the password define in the config file with clix repEmergencyAdminUserSetPassword command. 😛


Please find config file and script  here :

mathieugravil-coding/shell/SAP/MDM at master · mathieugravil/mathieugravil-coding · GitHub


Some example :

mdmadm> ksh mdm_master start

ZJ2 is UP

SAP service /usr/sap/MDM/MDS10/exe/sapstartsrv is UP

SAP service /usr/sap/MDM/MDIS11/exe/sapstartsrv is UP

mds.sapMDM_MDS10 is UP

mdis.sapMDM_MDIS11 is UP

Used ports: 2015 2016 2017 2012 2013 2014 2009 2010 2011 2006 2007 2008 2003 2004 2005 2000 2001 2002

Repo to be mounted:

Repo already mounted but to be started: SRM_MDMTEST_REP SRM_MDM_DEV01_MAIN_MAS SRM_MDM_DEV_SRM7_MAS SRM_MDM_FIORI_DEV SRM_MDM_FIORI_QUAL TEST_TEMP

SRM_MDMTEST_REP SRM_MDM_DEV01_MAIN_MAS SRM_MDM_DEV_SRM7_MAS SRM_MDM_FIORI_DEV SRM_MDM_FIORI_QUAL TEST_TEMP

o Starting of repository :

Are you sure you want to start SRM_MDMTEST_REP  (yes/no)?yes

o I will try to start SRM_MDMTEST_REP :

  OK: repStart is done on SRM_MDMTEST_REP

Are you sure you want to start SRM_MDM_DEV01_MAIN_MAS  (yes/no)?no

Nothing done

Are you sure you want to start SRM_MDM_DEV_SRM7_MAS  (yes/no)?no

Nothing done

Are you sure you want to start SRM_MDM_FIORI_DEV  (yes/no)?no

Nothing done

Are you sure you want to start SRM_MDM_FIORI_QUAL  (yes/no)?no

Nothing done

Are you sure you want to start TEST_TEMP  (yes/no)?no

Nothing done

mdmadm> ksh mdm_master status

o STATUS OF DB :

ZJ2 is UP

o STATUS OF SAPSERVICES :

SAP service /usr/sap/MDM/MDS10/exe/sapstartsrv is UP

SAP service /usr/sap/MDM/MDIS11/exe/sapstartsrv is UP

o STATUS OF MDM SERVER  :

mds.sapMDM_MDS10 is UP

o STATUS OF MDM IMPORT SERVER  :

mdis.sapMDM_MDIS11 is UP

o STATUS OF REPOSITORIES  :

SRM_MDMTEST_REP # has status #STOPPED# and it use port #2000#.

SRM_MDM_DEV01_MAIN_MAS # has status #STOPPED# and it use port #2003#.

SRM_MDM_DEV_SRM7_MAS # has status #STOPPED# and it use port #2006#.

SRM_MDM_FIORI_DEV # has status #STOPPED# and it use port #2009#.

SRM_MDM_FIORI_QUAL # has status #STOPPED# and it use port #2012#.

TEST_TEMP # has status #STOPPED# and it use port #2015#.

mdmadm>  ksh mdm_master backup

BACKUP

o WARNING : Doing  backup on STARTED repo, could be not a good idea, but i will try to do it  for SRM_MDMTEST_REP :

o I will try to backup SRM_MDMTEST_REP in /usr/sap/MDM/MDS10/mdm/archives/SRM_MDMTEST_REP_160209.a2a :

  OK: cpyArchive is done on SRM_MDMTEST_REP

o I will try to backup SRM_MDM_DEV01_MAIN_MAS in /usr/sap/MDM/MDS10/mdm/archives/SRM_MDM_DEV01_MAIN_MAS_160209.a2a :

  OK: cpyArchive is done on SRM_MDM_DEV01_MAIN_MAS

o I will try to backup SRM_MDM_DEV_SRM7_MAS in /usr/sap/MDM/MDS10/mdm/archives/SRM_MDM_DEV_SRM7_MAS_160209.a2a :

  OK: cpyArchive is done on SRM_MDM_DEV_SRM7_MAS

o I will try to backup SRM_MDM_FIORI_DEV in /usr/sap/MDM/MDS10/mdm/archives/SRM_MDM_FIORI_DEV_160209.a2a :

  OK: cpyArchive is done on SRM_MDM_FIORI_DEV

o I will try to backup SRM_MDM_FIORI_QUAL in /usr/sap/MDM/MDS10/mdm/archives/SRM_MDM_FIORI_QUAL_160209.a2a :

  OK: cpyArchive is done on SRM_MDM_FIORI_QUAL

o I will try to backup TEST_TEMP in /usr/sap/MDM/MDS10/mdm/archives/TEST_TEMP_160209.a2a :

  OK: cpyArchive is done on TEST_TEMP




Enjoy !!!

Don’t hesitate to make remarks !!

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply