After removing the Sophos database instance and then attempting to re-install Sophos Enterprise Console 4 or Sophos Small Business Console with the database component, the following error message is shown:
Failed to run script: RunAllScripts2Imp: batch file returned error code 1
Once the error is acknowledged the installer rolls back. Checking the InstallDB.log shows the error:
Msg 1802, Level 16, State 4, Server serverName\SOPHOS, Line 1
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
Msg 5170, Level 16, State 1, Server serverName\SOPHOS, Line 1
Cannot create file 'C:\Program Files\Microsoft SQLServer\MSSQL.1\MSSQL\DATA\SOPHOS4.mdf' because it already exists.
Change the file path or the file name, and retry the operation.
Note: The error text may be slightly different.
First seen in
Sophos Control Center
The installer cannot create the files SOPHOS4.mdf and SOPHOS4_log.ldf because they already exist on the system.
What To Do
1. Confirm the error
First you must confirm that the error shown in the InstallDB.log is as stated above. The instructions given here are only intended for this error.
To find the InstallDB.log file:
- Look in:
- \Program Files (x86)\Sophos\SCC\DB\
- C:\ (or the root of any system drive)
- Search ALL drives for "InstallDB.log"
- If the InstallDB.log cannot be found it may have been deleted when the install rolled back. Therefore perform step one below, and then search for the InstallDB.log file again.
2. Re-install the database
- Click OK to roll back the installation.
- Navigate to %programfiles%\microsoft SQL Server\MSSQL.1\MSSQL\Data\
- Add the extension .old to the following files:
- Re-run the installer, it should succeed without error.
Note: If you installed the database to a location other than the default location, you'll need to locate the path to SOPHOS4.mdf and SOPHOS4_ldf for the above procedure.