admin.databaseForeignMaster

admin.databaseForeignMaster(
   foreign-cluster-id as (Number|String),
   foreign-database-id as (Number|String),
   connect-forests-by-name as Boolean
) as element(db.foreignMaster)

Summary

This function returns a master database configuration. Use the output of this function in the admin:database-set-foreign-master function to set the master database configuration.

Parameters
foreign-cluster-id The ID of the foreign cluster containing the master host.
foreign-database-id The ID of the master database.
connect-forests-by-name Boolean that indicates whether to connect to forests by name. If fn:true, forests will automatically connect to/from foreign forests of the same name. If false, forests must be individually configured to replicate to/from foreign forests. Individual forest settings override the database level setting.

Example

  
  const admin = require('/MarkLogic/admin.xqy');
  var fdb = 476761383313557950
  var cfg = admin.getConfiguration()
  var fcl = admin.clusterGetForeignClusterId(cfg, "ClusterA")
  admin.databaseForeignMaster(fcl, fdb, fn.true())

   //Returns a master database configuration element.//Use the
   //admin.databaseSetForeignMaster function to set the
   //configuration. 
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy