Loading TOC...

MarkLogic 12 EA 2 Product Documentation
admin:cluster-get-foreign-replica-databases

admin:cluster-get-foreign-replica-databases(
   $config as element(configuration),
   $foreign-cluster-id as xs:unsignedLong,
   $database-ids as xs:unsignedLong*
) as element(db:foreign-replicas)*

Summary

This function is executed on the master cluster to return the replication configuration for the specified local database to the specified foreign replica cluster.

Parameters
config A configuration specification, typically as returned from one of the Admin module functions.
foreign-cluster-id The ID of the foreign replica cluster.
database-ids The ID of the master database on the local cluster.

Example


  (: This function must be executed on the master cluster. :)

  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin"
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $dbid := admin:database-get-id($cfg, "Documents")

  for $cid in admin:cluster-get-foreign-cluster-ids($cfg)
      return admin:cluster-get-foreign-replica-databases($cfg, $cid, $dbid)

  (: Returns the database replication configuration for the Documents
     database to all of the replica clusters. :)
     

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.