Restart migration after failure
- Last UpdatedDec 29, 2025
- 2 minute read
Given the size of most AVEVA Measurement Advisor datasets, it is likely you will encounter one or more connection failures during your migration process. This section gives an example of such a failure and steps on how to recover and proceed.
-
For this example, the following command was run:
measDataLoader -S "$conn" -D "$token" -t hourlyGasAnalysis -q "select * from hourlyGasAnalysis where gqId = <ID> and time between <TIMERANGE>" -i "select gqId from gasQualityDefine where gqName like 'PSR___GQ1'" -s 1615075200 -e 1683316800 -T 2592000
-
The import proceeded as follows:
Importing: gqId = 1081 -> this was PSR_3_GQ1 (PSR_1_GQ1 and PSR_2_GQ1 were successful)
Importing: time between 1615075200 and 1617667200
Importing: time between 1617667200 and 1620259200
Importing: time between 1620259200 and 1622851200
Importing: time between 1622851200 and 1625443200
Importing: time between 1625443200 and 1628035200
Importing: time between 1628035200 and 1630627200
Importing: time between 1630627200 and 1633219200
Importing: time between 1633219200 and 1635811200
Importing: time between 1635811200 and 1638403200
Importing: time between 1638403200 and 1640995200
Importing: time between 1640995200 and 1643587200
Importing: time between 1643587200 and 1646179200
Importing: time between 1646179200 and 1648771200
Importing: time between 1648771200 and 1651363200
Importing: time between 1651363200 and 1653955200
Importing: time between 1653955200 and 1656547200
Importing: time between 1656547200 and 1659139200
Importing: time between 1659139200 and 1661731200
-
The following error was thrown:
System.Exception: select * from hourlyGasAnalysis where gqId = 1081 and time between 1659139200 and 1661731200
Msg: 1236, Level: 20 State: 0, Procedure: , SQL Line: 0, A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The network connection was aborted by the local system.)
at MeasUtil.Connection.ExecQuery(String stmt, DataTable dataTable) in C:\Source\MeasurementAdvisor\Utilities\source\MeasUtil.Connection\Connection.cs:line 604
at MeasDataLoader.MeasDataLoader.ProcessFinalQuery(Connection srcConn, Connection dstConn, String query) in C:\Source\MeasurementAdvisor\Utilities\source\MeasDataLoader\MeasDataLoader.cs:line 277
Connection failed.
-
The recovery strategy is to finish off the Gas Quantity (GQ) that the upload was working on by specifying the gqId and the startTime that was in progress by using the following command:
measDataLoader -S "$conn" -D "$token" -t hourlyGasAnalysis -q "select * from hourlyGasAnalysis where gqId = 1081 and time between <TIMERANGE>" -s 1659139200 -e 1683316800 -T 2592000
-
The import will continue as follows:
Importing: gqId = 1081
Importing: time between 1659139200 and 1661731200
Importing: time between 1615075200 and 1617667200
Importing: time between 1617667200 and 1620259200
Importing: time between 1620259200 and 1622851200
Importing: time between 1622851200 and 1625443200
Importing: time between 1625443200 and 1628035200
Importing: time between 1628035200 and 1630627200
Importing: time between 1630627200 and 1633219200
Importing: time between 1633219200 and 1635811200
Importing: time between 1635811200 and 1638403200
Importing: time between 1638403200 and 1640995200
Importing: time between 1640995200 and 1643587200
Importing: time between 1643587200 and 1646179200
Importing: time between 1646179200 and 1648771200
Importing: time between 1648771200 and 1651363200
Importing: time between 1651363200 and 1653955200
Importing: time between 1653955200 and 1656547200
Importing: time between 1656547200 and 1659139200
-
Then, finish the rest of the GQ data for the rest of the GQs by using the following command:
measDataLoader -S "$conn" -D "$token" -t hourlyGasAnalysis -q "select * from hourlyGasAnalysis where gqId = <ID> and time between <TIMERANGE>" -i "select gqId from gasQualityDefine where gqName like 'PSR___GQ1 and gqName not in (‘PSR_1_GQ1', ‘PSR_2_GQ1’, ‘PSR_3_GQ1’)" -s 1615075200 -e 1683316800 -T 2592000