xdmp:set-transaction-name( $name as xs:string, [$host-id as xs:unsignedLong], [$txn-id as xs:unsignedLong] ) as empty-sequence()
Set the name of a local or remote transaction.
http://marklogic.com/xdmp/privileges/xdmp-set-transaction-name-my
http://marklogic.com/xdmp/privileges/xdmp-set-transaction-name-any
If the transaction already has a name, it is overwritten with the new name.
If the specified transaction does not exist, XDMP-NOTXN
is raised.
If host-id is not found or MarkLogic Server is not available
on that host, the exception XDMP-HOSTOFFLINE
is raised.
xdmp:set-transaction-name("myTransaction") => Set the name of the current transaction in the current local session to "myTransaction".
xdmp:set-transaction-name("myTransaction", xdmp:host("some-host.marklogic.com"), $txn-id) => Set the name of the given transaction on the remote host some-host.marklogic.com to "myTransaction".