MarkLogic Server 11.0 Product Documentation
tieredstorage.databaseCreateSubDatabase

tieredstorage.databaseCreateSubDatabase(
   dbid as (Number|String),
   database-name as String,
   [kind as String]
) as null

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

const ts = require('/MarkLogic/tieredstorage');

declareUpdate();
ts.databaseCreateSubDatabase(xdmp.database('Documents'), 'subdb');
   
Powered by MarkLogic Server | Terms of Use | Privacy Policy