Skip to content

Instantly share code, notes, and snippets.

@ableasdale
Created November 23, 2017 09:15
Show Gist options
  • Save ableasdale/e4fee1e1d0f8066871a06aa9a7d97925 to your computer and use it in GitHub Desktop.
Save ableasdale/e4fee1e1d0f8066871a06aa9a7d97925 to your computer and use it in GitHub Desktop.
MarkLogic: Get Database Configurations
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy";
declare namespace db = "http://marklogic.com/xdmp/database";
declare variable $configurations := admin:database-copy(admin:get-configuration(), xdmp:database("Documents"), "XXXXXXXXXXXXXXX");
for $i in $configurations/db:databases/db:database
where fn:not($i/db:database-name eq "XXXXXXXXXXXXXXX")
order by $i/db:database-name ascending
return $i;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment