info:database-create( $database-name as xs:string, [$forests-per-host as xs:positiveInteger?], [$group as xs:string?], [$data-directory as xs:string?], [$security-db as xs:string?], [$schemas-db as xs:string?], [$triggers-db as xs:string?] ) as xs:unsignedLong
[DEPRECATED] This function creates a database with attached forests. Forests are named sequentially using the
pattern of databasename-1, databasename-2 and so on. The API checks for database and forest name conflicts,
throwing an INFO-DUPLICATENAME error if any name conflicts are encountered. The database is
created with default index settings. If $forests-per-host
is an empty sequence or
omitted, only one forest (regardless of number of hosts) is created. If database creation succeeds,
the database id is returned.
xquery version "1.0-ml"; import module namespace info = "http://marklogic.com/appservices/infostudio" at "/MarkLogic/appservices/infostudio/info.xqy"; info:database-create( "newDB", 2, "Default", "/foobar", "Security", "Schemas", "Triggers") (: Creates a new database, named "newDB," and attaches to it two forests. :)