> 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/troubleshooting/unrecoverable-files.md).

# Unrecoverable files are building up

DATRAN VI V6.78 is putting data in the unrecoverable folders. Find the configuration or script that causes it, and report it to QTech.

In V6.78, when an Unrecoverable Error is encountered (an attempt to execute a SQL command failed due to an inherent problem with the command), the failing command is placed in a subfolder called **unrecoverable**. Unrecoverable Errors do not impede other commands/queries from executing. Occasionally one or two might be generated, for example when the service starts. It is important to monitor the number of unrecoverable files to identify if there is some aspect (a script or other DATRAN configuration) that needs to be inspected and if necessary fixed or reported to QTech.

{% hint style="info" %}
**Applies to:** DATRAN VI V6.78 and later. For how the queues work, see [Persistent queues](https://help.qtech.co.nz/datran/datran-vi-scada/datran-vi/persistent-queues.md).
{% endhint %}

## What you see

* The **Unrec File Count** under a queue (in ADO or HDI Persistent Queue Management) keeps rising.
* A high error count (for example ADO Statistics\Current Day\Error Count).
* Diagnostics show "Chunks will be moved to unrecoverable".

## What to do

1. **Look at the error text.** Each unrecoverable file has a text file next to it with the SQL Server error. Look, but don't open or move the `.PQF` files: see [Don't touch the queue files](https://help.qtech.co.nz/datran/datran-vi-scada/datran-vi/persistent-queues.md#dont-touch-the-queue-files).
2. **Check for the common causes:**
   * the same point configured with extra trailing spaces in the equipment name, for example `My Equip` and `My Equip` . 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)
   * two different points with the same site, equipment and point names, from a copy and paste that wasn't updated
   * configuration changes that weren't applied
   * your own scripts that write malformed SQL. Turn on the RawSql and RawSqlError diagnostics to see it.
3. **Fix the cause,** then flush: set **Force Flush Unrecoverable** to 1. Fixed commands are retried and deleted.
4. **Report it to QTech** if you can't find the cause, or files don't clear after multiple flushes. In the first few days after upgrading, tell QTech about any unrecoverable files, so QTech can analyse them.

## Prevent it

* Set an alarm on **Unrec File Count**: under normal conditions, setting an alarm threshold of more than 5 unrecoverable files is sufficient. See [Alarms to set up](https://help.qtech.co.nz/datran/datran-vi-scada/datran-vi/persistent-queues.md#alarms-to-set-up).
* Once things are stable, set **Purge Unrecoverable Older Than** to about a week, so old files are removed.

## Still not working? Contact QTech

Email <techsupport@qtech.co.nz> with your DATRAN VI version, the **Unrec File Count** for each queue, the error text from the unrecoverable folder, and what you've already checked.
