MarkLogic Server 11.0 Product Documentation
tieredstorage:database-create-sub-database

tieredstorage:database-create-sub-database(
   $dbid as xs:unsignedLong,
   $database-name as xs:string,
   [$kind as xs:string]
) as empty-sequence()

Summary

This function creates a database with the name $database-name and make the created database the sub database of the database designated by $database-id. The newly created database inherits the configuration of the original database. For details, see Creating a Super-database in the Administrator's Guide.

Parameters
dbid ID of the database as super-database of the one to be created.
database-name Name of the new database.
kind active or archive, where active is the default. If $kind is archive, the newly created database will have the following configuration set automatically: index detection none, expunge locks none, reindexer enable false, rebalancer enable false, format compatibility 5.0.

Example

xquery version "1.0-ml";
import module namespace ts="http://marklogic.com/xdmp/tieredstorage" 
          at "/MarkLogic/tieredstorage.xqy";

ts:database-create-sub-database(xdmp:database("Documents"),"subdb")
=>
()
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy