Technical FAQs

Ask a Question

SPM 7.0 / 7.0.1 - Installer fails at step CheckAppModsDatabase

During a 7.0.1 install or upgrade, the installer fails at step CheckAppModsDatabase. It will be considered an incomplete install.
Re-trying does not resolve the issue.
In the Setup log, there will be a long stack trace resembling one of the ones listed in the Causes section below.

Struxureware Power Monitoring Expert 7.0


Cause 1
The Windows account that SQL Server service is running as, does not have file/folder access to the location stated in the error. It's trying to execute a bulk load from file Unit.xml but fails. This is usually because service has been run under non-standard account. (i.e. something other than LOCAL SYSTEM, which is usually the default.)

Installer log will indicate an error was found in ApplicationModules.log file. Navigate to the log file as listed in the error message and open it. Error will resemble:

    • Starting Synchronization of [CommonDataModel].[Unit]
      Msg 4861, Level 16, State 1, Server STANDALONE\ION, Line 4
      Cannot bulk load because the file "C:\Users\Administrator\Desktop\SPM 7.0.1\setup\SetupSupport\Database\ReferenceData\CommonDataModel\Standard\Unit.xml" could not be opened. Operating system error code 5(Access is denied.).
Resolution 1
a) temporarily grant read/write permissions to the folder listed in the error, to the user account SQL Server is running under.
b) change SQL Server to run under the LOCAL SYSTEM account.
Then re-try running the installer to complete.

Cause 2
ApplicationModules database files (.mdf and .ldf) have already been created at the target location, but are not attached to SQL Server. The installer tries to re-create the files but fails. This situation can occur when trying to re-configure multiple times (for instance, after encountering the situation described in Cause 1).

Installer fails with message "The ApplicationModules database could not be found." Installer log contains the following error:
    • executeNonQuery(CREATE DATABASE ApplicationModules ON ( FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.ION\MSSQL\DATA\ApplicationModules.mdf'), ( FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.ION\MSSQL\DATA\ApplicationModules_log.ldf') FOR ATTACH, master) Failed on exception:
      System.Data.SqlClient.SqlException (0x80131904): Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL10_50.ION\MSSQL\DATA\ApplicationModules.mdf". Operating system error 5: "5(Access is denied.)".
      at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
      at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
      at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
      at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
      at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
      at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
      at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
      at SchneiderElectric.Installer.InstallTools.ConfigureSQL.ExecuteNonQuery(SqlCommand command, String dbName)
ApplicationModules.log file contains the following error:
    • Creating ApplicationModules...
      Msg 5170, Level 16, State 1, Server STANDALONE\ION, Line 1
      Cannot create file 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.ION\MSSQL\DATA\ApplicationModules.MDF' because it already exists. Change the file path or the file name, and retry the operation.
      Msg 1802, Level 16, State 4, Server STANDALONE\ION, Line 1
      CREATE DATABASE failed. Some file names listed could not be created. Check related errors.

Resolution 2
Delete or rename the existing ApplicationModules database files, the re-run the installer. Let the installer re-create the database and complete the install.

Cause 3

The installer fails to create the application modules database successfully.

Resolution 3

Checking the diagnostics within the C:\Program Files (x86)\Schneider Electric\ION Enterprise\Applications\Diagnostic shows the following error message: "CREATE DATABASE failed. Primary file must be at least XX MB to accommodate a copy of the model database."

Instead of "XX" an actual file size will be given. In this situation SQL is attempting to create the Application Modules database, but the Model database is larger in size. All newly created SQL databases must be larger in size than the model system database to succeed. Within SQL Management Studio backup and perform a shrink operation on the model database which should allow the installer to succeed creating the Application Modules database. Right click on the model Database -> tasks -> shrink.
Was this helpful?
What can we do to improve the information ?