Starting Repositories within in a clustered environemt

[] [] [] [] [] [] [] []

Symptom

You are using SAP NetWeaver MDM in a clustered environment.
A) You want to start the repositories with the cluster group
B) After a failover scenario the repository can not be loaded any more as it seems to be locked by another MDM Server

Other terms

MDS, Autostart, repository locked

Reason and Prerequisites

In case of a failover of the DB or MDM Server, the state of the repository can be indefinite.
Therefore it might happen that the repository can not be loaded without some additional actions.

Solution

Find attached to this SAP Note an example script to load a dedicated repository. This script is a template that can be adopted and extended to fulfill your requirements.
Edit the attached script to suit your environment as described in the header of the script.
Create cluster resource of Generic Application type, in the resource Advanced tab toggle ‘do not restart’; in the Parameters tab in the command line field enter location to the script.
In the mds.ini file change Autostart=0.

Usage:

The script is for usage within a clustered environment to start a dedicated repository programmatically.
In case the repository is loaded, the script will get into a idle mode (will not return)
–> The cluster resource will become and stay online
In case a repository can not be loaded, the script will exit (with a return code different than 0).
–> The cluster resource will fail
Using a script is more save than using the Autostart=true option in the mds.ini file as the script provides some more features that are required in a failover scenario, such as unlocking a repository.
The script is using the MDM CLIX commands to operate with the MDM Server.

Cluster:
The script needs to be triggered after the MDS instance has become online. Make sure the dependencies are set correctlyMake sure that the script will not trigger a failover if the script fails.If the script fails, a manual check needs to be done as all automated tries to get the repository loaded have failed.You can have more than one script in you cluster group to load multiple repositoriesThe script can not be used to monitor a repository

Content / Execution steps:

Synchronization:
1. Wait for the MDM Server to become responsive

Accessibility to make sure that CLIX commands can retrieve status:
2. check if the MDM Server can be accessed3. check if the repository exist on the MDM Server4. check if the repository status can be retrieved

Repository Load Procedure – Part 1:
5. if the repository is already loaded got to idle mode6. unlock (appropriate) the repository if it is in a locked stated7. Load the repository with reusing indices8. if the repository is loaded got to idle mode9. Load the repository with rebuilding indices as the first load was not successful10. if the repository is loaded got to idle mode

Repository Load Procedure – Part 2:
11. create an archive of the repository12. initiate a repair of the repository13. Load the repository with rebuilding indices14. if the repository is loaded got to idle mode, if the repository is still not loaded there is a issue with the repository which requires a manual check. So stop with error

Remark:
The script is just a templateThe script does not make the claim to be completeThe script is just to give an orientation for a customer development

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Leave a Comment