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

Cannot install database - Upgrade SEC 5.5.0 to 5.5.1

Hi Guys,

 

Trying to upgrade SEC to 5.5.1 I have this error :

 

cannot install Database !!

 

The Sophos_InstallCoreDB log :

 

InstallDB (local)\SOPHOS SOPHOSSERVER SOPHOS551 "C:\ProgramData\Sophos\Management Installer\Sophos_InstallCoreDB.log"
Started
2020-02-18
09:40
==========
Msg 208, Level 16, State 1, Server SOPHOSSERVER\SOPHOS, Line 9
Invalid object name 'sysdatabases'.

 

Running on Windows server 2008 R2, Microsoft SQL Server 2008 (SP2)



This thread was automatically locked due to age.
Parents
  • Hi  

    I am assuming that you have tried to upgrade the database from the GUI of the installer of SEC 5.5.1.

    Please refer to this article which has a command-line method to upgrade the database for the respective version.

    Please go through it and carefully follow the article.

    Regards,

    Jasmin
    Community Support Engineer | Sophos Support

    Sophos Support VideosKnowledge Base  |  @SophosSupport | Sign up for SMS Alerts |
    If a post solves your question use the 'This helped me' link

  • Bonjour Jasmine,

     

    I went thru the article : https://community.sophos.com/kb/en-us/116768#Domain%20member%20server%20or%20workgroup%202

    Enterprise Console 5.5.1

    • From 5.0/5.1.0/5.2.0/5.2.1/5.2.1 R2/5.2.2/5.3/5.3.1/5.4.0/5.4.1 and 5.5.0

     

    The first command :

    C:\sec_551\ServerInstaller\DB\Core\InstallDB.bat (local)\SOPHOS SCAD01MTL SOPHOS551 Sophos_InstallCore551DB.log

     

    Give me error :

    InstallDB (local)\SOPHOS SCAD01MTL SOPHOS551 Sophos_InstallCore551DB.log
    Started
    2020-02-19
    12:11
    ==========
    Msg 208, Level 16, State 1, Server SCAD01MTL\SOPHOS, Line 9
    Invalid object name 'sysdatabases'.

     

    Did I miss something ??

    Thks for your advice and help 

     
     
     
     
  • Hello Kader,

    quick reply, have to leave.

    Ar least CreateDatabaseWithCollation.sql in the ...\DB\Core\ directory uses sysdatabases as opposed to sys.databases. Might suffice to amend it there.

    Christian

  • Qc,

    Sorry, not I'm not used with SQL command ;(

     

    I have already sql file : CreateDataBaseWithCollation.sql in the..... ......\DB\Core\

    Do i have substitute sysdatabases by sys.databases ??

     

    --***********************************************************************************

    --* *
    --* Copyright 2004-2016 Sophos Limited. All rights reserved. *
    --* *
    --* If you choose to modify the scripts and/or commands provided in this file in *
    --* any way or you choose to use them in any way other than as directed *
    --* (“Modification”), you agree Sophos will not be liable to you for any loss or *
    --* damage of any kind (except personal injury or death resulting from Sophos’s *
    --* negligence) arising from any Modification, or from faults or defects in the *
    --* installation whether caused by negligence or otherwise and Sophos shall not be *
    --* liable for any indirect, special, incidental or consequential damages, whether *
    --* in contract, tort or otherwise, arising out of any use of the scripts or any *
    --* associated documentation. Sophos reserves the right not to provide support *
    --* where any Modification has taken place. Sophos will use reasonable endeavours *
    --* to provide first line support. Should issues arise that require second line *
    --* support, or any other escalation process, Sophos cannot guarantee that such *
    --* issues will be resolved. *
    --* *
    --* IN RELATION TO ANY MODIFICATION, TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE *
    --* LAW, IN NO EVENT SHALL SOPHOS BE LIABLE TO YOU FOR OR TO THOSE CLAIMING THROUGH *
    --* YOU FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR SPECIAL DAMAGE OR *
    --* LOSS OF ANY KIND INCLUDING, BUT NOT LIMITED TO, LOSS OF PROFITS, LOSS OF *
    --* CONTRACTS, BUSINESS INTERRUPTIONS, LOSS OF OR CORRUPTION OF DATA HOWEVER CAUSED *
    --* AND WHETHER ARISING UNDER CONTRACT OR TORT, INCLUDING NEGLIGENCE, EVEN IF *
    --* SOPHOS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. *
    --* *
    --***********************************************************************************

    SET QUOTED_IDENTIFIER ON
    GO

    SET ANSI_NULLS ON
    GO

    DECLARE @lastDBName NVARCHAR(100)
    DECLARE @lastDBCollation NVARCHAR(100)
    DECLARE @dropDB NVARCHAR(100)
    DECLARE @createDB NVARCHAR(100)
    SET @lastDBCollation = NULL

    --get the latest SOPHOS DB
    SELECT TOP 1 @lastDBName = name
    FROM sysdatabases
    WHERE name > 'SOPHOS1' and name<'SOPHOS9' and name <>'$(newDBName)'
    ORDER BY name DESC

    --get the database default collation from the latest DB (if we have)
    IF @lastDBName IS NOT NULL
    BEGIN
    select @lastDBCollation = CAST(DATABASEPROPERTYEX(@lastDBName,'Collation') as nvarchar(100))
    END
    IF EXISTS (SELECT name FROM sys.databases WHERE name = N'$(newDBName)' )
    BEGIN
    SET @dropDB = 'DROP DATABASE ' + '$(newDBNAme)'
    EXEC (@dropDB)
    END
    IF @lastDBCollation IS NULL

    --there is no previuos database
    BEGIN

    --create the new database with the server default collation
    SET @createDB = 'CREATE DATABASE ' + '$(newDBNAme)'
    END
    ELSE

    --there is at least one previous database
    BEGIN

    --create the new database with the collation given by the default collation of the latest (previuos) database
    SET @createDB = 'CREATE DATABASE ' + '$(newDBNAme)' + ' COLLATE ' + @lastDBCollation
    END
    EXEC (@createDB)
    GO

     

    Thank you for you time.

     

  • Hi  

    I have reviewed the logs provided above and found the below error:

    RunScript: Custom action data: C:\Program Files\Sophos\Enterprise Console\DB\Core\;InstallDBEx.bat;(local)\SOPHOS;SCAD01MTL;SOPHOS551;C:\ProgramData\Sophos\Management Installer\Sophos_InstallCoreDB.log.
    RunScript: Command line = "C:\Program Files\Sophos\Enterprise Console\DB\Core\InstallDBEx.bat" (local)\SOPHOS SCAD01MTL SOPHOS551 "C:\ProgramData\Sophos\Management Installer\Sophos_InstallCoreDB.log"
    RunScript:
    RunScript: C:\Program Files\Sophos\Enterprise Console\DB\Core>sqlcmd -E -S (local)\SOPHOS -b -i CreateDatabaseWithCollation.sql -v newDBName = SOPHOS551 1>>"C:\ProgramData\Sophos\Management Installer\Sophos_InstallCoreDB.log"
    RunScript: Failed. See "C:\ProgramData\Sophos\Management Installer\Sophos_InstallCoreDB.log" for details.
    RunScript: Error 0x80004005: Batch file returned error code 1.
    CustomAction RunDBScript returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
    MSI (s) (98:A4) [09:40:35:222]: User policy value 'DisableRollback' is 0
    MSI (s) (98:A4) [09:40:35:222]: Machine policy value 'DisableRollback' is 0
    Action ended 09:40:35: InstallFinalize. Return value 3.

     has already suggested you the action to perform for this error but I'd still request you to go through this article once. 

    Apart from that,  can help you more on this as I am also not commanding on SQL part. Let's wait for his reply, else I'd suggest you go ahead and open a support case and PM me the support case number.

    Regards,

    Jasmin
    Community Support Engineer | Sophos Support

    Sophos Support VideosKnowledge Base  |  @SophosSupport | Sign up for SMS Alerts |
    If a post solves your question use the 'This helped me' link

  • Hello Kadar,

    as far as I can see this is the only occurrence of sysdatabases and thus simply substitute sysdatabases by sys.databases. Can't say why the compatibility view is not available with your SQL instance.

    Anyway it looks like an oversight as in all other places the system catalog views (sys.xxxxxxx) are used. I expect Sophos will correct it with SEC 5.5.2 or 5.6 or whatever the next version will be.

    Christian

  • Hi Christian,

     

    Sorry for the delay, busy on another things !!! I will be back to you ASAP...Have a nice WE

     

    Kader

  • Bonjour Christian,

     

    Works like a charm [:)]

     

    I substituted sysdatabases by sys.databases in the : CreateDatabaseWithCollation.sql file located C:\sec_551\ServerInstaller\DB\Core\

     

    I followed the article proposed by Jasmine : https://community.sophos.com/kb/en-us/116768

    InstallDB.bat

    UpdatePatchDB.bat

    and UpdateSophosSecurity.bat 

    Without problem, then I ran the server installer to finish the upgrading.

     

    Merci for your help and advices !!

  • Hi  

    Glad to hear that your issue has been resolved.

    Regards,

    Jasmin
    Community Support Engineer | Sophos Support

    Sophos Support VideosKnowledge Base  |  @SophosSupport | Sign up for SMS Alerts |
    If a post solves your question use the 'This helped me' link

  • Hello all,

    as we've heard 5.5.2 is available. Even though it no longer supports SQL Server 2008 (all flavours) and requires at least Native Client 11 and the Copyright in CreateDatabaseWithCollation.sql has been updated it still says
    SELECT TOP 1 @lastDBName = name
    FROM sysdatabases

    Christian

  • Bonjour Christian,

    Thanks for the info of SEC 5.5.2.

    In a couple weeks I will build 2012 or 2019 Server to migrate SEC 5.5.1 by following this procedure :

    https://community.sophos.com/kb/en-us/28276

     

    I hope will have no problems.

  • Hi  

    The above article should work, feel free to reach out to us for any further concerns.

    Shweta

    Community Support Engineer | Sophos Technical Support
    Support Videos | Product Documentation@SophosSupport | Sign up for SMS Alerts
    If a post solves your question use the 'Verify Answer' link.

     

Reply Children
No Data