DataFS Setup

This section describes how to install DataFS and create an empty database instance.

DataFS Server

You can use every edition of DataFS Server for development. But the easiest way is to use the free 'DataFS Server Developer'. When you have installed the 'DataFS SDK', then you find the 'DataFS Server Developer.msi' file in the 'Setup' directory (normally %programfiles(x86)%\Mobiland\DataFS SDK\Setup). In order to install it, you need a key. You can get it for free from this website. (at the moment you should find your personal key on the start page)

After installing the DataFS server it uses only the address 127.0.0.1 and the default port 9012. The default port can be changed in the registry and you can also add additional ports that the server should listen to (configuration utilities will be available in the future).

Depending on the installed version of the server, it may be, that the setup does only register the server for automatic start when the system starts, but does not directly start the service during setup.
One option to start it is using the command 'Start-Service -Name "DataFSService"'

Creating a database instance

To create an instance of DataFS, you need to create a disk, a domain and then a storage.

All those steps can be done with the DataFS_Tools or by writing your own application and use the IDataFoundationConfiguration interface. The parameters of IDataFoundationConfiguration are the same as those used for DataFS_Tools. In this document we will describe only how to use DataFS_Tools.

Create a disk

To create a database instance you need a disk. This can be done with the following command.

DataFS_Tools.exe -create-disk -ServerPort 9012 -DiskGuid "{EE2AD8F5-5508-4FDE-95E6-0E2AADD06884}" -Path "C:\DataFS\data.datafs" -CacheSizeMax 2147483648

You should use your own GUID and use a valid path (you can only use existing directories).

The CacheSizeMax determines how much of the disk can be held in the cache until the system tries to remove data from memory.

The ServerPort (management port) can be changed by editing the registry. This will change in the future. Additional parameters will get documented here soon.

You can store multiple storages on one disk. In this case the storages need to run in the same process.

Create a domain

Every database instance is part of a domain. The domain defines common settings for all instances like for example the schema.
Creating a domain can be done with the following command.

DataFS_Tools.exe -create-domain -ServerPort 9012 -DomainGuid "{78F18ADB-6F0A-4885-B151-B5A729F35F8B}"

You should use your own GUID.

The ServerPort (management port) can be changed by editing the registry. This will change in the future. Additional parameters will get documented here soon.

A newly created domain is not started automatically. You have to restart the service or start the domain manually. This can be done with the following command.

DataFS_Tools.exe -start-domain -ServerPort 9012 -DomainGuid "{78F18ADB-6F0A-4885-B151-B5A729F35F8B}"

Create a storage

The main part of a database instance is the storage. That's where data is stored and that's the part an application normally communicates with.
Creating a storage can be done with the following command.

DataFS_Tools.exe -create-storage -ServerPort 9012 -StorageGuid "{1AB45899-3B20-4780-A9F8-9483CC523FC9}" -DiskGuid "{EE2AD8F5-5508-4FDE-95E6-0E2AADD06884}" -DomainGuid "{78F18ADB-6F0A-4885-B151-B5A729F35F8B}" -Name TestDatabase -MaxStorageCount 16 -LogDataPoolLength 4 -MinStorageElementCount 32 -MaxStorageElementCount 16384 -MinStorageDataSize 4096 -MaxStorageDataSize 4194304 -DeltaStorageDataSize 2097152 -MaxPartObjectCount 8192 -CacheHalfLife 4294967295 -MaxIncompleteTransaction 128 -WriteDownThreadCount 1

You should use your own GUID.

Pass the GUIDs from previous calls for the parameters 'Disk' and 'Domain'.

The ServerPort (management port) can be changed by editing the registry. This will change in the future. Additional parameters will get documented here soon. Most of them are only performance related and can be changed also after the creation of the storage.

A newly created storage is not started automatically. You have to restart the service or start the storage manually. This can be done with the following command.

DataFS_Tools.exe -start-storage -ServerPort 9012 -StorageGuid "{1AB45899-3B20-4780-A9F8-9483CC523FC9}" -DomainGuid "{78F18ADB-6F0A-4885-B151-B5A729F35F8B}"

Additional information

error codes thrown by DataFS_Tools.exe

all parameters in detail
© 2020 Mobiland AG