This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Database Issue with upgrading from 5.4.1 to 5.5.0

 hello,

Today I decided to upgrade from 5.4.1 to 5.5.0 so for some reason the install went through just fine however the database did not upgrade so for this reason, services are not starting. When I click on the setup again this is the error I'm getting.

 

My user does have access to the database. I've been doing upgrades on this same user account. This is a sysadmin account. 

For the second error, "The logon user cannot access the database created during a previous installation" Sophos suggested the following

  1. Open Regedit (Start | Run Type: Regedit.exe | Press Return)
  2. Browse to HKLM\Software\Sophos\EE\Management Tools\Database Installer
  3. Edit the registry string 'Instance'
  4. Delete the value 'MSSQLSERVER' and click OK
  5. Run the Enterprise Console installer

As you can see below, I do not see the Database Installer folder or "Instance" string. 

 

So basically now when I open Sophos Enterprise Console after a minute of it trying to connect to the server, I get the following error because the database is not upgraded. 



This thread was automatically locked due to age.
  • Hello sabdul.

    is the Sophos Management Database listed under Programs and features and if so, which version?
    And what is the value for Initial Catalog in DatabaseConnectionMS?

    Christian

  • Hi Christian,

    It is not listed. This is all listed in Programs and Features and the value for DatabaseConnectionMS is Provider=SQLOLEDB;Integrated Security=SSPI;Initial Catalog=SOPHOS550;Data Source=(local)\SOPHOS;

  • I also tried to run upgradedb.exe with the following command "upgradedb.exe -debug -sourceVersion=540" and I got Failed to transfer data from the old database error. 

  • Hello sabdul,

    is there a Sophos_Database64msi log belonging to the upgrade?
    Do the database files (SOPHOS550.mdf, SophosSecurity.mdf, SOPHOSPATCH52.mdf) exist (sqlcmd.exe -E -S .\SOPHOS -Q "select name, filename from sysdatabases")?
    If so, try to (re-)install only the database component using the CREATE_DATABASES=0 property as outlined in Scenario 1/3 in this article (note: the installer directory is \sec_550 in your case). Then run upgradeDB.exe -reset and afterwards start the services and try to open the console.

    Christian

  • Hi Christian,

    I do not see any logs for Sophos_Database64.msi in the event logs. I only see Event 8004

    Initialization failed.
    Step: Creating a database connection
    Error: std::runtime_error
    Data: Could not find stored procedure 'dbo.GetInterfaceVersion'.

     

    Also these 3 files, don't exist. I assume you wanted me to run this command to find each file 

    sqlcmd.exe -E -S .\SOPHOS -Q "filename.mdf"

  • Also, just an fyi, I do see the 550 database on the sql server

  • Hello sabdul,

    you wanted me to run this command
    no, seems you are not really familiar with SQL. The string following the -Q is a SQL Query, this is not what you'd normally understand by query
    (it could also be something like DROP DATABASE xxxx). With it you tell the database instance what you want it to do for you. The particular command means: Show me the contents of the name and filename columns from the sysdatabases table (the name contains the database name and the filename the complete path of the DATA file(s)).

    With the log I meant the install logs in %ProgramData%\Sophos\Management Installer\.

    From your other post it seems that the database is there, the 8004 suggests that it might not be properly initialized. And furthermore the database component is not under Programs and Features. Before making another suggestion I'd like to see the msi log though.

    Christian

  • Hello,

     

    I also ran into this. I spent countless hour trying to figure this out. I did finally solve it though.

     

    Here is how I did it;

     

    1. Start SQL management studio and connect to your specific server.

    2. Detach the SOPHOS550 database

    3. Remove or rename the database files for SOPHOS550. They should be in "C:\Program Files\Microsoft SQL Server\MSSQL10_50.SOPHOS\MSSQL\DATA" or something similar.

    3. Open a command prompt and navigate to your download directory for 5.5.0, cd to ServerInstaller\DB\Core

    4. Issue the command "InstallDB.bat (local)\SOPHOS [domain netbios name] SOPHOS550 Sophos_InstallCore550DB.log" to reinstall the 550 database. replace with your own netbios domain name and remove the [].

    5. Do not try to run the installer, it will not work at all.

    6. In your command prompt, navigate to your Sophos install directory. Enter the "Enterprise Console" folder.

    7. Issue the command "UpgradeDB.exe -debug -sourceVersion=XXX" where XXX is the actual version of your previous database. Check the version number in SQL management studio.

     

    Now, this should upgrade your previous database to the new version.

     

    You do not need to run the installer again at this point, just simply start Enterprise Console. It should start fine.

     

    I hope that helps.

  • My issue was too complicated. I tried everything you mentioned. I had to call Sophos support and had their database team step in. They ended up spending over an hour to resolve the issue. I remember when they were migrating the data over to 550, it started throwing errors which caused more issues but they fixed it.