When starting the SystemWeaver server (either by directly executing the server or using the swTestServer GUI), the following error is thrown "ERROR sws     - DB Integrity error". 



Prerequisites

  • Server and database compatible version of swDatabaseManager.exe
  • The SystemWeaver server is stopped
  • Sole access to the database during update
  • If journaling is enabled on the main server for mirroring, it must be deactivated. A new journal file and new cache file(s) will need to be generated after the script it run. 


The error is an indication that the data in the database contains orphaned parts and/attributes that do not have an owner. This must be cleaned up before the server can be started. 

  1. Take a backup of the database
  2. Open the swDatabaseManager utility included in the server installation.
  3. Select the Database Type and, for Select database, enter the valid path to and name of the database. For MSSQL servers, enter the server followed by the pipe character (|) and the database name.
  4. Click Display info to simply confirm a connection. It will display the database version #, etc.
  5. Click Clean lost parts. Depending on the size of the database, it will take up to approximately 2 minutes to complete. The log window will display a list of the purged, orphaned parts and attributes. The server can now be started against the database.