Created
November 23, 2017 09:15
-
-
Save ableasdale/e4fee1e1d0f8066871a06aa9a7d97925 to your computer and use it in GitHub Desktop.
MarkLogic: Get Database Configurations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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