> 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/datran/datran-vi-scada/datran-vi/install/upgrade-to-v6-78.md).

# Upgrade to DATRAN VI V6.78

What to check before and after upgrading to DATRAN VI V6.78, which services change, and how behaviour differs from earlier versions.

DATRAN VI V6.78 is an essential upgrade developed to provide logging throughput enhancements, provision for greater SCADA infrastructure expansion, anticipate data integrity needs and minimise the risk of data loss. It is required that Operators use the installer to perform the upgrade. Prior to upgrading the product Operators should ensure that all HDI logs have been retrieved recently from sites and safely logged to SQL.

{% hint style="info" %}
**Applies to:** upgrading any earlier DATRAN VI to V6.78, from QTech's Guidelines for DATRAN Administrators (rev 03, April 2026). Readers should be experienced in the configuration and operation of Datran with authorisation to install and maintain the product in an IT capacity. For RTUs with firmware V7.17 or prior a maximum of 35 points can be configured. For RTUs on firmware V7.18 or later the number of points increases to 255. See [Update the firmware](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/update-firmware.md) on the XL4 Plus pages.
{% endhint %}

## What changes

| Service                                                                                                                                     | Changed in V6.78?                                                                                             |
| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| Datran ActiveX Data Objects service (ADO), the connector used for operating with Microsoft SQL Server (the Datran Historical Database)      | Yes: persistent queues, multiple connections                                                                  |
| Historical Data Interface Service (HDI), responsible for collecting data logs from RTUs (e.g. XL4 Plus) and storing them to the SQL server  | Yes: persistent queues, larger transfers, up to 255 logged points                                             |
| QTech Communications Service (QC\_Qtech commonly known as QComms), proprietary protocol for communications to remote telemetry units (RTUs) | Yes                                                                                                           |
| Core service (Tbserve)                                                                                                                      | A change was made to the core real time tree base database .dll but there were no changes to the core service |
| The Derived Value Generator Service (DVG), responsible for all formulaic processing, scripts and certain node types                         | No                                                                                                            |
| The InSQL service connector for Wonderware's SQL Historian                                                                                  | No                                                                                                            |

The regional council data logger uses obsolete SQL Server connection direct from QComms. Customers using this interface should contact QTech.

{% hint style="warning" %}
Just swapping out the executables of the services won't work as a method to do the upgrade. It will work as a method to roll back (backup the existing services and .dlls before running the installer, copy paste to roll back). But to move forward, there are new .dll dependencies that are required, and a C++ redistributable has to be installed, which the installer takes care of.
{% endhint %}

## Before you upgrade

1. **Retrieve the RTU logs.** Operators should ensure that all HDI logs have been retrieved recently from sites and safely logged to SQL. When the HDI service is started (e.g. after a server restart) the offsets are ignored and HDI will request RTU log data from all sites (that are using RTU logging). For this reason, it is best that the logs are retrieved prior to the upgrade of Datran so that the HDI requests will only affect small amounts of data that have been logged in the interim (during the upgrade).
2. **Back up the server.** The usual precautions should be made to back up the server or stop telemetry comms services beforehand to avoid leaving data in transit in an indeterminate state.
3. **Check your disaster recovery plan.** Operators should ensure that they have a disaster recovery process in place whenever upgrades to Datran are made and that Disaster recovery procedures have been adequately tested beforehand.
4. **Analyse the TBD before upgrade, look for:**
   * Customised scripts using logging
   * Use of MSDE instead of ADO (see below).
5. **Check folder permissions.** Ensure all permissions for folders etc are permitted for DatranService.
6. **Delete the old recovery paths.** Delete **Recovery Path** and **HDI Recovery Path** under **Applications/ADO Database Connectivity/Databases/DATRANdatabase/Properties**.

### Replace MSDE aliases

If ADO aliases are used, e.g. `_MSDE_Execute_` used instead of `_ADO_Execute_` etc: These should be removed because they won't work properly without modifications to system scripts which is bad practice (system scripts are re-created when the installer is run), and there is no need for these aliases. Carry out this work before running the installer for the upgrade to minimize disruption.

* To remove them you will need to replace instances of `_MSDE_Execute_` etc. with their ADO equivalents throughout the TBD, if they appear in user defined scripts.
* You will also need to change the **Database Execute** property in SMS Direct to `_ADO_Execute_`.
* You don't need to change any `_MSDE_***_` occurrences that show up in e.g annunciations, or any other system-generated nodes, or any found under the MSDE Connectivity service.

## Upgrade order

| Step | Do this                                                                                                                                                  |
| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1    | Run the installer (do not start services).                                                                                                               |
| 2    | Start TBServ, DVG.                                                                                                                                       |
| 3    | Start ADO.                                                                                                                                               |
| 4    | Check that ADO is able to connect to database.                                                                                                           |
| 5    | Check ADO able to log, check ADO persistent queues.                                                                                                      |
| 6    | Start QComms, check comms working.                                                                                                                       |
| 7    | Start HDI.                                                                                                                                               |
| 8    | Verify HDI logging, check HDI persistent queues.                                                                                                         |
| 9    | Start the rest of services.                                                                                                                              |
| 10   | Add alarms to persistent queues for monitoring. See [Persistent queues](https://help.qtech.co.nz/datran/datran-vi-scada/datran-vi/persistent-queues.md). |
| 11   | Ensure there is no queue file buildup in the unrecoverable folder.                                                                                       |

## What's different after the upgrade

### Service start order

Each service is configured in the windows services applet to include a dependency such that the service will not start until the core Datran service (TBserve) starts. The new installer creates a new dependency chain such that ADO does not start until DVG starts and ADO is now a delayed start by default. After that Windows may start other Datran services in which ever order the operating system determines. Whilst not required, Operators may choose to start communications to the telemetry network last (e.g. Qcomms).

It is required that Operators use the installer to perform the upgrade and mandatory that the dependencies are in place and these can be checked by inspecting the service dependencies in the Windows service applet (right clicking the service and going into properties, then clicking the dependencies tab) after the upgrade is installed.

### Signed programs

Unsigned applications and DLLs can be prevented from being installed by policies in security software such as Microsoft Defender. Each Service executable and DLL in Datran is now digitally self-signed by QTech. IT Administrators can apply to QTech for a code signing certificate which can be installed to permit the application to be loaded onto a machine. The Datran installer will also bundle a copy of the certificate.

### Recovery folders hold persistent queues

The recovery folder names in Datran have been retained for this edition but instead of holding recovery files which are created when the connection to the SQL server is lost, they now contain a number of subfolders that hold persistent queue files. The files in these folders are small (4 KB) but potentially numerous. Though it is not expected that the files will have a significant impact on disk storage on the server, the amount of disk usage can be monitored. If a disconnection (or severe degradation of the connection) with SQL Server occurs for an extended period then Operators should check that there is sufficient disk storage available. The recovery folders can be located anywhere on disk but by default are under the Program Data folder (usually hidden) on C Drive (or where the Windows operating system is located). To move them, see [Persistent queues](https://help.qtech.co.nz/datran/datran-vi-scada/datran-vi/persistent-queues.md#move-the-queue-folders).

### Stricter about point names

This version of Datran is more strict than previous versions. It is less tolerant to common node/point configuration issues such as:

* Node names with extra trailing whitespace. E.g. in one case you have "My Site" "My Equip" "My Point" and in another case you have "My Site" "My Equip " "My Point".
* Different Points where the pathname has been accidentally copy/pasted but not updated thus two different data values are logged to the same point.
* Failure to apply changes that update the config.

In order to use Datran 6.78 and not generate unrecoverable files these problems should be found and fixed. See [A point's data is split or has gaps](https://help.qtech.co.nz/datran/datran-vi-scada/datran-vi/troubleshooting/split-or-missing-data.md) and [Unrecoverable files are building up](https://help.qtech.co.nz/datran/datran-vi-scada/datran-vi/troubleshooting/unrecoverable-files.md).

In the first few days of operation after the upgrade all unrecoverable file counts should be notified to Qtech so that we can analyse them. Thereafter under normal conditions the number should be close to zero and if you get more than a few then this should be notified to Qtech.

### Many SQL connections

This edition can handle multiple connections to the SQL server (per Datran Service), thereby significantly improving throughput. Only a few connections are used (subject to demand) but IT administrators should be aware of any policies in place on the SQL server configuration which constrain the number of inbound connections to SQL server and either remove the limit or use "Allow Concurrent Connections 0" to limit the connection to one per service which will emulate older versions of Datran (with some loss of performance). See [Persistent queues](https://help.qtech.co.nz/datran/datran-vi-scada/datran-vi/persistent-queues.md#sql-connections).

### HDI after a restart

When the HDI service is started (e.g. after a server restart) the offsets are ignored and HDI will request RTU log data from all sites (that are using RTU logging). After an upgrade it can take some time for log data to flow through from all sites to the SQL server. Operators should watch for Sites that appear to be in comms fail because the HDI log retrieval is impacting normal polling operation. Operators can choose to stop the service until normal comms and contact with all sites has resumed after a restart. Operators should watch the Communications statistics (channel packet queue lengths) and as before, adjust offsets on highly loaded channels. See [Sites show comms fail after a restart or upgrade](https://help.qtech.co.nz/datran/datran-vi-scada/datran-vi/troubleshooting/comms-fail-after-restart.md).

### HDI formulas are deprecated

The HDI supports the use of formulas for additional analogue point configuration. The **Formula** edit control specifies the calculation that is performed on the raw value before it is scaled and logged into the database. However, it was found during development that using this feature causes the data to be passed to the DVG for operations and creates a small but non-zero risk that if the formula operation faults then the log data will not be correctly written to SQL server and may impact the processing of other datapoints in the HDI, causing operations to slow. The recommendation is that Operators should use other methods to capture and scale the data (perhaps in a DLP) and avoid the specific use of the Formula edit control. Operators should consider this feature deprecated and in future the feature will either be removed or refactored to avoid passing the data between the HDI service and the DVG service.

### Average SQL latency isn't always accurate

The SQL statistic "Average SQL Latency (ms)" is currently not always accurate and other methods should be used by Operators or IT administrators to determine if the link is experiencing degradation. Other methods include:

* Network latency using `ping`
* Test-DbaNetworkLatency (PowerShell): `Test-DbaNetworkLatency -SqlInstance <SQL_Instance_Name> -Query "SELECT 1" -Count 10`
* Use SQL Query execution time as an indicator or SQL profiling tools.

### New diagnostics

There are new diagnostic categories in Datran, for the ADO and HDI, that can show you exactly what SQL is being executed, and the responses from the server, among other things. These will contribute to a significant performance bottleneck when turned on. For what the messages mean, see [Database logging and SQL Server](https://help.qtech.co.nz/datran/datran-vi-scada/datran-vi/sql-server.md#diagnostic-messages).

For RTU logging changes (larger request sizes, 255 points, log timestamps and timesets), see [RTU data logging (HDI)](https://help.qtech.co.nz/datran/datran-vi-scada/datran-vi/rtu-data-logging.md).
