How to use the nhSynchronize command

Document ID : KB000023570
Last Modified Date : 14/02/2018
Show Technical Document Details

 

Questions:
How to use the nhSynchronize command?
nhSychronize command syntax?
How to obtain the latest object information from the cluster systems?

Environment:

eHealth Distributed Reporting

 

Answer:

The nhSynchronize command synchronizes one or more eHealth systems in the cluster. It retrieves object information from the other systems and updates the local eHealth cluster system. (The Distributed eHealth Consoles run this command as a scheduled job to obtain the latest object information from the cluster systems.)

The command has the following syntax:



nhSynchronize [-h] [-rev] { -host hostname - -cluster }
{ -objTypeAll - -objType objType - -objTypeList }
{ -allObjects - -name objName - -id objId } [-retryTime seconds]



The following table describes the command arguments.



nhSynchronize Command Arguments



Argument Description
-h Displays the help for the command.

-rev Displays the eHealth software revision information.

-host hostname Updates the local system with the replicated information from the specified eHealth system. This argument is required unless you specify -cluster.

-cluster Updates the local system with the replicated information from all of the other eHealth systems in the cluster. This argument is required unless you specify -host.

-objTypeAll Synchronize the information for all object types. This is the default.

-objType objType Synchronize the information for the specified object type. You can select one of the following object type values:
? element
? group
? groupSection
? groupList
? groupListContents
? dataAnalysisRec
? serviceProfile



-objTypeList Displays the list of supported object types.

-allObjects Synchronizes all objects of the specified object type. This is the default.

-name objName Synchronizes the object that has the name objName.

-id uid Synchronizes the object with the specified unique ID (uid). The uid is a combination of the member ID of the system where the object was created and the database ID for the object. It has a format similar to the following: 739249213 @ 1000001



-retryTime seconds Specifies how long in seconds the local system will retry the command. If the command fails due to an internal problem (for example, the system connection to the network is down), eHealth reissues the command for the specified retry time. The default is 0, which indicates that the local system will not retry the command. If you specify a value, it should be less than the value of the NH_REPL_MSG_TIMEOUT environment variable, which is 5 minutes by default.



Example:



The following command updates the local system with the object information from the system named eire:



nhSynchronize -host eire



Cluster Sync initiated:
Synchronizing objects of type group .. OK
Synchronizing objects of type groupList .. OK
Synchronizing objects of type groupListContents .. OK
Synchronizing objects of type serviceProfile .. OK
Synchronizing objects of type dataAnalysisRec OK



In the example command, note that there are no periods (.) in the status line for the dataAnalysisRec objects. When the local system and the -host system are both Distributed eHealth Systems, they do not synchronize data analysis records. Thus this step is omitted (which the command indicates by not displaying periods at the end of the status line for that object type).



The following command synchronizes all systems in the cluster except the local system:



nhSynchronize -cluster



Cluster Sync initiated:
Synchronizing objects of type group ..... OK
Synchronizing objects of type groupList ..... OK
Synchronizing objects of type groupListContents ..... OK
Synchronizing objects of type dataAnalysisRec ..... OK

Review the Distributed eHealth Admin Guide For more information on eHealth Distributed reporting.

.


Additional Information:
About Replication and Synchronization
eHealth uses replication to "push" information about the objects defined within an eHealth system in the cluster to one, more, or all other eHealth systems in the cluster. The synchronization process "pulls" information from one or more of the other cluster systems to update the local system.

NOTE: The replication and synchronization processes are essentially the same process?but they occur as a result of different commands. Replication occurs when a local system updates one or more other systems. Synchronization occurs when the local eHealth system updates itself with information obtained from one or more other eHealth systems.

For more details on the nhReplicate command, go to How to use the nhReplicate command