company logo

DatabaseHandle :: InitDataArea - Initialize DataArea

The function allows initializing a new data area. Data areas must be created consecutive order. A data area 0 is created automatically, when creating the upper subbase, i.e. the next data area to be created would be data area 1 etc.

Return value:  Success ( logical  )

Implementation details

logical DatabaseHandle  :: InitDataArea ( int16 mbnumber, uint16 danumber, NPath &file_path, int64 dasize=0 )
  • mbnumber - Main base number

    When defining distributes databases, the main base number allows allocating a specific main base for storing instances created in the context of an owning collection.

    The main base number for instances and index entries is set automatically, when allocating a main base to the extent.

    Main base numbers should not be defined together with the cluster option, since in this case, the cluster creating instance determines the main base for storing data.

    The main base number determines the main base for storing indexes for the collection. Instances owned by the extent are stored in the defined main base, too. Indexes and instances owned by other instances are stored in the same main base as the owning instance, i.e. in the main base of the owning extent. Since the owner hierarchy is unique, the main base for an instance can always be obtained from the schema definition.

  • danumber - Data area number

    Data areas for a subbase are numbered continuously. The highest data area number is 65535.

  • file_path - - internal feature (not documented)
  • dasize - Size for data area

    When no data area size had been defined (0), the data area expands whenever more space is needed.

    The maximum size for data areas in a 32-bit versions is 4,026,531,840 (0xF0000000) bytes or nearly 4GB. For 64-bit versions, the maximum size is 281,474,976,710,656 or 256 TB.

    Default: 0