Database upgrade failed! when attempting to upgrade a Server database from 1.7.x to 1.8.1

NOTICE

POTENTIAL FOR DATA LOSS.
The steps detailed in the resolution of this article may result in a loss of critical data if not performed properly. Before beginning these steps, make sure all important data is backed up in the event of data loss. If you are unsure, please contact Product Support Services prior to attempting the procedure below.

Issue

While upgrading a database from 1.7.1 to 1.8.1 that has already been prepared, the upgrade log states that a MAP file is missing (similar to one shown below), and the upgrade is cancelled and reports "Database upgrade failed!"  

MAP file is required for upgrading the type public.lon2.devicetemplates.pidxxxxxxxxxxxxxxxx but none could be found

Product Line

SmartStruxure Solution

Environment

  • Upgrade
  • LonWorks
  • Pre-upgrade add-on
  • Observed in version 1.7.1 and 1.7.2

Cause

At some point in a previous version of StruxureWare Building Operation, the import of a device template has gone wrong in the sense, that the XIF has been imported and parsed correctly, but stored incorrectly. That means that we have cases where the actual content of the XIF stored in the database, can either be another completely different XIF, or even in some cases just random files.

The issue can be verified by performing a "Content Analysis" using the "SBO xbk Analyzer" version 1.0.9 and above.

You'll get a message like this: Error in XIF file: Mismatching program ID (SBO: 90001347000604A0 - XIF: 90:00:13:47:00:06:04:3C)

This means that Building Operation has a device template with PID 90:00:13:47:00:06:04:A0 but that the actual file this device template points to is 90:00:13:47:00:06:04:3C

Resolution

A hotfix has been produced to allow replacing the wrong XIF with the correct one.

 


With the following procedure you can manually fix the issue if you don't have the hotfix:

Firstly ensure you have run the Pre-Lonworks upgrade configuration and try the upgrade again.

Check if the template is in use by searching the specific template while logged in directly to the server

Once the device has been identified, proceed with the following steps:

  1. Record Neuron ID(s) - this is required since the Export Process does not retain this information.

     
  2. Export device(s)
    - If you have multiple devices you can Export the folder containing these devices, it is not critical to export the devices individually.
     
  3. Delete device(s) remembering to keep references.

     
  4. Import latest XIF for device
    - From WorkStation select: File > LonWorks > Device Template

    - Browse in the correct XIF.
     
  5. Import exported device(s) in step 2
     
  6. Commission device(s)
     
  7. Run the Pre-Lonworks upgrade configuration

 

The database should now successfully upgrade.