Loading TOC...

MarkLogic 9 Product Documentation
admin:save-configuration-without-restart

admin:save-configuration-without-restart(
   $config as element(configuration)
) as xs:unsignedLong*

Summary

This function saves a configuration specification to the cluster configuration files, without restarting MarkLogic Server. If you use this function to save any changes that require a server restart ("cold" changes such as App Server port assignment changes), then the changes will not take effect until the next time MarkLogic Server restarts (although they will be saved in the configuration). If you want MarkLogic Server to automatically restart when needed, use admin:save-configuration instead.

Parameters
config A configuration specification, typically as returned from one of the Admin module functions.

Required Privileges

This operation requires at least one of the following privileges:

http://marklogic.com/xdmp/privileges/admin-module-write

http://marklogic.com/xdmp/privileges/xdmp-write-cluster-config-file

http://marklogic.com/xdmp/privileges/xdmp-write-cluster-config-file/{filename}

Usage Notes

The return value is a list of the host IDs that need to be restarted in order for the changes to take effect.

Example


  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  let $spec := admin:forest-set-enabled($config,
    xdmp:forest("myForest"), fn:true() )
  return
  admin:save-configuration-without-restart($spec)
  

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