flexrep:configuration-delete( $domain-id as xs:unsignedLong ) as empty-sequence()
This function deletes a replication configuration. This removes the configuration document as well as any other documents that were created to track replication state. The properties that track state within individual documents are not removed.
Parameters | |
---|---|
domain-id | The ID of the replicated domain. |
xquery version "1.0-ml"; import module namespace flexrep = "http://marklogic.com/xdmp/flexible-replication" at "/MarkLogic/flexrep.xqy"; (: Obtain the domain ID from the database used by the Master to enable CPF. :) let $domain := xdmp:eval( 'xquery version "1.0-ml"; import module namespace dom = "http://marklogic.com/cpf/domains" at "/MarkLogic/cpf/domains.xqy"; fn:data(dom:get( "Replicated Content" )//dom:domain-id)', (), <options xmlns="xdmp:eval"> <database>{xdmp:database("MyTriggers")}</database> </options>) return flexrep:configuration-delete($domain) (: Deletes the replication configuration for the "Replicated Content" domain. :)
http://marklogic.com/xdmp/privileges/flexrep-admin