> For the complete documentation index, see [llms.txt](https://help.qtech.co.nz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.qtech.co.nz/qtech/datscan-and-data-loggers/datahost/install.md).

# Install DATAHost

Create the DatScan database in SQL Server and install the DATAHost services.

Create the DatScan database in SQL Server, run the DATAHost installer, then start the four DATAHost services in order.

{% hint style="info" %}
**Applies to:** DATAHost V1.3, Quick Start Guide V2.
{% endhint %}

## Before you start

* It is assumed that your organisation is already running SQL Database software. Microsoft SQL Express 2008 has been used, although newer versions can be used.
* Contact QTech for the DATAHost installer.

## 1. Create the database

1. From SQL Server Management Studio create a new database called `DATScan`.
2. Right click on it and select **New query**.
3. Now copy the contents of `DATScanDB.sql` from the installation folder into this window and press **Execute**.

This script creates the appropriate tables, the eventIds table contents and logging stored procedure. The transactions and siteinfo tables should be empty.

## 2. Give DATAHost access to the database

Check that the user has permission to access the DATScan database. In SQL Server Management Studio, choose the DATScan database -> **Properties** -> **Permissions**. The user must have permissions for connect and execute, insert, update, delete.

* If you have issues using Windows authentication, you could try using SQL authentication.
* In the domain controller there could be issues with starting DATAHost services. In this case, you need to check that the user was created and has permissions for login as service.

## 3. Install the DATAHost services

DATAHost Services and TBD are installed from the installer.

The installer:

* installs the services TBServer, TBDiagService, AdoDCMS and QTechComms
* creates an admin account called DataHost which it requires to access out-of-process comms (e.g. database logging or cellular)
* creates holes in the Windows firewall to allow for this communication
* creates a file structure called `DATRAN.tbd` which includes a draft configuration file for a single cellular Remote Datalogger.

Note that the DATAHost .tbd file, although similar to a DATRAN VI.tbd, is not compatible with DATRAN Services.

## 4. Start the services

Start the services in this order:

1. TBServer
2. QTechComms
3. AdoDCMS
4. TBDiagService

Then run TBBrowse to see if it has connected to the background Services. If it is connected, you will see the tree structure. If it is not connected, you will see a message saying "No Connection to Server" in red text. See [The DATAHost services won't start](https://help.qtech.co.nz/qtech/datscan-and-data-loggers/datahost/troubleshooting/services-will-not-start.md).

{% hint style="info" %}
If TBServer is started as an application, e.g. just double clicked, it will show debug information in a command prompt window.
{% endhint %}

## Next

[Set up DATAHost for Q48 loggers](https://help.qtech.co.nz/qtech/datscan-and-data-loggers/datahost/configure.md).
