dbcreate

Build 1501 on 14/Nov/2017  This topic last edited on: 22/Mar/2016, at 16:27

dbcreate [-<option> . . .]

Creates a database from scratch with multiple file groups, each possible split in multiple files, and sized based on an estimate of the overall system size.

This command is available in version 1.4 and newer.

Options

[-datadirs] <string>

Root folder to place data files

[-logdir] <string>

root folder to place log files

[-cores] <integer>

The number of cores is used to split the data in multiple files: as is best practice each file group in the database is split in as many files as there are cores. The number of cores should be the actual number of cores that the database server can use, not counting hyper threading

[-size] <integer>

The size is a value from 0 (small) to 3 (extra-large) that estimates the overall size of the system. Depending on this value srv4 will create more or less different file groups and will select the initial and auto-growth sizes for each file. The actual sizes have not been finalized yet - we are collecting data from real-world installations to offer sensible pre-defined values.

[-s] <string>

Path to schema file, typically ..\Config\Schemas\GN4.xsd

[-config] <string>

Path to config file, typically Editorial_InstallConfig.xml

[-d] <string>

Path to data file, typically ..\Config\Data\GN4Data.xml

Example 1

srv4 dbcreate -datadirs e:\data -logdir f:\data -cores 1 -size 0 -s ..\Config\Schemas\GN4.xsd -d ..\Config\Data\GN4Data.xml  

creates a new database, placing the data files in 'e:\data', the log file in 'f:\data', assuming that the database server has 1 core ('-cores 1'), using the mimimum pre-defined size ('-size 0'), reading the schema from '..\Config\Schemas\GN4.xsd' (as 'srv4 dbupdate'), reading the initialization data from '..\Config\Data\GN4Data.xml'.

The name of the database to create, as well as the database connection parameters are read from the application settings as usual.

The number of cores is used to split the data in multiple files: as is best practice each file group in the database is split in as many files as there are cores. The number of cores should be the actual number of cores that the database server can use, not counting hyper threading.

The size is a value from 0 (small) to 3 (extra-large) that estimates the overall size of the system. Depending on this value srv4 will create more or less different file groups and will select the initial and auto-growth sizes for each file. The actual sizes have not been finalized yet - we are collecting data from real-world installations to offer sensible pre-defined values.

The new database will have a single log file, a small primary file group comprising a single file and up to four other file groups - 'Objects', 'BinaryData', 'Audit' and 'Transient' - that can be split in multiple files.

The primary file group contains only the system tables, 'BinaryData' contains the binary data table ('gn_BinaryData'), 'Audit' contains all auditing and versioning tables (gn_AuditTable, gn_VersionTable, gn_TaskLogTable etc.), 'Transient' contains transient data that is periodically removed (i.e. the pending scheduled tasks - gn_TaskTable, the full-text index queue - gn_IndexQueue etc.) and finally 'Objects' contains all other tables, including all the tables generated from the schema ('s_XXXX').

'Objects' is the default file group.

'Objects' is always present, the other file groups are created or not depending on the selected database size.

Example 2

srv4 dbcreate -datadirs p:\,q:\,r:\,s:\ -logdir z:\ -cores 8 -size 3 -config ..\Config\Editorial_InstallConfig.xml

creates an extra large database ('-size 3') with the standard editorial configuration for an 8 core server, so each file group (beside the primary one) will be split in 8 files, distributed on the 'p', 'q', 'r' and 's' disks, and the log file will be on the 'z' disk.

See also

dbupdate