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 the download page.

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 powershell command 'Start-Service -Name "DataFSServer"'

Creating a database instance

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

All those steps can be done with the DataFS_Tools that is installed with the server 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.

Configuration connection

By default, the server uses the address 127.0.0.1 and port 9012 for its configuration interface and the connecting user must be administrator. If you are not administrator or run the command from a non elevated shell, you will get the error 0x80070040 (access denied).

If you want to change this, use the "Set-ConfigBinding" and "Set-ConfigSecurity" commands. After that you must use the 'ServerAddress' and 'ServerPort' in every command of DataFS_Tools.

Client connection

To allow client applications to connect, you must configure a binding. Use "Insert-Binding" to do this. The following example creates a binding without login or encryption activated on the port. (Type 1 means 'Client').

.\DataFS_Tools.exe -Insert-Binding -Type 1 -Address 192.168.12.43 -Port 9018

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 -DomainGuid "{78F18ADB-6F0A-4885-B151-B5A729F35F8B}"

You should use your own GUID.

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 -DomainGuid "{78F18ADB-6F0A-4885-B151-B5A729F35F8B}"

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 -DiskGuid "{EE2AD8F5-5508-4FDE-95E6-0E2AADD06884}" -Path "C:\DataFS\data.datafs"

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

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

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 -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 'DiskGuid' and 'DomainGuid'.

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 -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
© 2021 Mobiland AG