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

migrating Enterprise console 5.0 error

I am trying to migrate enterprise console to a new server using Sophos Enterprise Console server to server migration guide, and when importing database to a new server i get build sucesfully, but i get errors

C:\Program Files\Sophos\Enterprise Console>sqlcmd -E -S "(local)\SOPHOS" -d "mas
ter" -b -Q "CREATE TABLE #backupSetInfo (BackupName NVARCHAR(128),BackupDescript
ion NVARCHAR(255),BackupType smallint,ExpirationDate datetime,Compressed tinyint
,Position smallint,DeviceType tinyint,UserName NVARCHAR(128),ServerName NVARCHAR
(128),DatabaseName NVARCHAR(128),DatabaseVersion INT,DatabaseCreationDate dateti
me,BackupSize numeric(20,0),FirstLSN numeric(25,0),LastLSN numeric(25,0),Checkpo
intLSN numeric(25,0),DatabaseBackupLSN numeric(25,0),BackupStartDate datetime,Ba
ckupFinishDate datetime,SortOrder smallint,CodePage smallint,UnicodeLocaleId INT
,UnicodeComparisonStyle INT,CompatibilityLevel tinyint,SoftwareVendorId INT,Soft
wareVersionMajor INT,SoftwareVersionMinor INT,SoftwareVersionBuild INT,MachineNa
me NVARCHAR(128),Flags INT,BindingID uniqueidentifier,RecoveryForkID uniqueident
ifier,Collation NVARCHAR(128),FamilyGUID uniqueidentifier,HasBulkLoggedData INT,
IsSnapshot INT,IsReadOnly INT,IsSingleUser INT,HasBackupChecksums INT,IsDamaged
INT,BeginsLogChain INT,HasIncompleteMetaData INT,IsForceOffline INT,IsCopyOnly I
NT,FirstRecoveryForkID uniqueidentifier,ForkPointLSN numeric(25,0),RecoveryModel
 NVARCHAR(128),DifferentialBaseLSN numeric(25,0),DifferentialBaseGUID uniqueiden
tifier,BackupTypeDescription NVARCHAR(128),BackupSetGUID uniqueidentifier); INSE
RT #backupSetInfo EXEC('RESTORE HEADERONLY FROM DISK=N' + '''SOPHOS50.bak'''); D
ECLARE @backupsetnumber smallint; SET @backupsetnumber = (SELECT TOP(1) Position
 FROM #backupSetInfo ORDER BY BackupFinishDate DESC); RESTORE DATABASE SOPHOS50
FROM DISK = 'SOPHOS50.bak' WITH FILE = @backupsetnumber, REPLACE, RECOVERY; DROP
 TABLE #backupSetInfo;"
Msg 213, Level 16, State 7, Server SAV\SOPHOS, Line 1
Column name or number of supplied values does not match table definition.
Msg 3013, Level 16, State 1, Server SAV\SOPHOS, Line 1
RESTORE HEADERONLY is terminating abnormally.
Msg 3250, Level 16, State 1, Server SAV\SOPHOS, Line 1
The value '0' is not within range for the FILE parameter.
Msg 3013, Level 16, State 1, Server SAV\SOPHOS, Line 1
RESTORE DATABASE is terminating abnormally.
Failed to restore

both servers have same users, are on same domain, same version of OS (windows 2003 standard 32bit) and SEC

old server was upgraded from version 4.5

after restoring in new console I get whole settings from old server and connection to old console (should be connected to console on new server) and I don't have new SUM

can anyone help

thanks in advance

:36281


This thread was automatically locked due to age.
  • Hello DimitrijeJPGS,

    so you did upgrade on the old server from SEC 4.5 to 5.0, there it worked and then you backed up the SOPHOS50 database?  Which SQL Server versions are involved?

    after restoring in new console ...

    Hm, I completely fail to understand this sentence. If the RESTORE failed, the database should be empty. Furthermore I don't see what you mean by connection to old console - opening the console on one of the servers should connect to the (local) management server (and the corresponding database) or fail.

    Christian

    :36285
  • first: console on old server is running and has all data... backup didn't have any errors

    second: both servers are curently running SQL 2008, but old server was upgraded from 4.5 (sql 2005)

    third: database is empty on new server after restore, but console after restore is connected to read old server with data...

    when I change registry so it reads new server all data is empty

    :36289
  • Hello DimitrijeJPGS,

    when I change registry so it reads new server

    which key do you modify? Is it the database connection?

    Wonder if everything went as it should during migration. Just to clarify: You upgraded to SEC 5.0 (while still on SQL 2005), then used DataBackupRestore (or did you back up using BackupDB.bat?), copied the backup and it fails as you've posted when you use DataBackupRestore-Action=Restore?

    Christian

    :36293
  • when I use DataBackupRestore-Action=Restore to restore data on new server database connection in registry points to old server (console is working only if old server is on, and i don't have new SUM), so I changed database connection in registry to point to the new server (is that wrong step)

    as for SQL, yes, it was 2005 and when I upgraded to 5.0 it changed to 2008 wihtout a problem

    as for backing up the data, I tried to use both procedures backupdb.bat and databackuprestore and didn't get any errors with either of them (had error with cac.pem and solved it with procedure that I found in databaserestore maunal)

    :36315
  • this is backup log on old server using databackuprestore.exe procedure from migrate manual:

    C:\Program Files\Sophos\Enterprise Console>DataBackupRestore.exe -Action=backup
    Microsoft (R) Build Engine Version 3.5.30729.1
    [Microsoft .NET Framework, Version 2.0.50727.3643]
    Copyright (C) Microsoft Corporation 2007. All rights reserved.

    Build started 12/18/2012 9:28:11 AM.

    C:\Program Files\Sophos\Enterprise Console>sqlcmd -E -S "(local)\SOPHOS" -b -Q "
    BACKUP DATABASE SOPHOSPATCH TO DISK = 'SOPHOSPATCH.bak'"
    Processed 61104 pages for database 'SOPHOSPATCH', file 'SOPHOSPATCH' on file 1.
    Processed 5 pages for database 'SOPHOSPATCH', file 'SOPHOSPATCH_log' on file 1.
    BACKUP DATABASE successfully processed 61109 pages in 38.132 seconds (12.519 MB/
    sec).
    Succeeded
    Backup successfully for registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Sophos\Patch
    Backup successfully for registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Sophos\EE\Patc
    h
    Backup file C:\Program Files\Sophos\Patch\PatchEndpointCommunicator\PatchEndpoin
    tCommunicator.exe.config successful.
    Backup file C:\Program Files\Sophos\Patch\PatchEndpointOrchestrator\PatchEndpoin
    tOrchestrator.exe.config successful.
    Backup file C:\Program Files\Sophos\Patch\PatchServerCommunicator\PatchServerCom
    municator.exe.config successful.
    Backup file C:\Program Files\Sophos\Patch\SQL Tasks\SQLTasks.exe.config successf
    ul.

    C:\Program Files\Sophos\Enterprise Console>sqlcmd -E -S "(local)\SOPHOS" -b -Q "
    BACKUP DATABASE SOPHOS50 TO DISK = 'SOPHOS50.bak'"
    Processed 523984 pages for database 'SOPHOS50', file 'SOPHOS50' on file 1.
    Processed 6 pages for database 'SOPHOS50', file 'SOPHOS50_log' on file 1.
    BACKUP DATABASE successfully processed 523990 pages in 318.681 seconds (12.845 M
    B/sec).
    Succeeded
    Backup successfully for registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Sophos\Certifi
    cation Manager
    Backup successfully for registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Sophos\EE\Mana
    gement Tools
    Backup successfully for registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Sophos\Managem
    entServer
    Successful operations on secure store.
    Backup file C:\Program Files\Sophos\Enterprise Console\EnterpriseConsole.exe.con
    fig successful.
    Backup file C:\Program Files\Sophos\Enterprise Console\MgntSvc.exe.config succes
    sful.
    Backup file C:\Program Files\Sophos\Enterprise Console\PurgeDB.exe.config succes
    sful.
    Backup file C:\Program Files\Sophos\Enterprise Console\Sophos.FrontEnd.Service.e
    xe.config successful.
    Backup file C:\Program Files\Sophos\Enterprise Console\Sophos.Management.Data.dl
    l.config successful.
    Backup file C:\Program Files\Sophos\Enterprise Console\DataBackupRestore.exe.con
    fig successful.
    Backup file C:\Program Files\Sophos\Enterprise Console\Sophos.PatchUI.ExtensionM
    odule.dll.config successful.
    Backup file C:\Program Files\Sophos\Enterprise Console\Sophos.UIController.dll.c
    onfig successful.
    Backup file C:\Program Files\Sophos\Enterprise Console\SUM\cac.pem successful.
    Backup file C:\Program Files\Sophos\Enterprise Console\Plugins\DirectoryService\
    Sophos.Management.DirectoryService.dll.config successful.
    Backup file C:\Program Files\Sophos\Enterprise Console\Plugins\WebControl\Sophos
    .WebControl.FrontEnd.dll.config successful.
    Backup file C:\Program Files\Sophos\Enterprise Console\Plugins\WebControl\Sophos
    .WebControl.FrontEnd.Logging.config successful.

    Build succeeded.

    Time Elapsed 00:06:27.45

    :36317
  • Hello DimitrijeJPGS,

    I must admit I have no idea why it fails.

    database connection in registry points to old server

    Probably not the cause but anyway - as DataBackupRestore just copies the registry keys, what's in DatabaseConnectionMS on the old server? Normally it should be (local)\SOPHOS - if there is a specific server name this has to be corrected on the new one.

    Nevertheless - from your first post it looks like it's assuming the backup is from SQL 2005 which is, if I understand you correctly, not the case. As the restore script tries 2008 first and issues a message if this fails - did you get any other errors than the ones you've posted? Just one more question - what's the size of SOPHOS50.bak?

    Christian

    :36321
  • the registry sais local\sophos

    and the sophos50.bk is more then 4gb ...

    and I don't get anymore error then those I posted...

    :36329
  • the registry says local\sophos

    This - assuming it is (local) - shouldn't cause the "new" management server to connect to the "old" database. When you had to change it - can you remember what was there instead on the new server?

    Dunno where the likely error disappeared to - as said before, it's apparently trying SQL2005 (in TRS.bat or RestoreDB.bat) and that this fails at RESTORE HEADERONLY) is expected given you run 2008. It should only try 2005 though if there was a failure when trying 2008 (in which case it should at least echo SQL2008 Statement failed, try SQL2005 statement).

    Christian

    :36331
  • Hi, We are getting the same database retore error message as the above. Was there a solution for this?

    We are migrating from SEC 5.1 on SBS2008 to SEC 5.2 on Server 2012 R2 (SQL 2012)

    Any help would be much appreciated.

    :51038