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

Sophos Endpoint Migration Build failed

Hi trying to migrate from same version 5.5.1 server 2012 to sever 2016 5.5.1 

Build Failed everytime here is the error 

 

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\Users\Administrator.SWP>cd c:\

c:\>cd %ALLUSERSPROFILE%

C:\ProgramData>cd sophos

C:\ProgramData\Sophos>cd managementserver

C:\ProgramData\Sophos\ManagementServer>dir
Volume in drive C has no label.
Volume Serial Number is 86BC-5344

Directory of C:\ProgramData\Sophos\ManagementServer

23/07/2018 14:21 <DIR> .
23/07/2018 14:21 <DIR> ..
23/07/2018 14:22 <DIR> Backup
23/07/2018 13:46 <DIR> log
0 File(s) 0 bytes
4 Dir(s) 623,793,913,856 bytes free

C:\ProgramData\Sophos\ManagementServer>cd backup

C:\ProgramData\Sophos\ManagementServer\Backup>dir
Volume in drive C has no label.
Volume Serial Number is 86BC-5344

Directory of C:\ProgramData\Sophos\ManagementServer\Backup

23/07/2018 14:22 <DIR> .
23/07/2018 14:22 <DIR> ..
23/07/2018 20:03 34,744 CertificationManager.reg
23/07/2018 15:03 <DIR> DataBackupRestore
23/07/2018 14:22 <DIR> Databases
23/07/2018 20:02 1,094 EEPatch.reg
23/07/2018 20:03 196 ManagementServer.reg
23/07/2018 20:03 37,890 ManagementTools.reg
23/07/2018 20:02 3,698 Patch.reg
23/07/2018 14:22 <DIR> Router
23/07/2018 20:03 1,254 SEC_SecureStore.bak
23/07/2018 20:03 446 SophosEnterpriseConsole.reg
7 File(s) 79,322 bytes
5 Dir(s) 623,793,913,856 bytes free

C:\ProgramData\Sophos\ManagementServer\Backup>cd databackuprestore

C:\ProgramData\Sophos\ManagementServer\Backup\DataBackupRestore>databackuprestore -action=restore -datasourcetype=database
Are you sure you want to restore database in all? (Y/N)
y
Microsoft (R) Build Engine version 4.6.1586.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 24/07/2018 11:54:29.
Copy file C:\ProgramData\Sophos\ManagementServer\Backup\Databases\SOPHOSPATCH52.bak successful.

C:\ProgramData\Sophos\ManagementServer\Backup\DataBackupRestore>sqlcmd -E -S "(local)\SOPHOS" -d "master" -b -Q "IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N'SOPHOSPATCH52') BEGIN ALTER DATABASE SOPHOSPATCH52 SET OFFLINE WITH ROLLBACK AFTER 5 END"
Attempting restore with SQL2016 backup schema.

C:\ProgramData\Sophos\ManagementServer\Backup\DataBackupRestore>sqlcmd -E -S "(local)\SOPHOS" -d "master" -b -Q "DECLARE @backup_path NVARCHAR(260); SET @backup_path = N'C:\ProgramData\Sophos\TempData\SOPHOSPATCH52.bak'; DECLARE @mdf_path varchar(260); SELECT @mdf_path = physical_name FROM sys.master_files WHERE database_id = DB_ID(N'SOPHOSPATCH52') AND type = 0; DECLARE @ldf_path varchar(260); SELECT @ldf_path = physical_name FROM sys.master_files WHERE database_id = DB_ID(N'SOPHOSPATCH52') AND type = 1; CREATE TABLE #backupSetInfo (BackupName NVARCHAR(128),BackupDescription NVARCHAR(255),BackupType smallint,ExpirationDate datetime,Compressed tinyint,Position smallint,DeviceType tinyint,UserName NVARCHAR(128),ServerName NVARCHAR(128),DatabaseName NVARCHAR(128),DatabaseVersion INT,DatabaseCreationDate datetime,BackupSize numeric(20,0),FirstLSN numeric(25,0),LastLSN numeric(25,0),CheckpointLSN numeric(25,0),DatabaseBackupLSN numeric(25,0),BackupStartDate datetime,BackupFinishDate datetime,SortOrder smallint,CodePage smallint,UnicodeLocaleId INT,UnicodeComparisonStyle INT,CompatibilityLevel tinyint,SoftwareVendorId INT,SoftwareVersionMajor INT,SoftwareVersionMinor INT,SoftwareVersionBuild INT,MachineName NVARCHAR(128),Flags INT,BindingID uniqueidentifier,RecoveryForkID uniqueidentifier,Collation NVARCHAR(128),FamilyGUID uniqueidentifier,HasBulkLoggedData INT,IsSnapshot INT,IsReadOnly INT,IsSingleUser INT,HasBackupChecksums INT,IsDamaged INT,BeginsLogChain INT,HasIncompleteMetaData INT,IsForceOffline INT,IsCopyOnly INT,FirstRecoveryForkID uniqueidentifier,ForkPointLSN numeric(25,0),RecoveryModel NVARCHAR(128),DifferentialBaseLSN numeric(25,0),DifferentialBaseGUID uniqueidentifier,BackupTypeDescription NVARCHAR(128),BackupSetGUID uniqueidentifier,CompressedBackupSize bigint,containment tinyint, KeyAlgorithm nvarchar(32), EncryptorThumbprint varbinary(20), EncryptorType nvarchar(32)); CREATE TABLE #backupFileInfo (LogicalName varchar(128),PhysicalName varchar(260),Type varchar(1),FileGroupName varchar(128) ,Size numeric(20,0) ,MaxSize numeric(20,0),FileId bigint,CreateLSN numeric(25,0),DropLSN numeric(25,0),UniqueId uniqueidentifier,ReadOnlyLSN numeric(25,0),ReadWriteLSN numeric(25,0),BackupSizeInBytes bigint,SourceBlockSize int,FileGroupId int,LogGroupGUID uniqueidentifier,DifferentialBaseLSN numeric(25,0),DifferentialBaseGUID uniqueidentifier,IsReadOnly bit,IsPresent bit ,TDEThumbprint varbinary(32),SnapshotURL nvarchar(360)); INSERT #backupSetInfo EXEC('RESTORE HEADERONLY FROM DISK=N''' + @backup_path + N''''); INSERT #backupFileInfo EXEC('RESTORE FILELISTONLY FROM DISK=N''' + @backup_path + N''''); DECLARE @backup_set_number smallint; SELECT TOP(1) @backup_set_number = Position FROM #backupSetInfo ORDER BY BackupFinishDate DESC; DECLARE @mdf_name varchar(255); SELECT TOP(1) @mdf_name = LogicalName from #backupFileInfo where Type = 'D'; DECLARE @ldf_name varchar(255); SELECT TOP(1) @ldf_name = LogicalName from #backupFileInfo where Type = 'L'; IF @mdf_path IS NOT NULL BEGIN RESTORE DATABASE SOPHOSPATCH52 FROM DISK = @backup_path WITH FILE = @backup_set_number, REPLACE, RECOVERY, MOVE @mdf_name TO @mdf_path, MOVE @ldf_name TO @ldf_path; END ELSE BEGIN RESTORE DATABASE SOPHOSPATCH52 FROM DISK = @backup_path WITH FILE = @backup_set_number, REPLACE, RECOVERY; END; DROP TABLE #backupFileInfo; DROP TABLE #backupSetInfo;"
Msg 213, Level 16, State 7, Server SERVER1\SOPHOS, Line 1
Column name or number of supplied values does not match table definition.
Msg 3013, Level 16, State 1, Server SERVER1\SOPHOS, Line 1
RESTORE HEADERONLY is terminating abnormally.
Msg 213, Level 16, State 7, Server SERVER1\SOPHOS, Line 1
Column name or number of supplied values does not match table definition.
Msg 3013, Level 16, State 1, Server SERVER1\SOPHOS, Line 1
RESTORE FILELIST is terminating abnormally.
Msg 8114, Level 16, State 12, Server SERVER1\SOPHOS, Line 1
Error converting data type varchar to nvarchar.
Attempting restore with SQL2014 SP1 backup schema.

C:\ProgramData\Sophos\ManagementServer\Backup\DataBackupRestore>sqlcmd -E -S "(local)\SOPHOS" -d "master" -b -Q "DECLARE @backup_path NVARCHAR(260); SET @backup_path = N'C:\ProgramData\Sophos\TempData\SOPHOSPATCH52.bak'; DECLARE @mdf_path varchar(260); SELECT @mdf_path = physical_name FROM sys.master_files WHERE database_id = DB_ID(N'SOPHOSPATCH52') AND type = 0; DECLARE @ldf_path varchar(260); SELECT @ldf_path = physical_name FROM sys.master_files WHERE database_id = DB_ID(N'SOPHOSPATCH52') AND type = 1; CREATE TABLE #backupSetInfo (BackupName NVARCHAR(128),BackupDescription NVARCHAR(255),BackupType smallint,ExpirationDate datetime,Compressed tinyint,Position smallint,DeviceType tinyint,UserName NVARCHAR(128),ServerName NVARCHAR(128),DatabaseName NVARCHAR(128),DatabaseVersion INT,DatabaseCreationDate datetime,BackupSize numeric(20,0),FirstLSN numeric(25,0),LastLSN numeric(25,0),CheckpointLSN numeric(25,0),DatabaseBackupLSN numeric(25,0),BackupStartDate datetime,BackupFinishDate datetime,SortOrder smallint,CodePage smallint,UnicodeLocaleId INT,UnicodeComparisonStyle INT,CompatibilityLevel tinyint,SoftwareVendorId INT,SoftwareVersionMajor INT,SoftwareVersionMinor INT,SoftwareVersionBuild INT,MachineName NVARCHAR(128),Flags INT,BindingID uniqueidentifier,RecoveryForkID uniqueidentifier,Collation NVARCHAR(128),FamilyGUID uniqueidentifier,HasBulkLoggedData INT,IsSnapshot INT,IsReadOnly INT,IsSingleUser INT,HasBackupChecksums INT,IsDamaged INT,BeginsLogChain INT,HasIncompleteMetaData INT,IsForceOffline INT,IsCopyOnly INT,FirstRecoveryForkID uniqueidentifier,ForkPointLSN numeric(25,0),RecoveryModel NVARCHAR(128),DifferentialBaseLSN numeric(25,0),DifferentialBaseGUID uniqueidentifier,BackupTypeDescription NVARCHAR(128),BackupSetGUID uniqueidentifier,CompressedBackupSize bigint,containment tinyint, KeyAlgorithm nvarchar(32), EncryptorThumbprint varbinary(20), EncryptorType nvarchar(32)); CREATE TABLE #backupFileInfo (LogicalName varchar(128),PhysicalName varchar(260),Type varchar(1),FileGroupName varchar(128) ,Size numeric(20,0) ,MaxSize numeric(20,0),FileId bigint,CreateLSN numeric(25,0),DropLSN numeric(25,0),UniqueId uniqueidentifier,ReadOnlyLSN numeric(25,0),ReadWriteLSN numeric(25,0),BackupSizeInBytes bigint,SourceBlockSize int,FileGroupId int,LogGroupGUID uniqueidentifier,DifferentialBaseLSN numeric(25,0),DifferentialBaseGUID uniqueidentifier,IsReadOnly bit,IsPresent bit ,TDEThumbprint varbinary(32)); INSERT #backupSetInfo EXEC('RESTORE HEADERONLY FROM DISK=N''' + @backup_path + N''''); INSERT #backupFileInfo EXEC('RESTORE FILELISTONLY FROM DISK=N''' + @backup_path + N''''); DECLARE @backup_set_number smallint; SELECT TOP(1) @backup_set_number = Position FROM #backupSetInfo ORDER BY BackupFinishDate DESC; DECLARE @mdf_name varchar(255); SELECT TOP(1) @mdf_name = LogicalName from #backupFileInfo where Type = 'D'; DECLARE @ldf_name varchar(255); SELECT TOP(1) @ldf_name = LogicalName from #backupFileInfo where Type = 'L'; IF @mdf_path IS NOT NULL BEGIN RESTORE DATABASE SOPHOSPATCH52 FROM DISK = @backup_path WITH FILE = @backup_set_number, REPLACE, RECOVERY, MOVE @mdf_name TO @mdf_path, MOVE @ldf_name TO @ldf_path; END ELSE BEGIN RESTORE DATABASE SOPHOSPATCH52 FROM DISK = @backup_path WITH FILE = @backup_set_number, REPLACE, RECOVERY; END; DROP TABLE #backupFileInfo; DROP TABLE #backupSetInfo;"
Msg 213, Level 16, State 7, Server SERVER1\SOPHOS, Line 1
Column name or number of supplied values does not match table definition.
Msg 3013, Level 16, State 1, Server SERVER1\SOPHOS, Line 1
RESTORE HEADERONLY is terminating abnormally.

(2 rows affected)
Msg 3250, Level 16, State 1, Server SERVER1\SOPHOS, Line 1
The value '0' is not within range for the FILE parameter.
Msg 3013, Level 16, State 1, Server SERVER1\SOPHOS, Line 1
RESTORE DATABASE is terminating abnormally.
Attempting restore with SQL2012/SQL2014 backup schema.

C:\ProgramData\Sophos\ManagementServer\Backup\DataBackupRestore>sqlcmd -E -S "(local)\SOPHOS" -d "master" -b -Q "DECLARE @backup_path NVARCHAR(260); SET @backup_path = N'C:\ProgramData\Sophos\TempData\SOPHOSPATCH52.bak'; DECLARE @mdf_path varchar(260); SELECT @mdf_path = physical_name FROM sys.master_files WHERE database_id = DB_ID(N'SOPHOSPATCH52') AND type = 0; DECLARE @ldf_path varchar(260); SELECT @ldf_path = physical_name FROM sys.master_files WHERE database_id = DB_ID(N'SOPHOSPATCH52') AND type = 1; CREATE TABLE #backupSetInfo (BackupName NVARCHAR(128),BackupDescription NVARCHAR(255),BackupType smallint,ExpirationDate datetime,Compressed tinyint,Position smallint,DeviceType tinyint,UserName NVARCHAR(128),ServerName NVARCHAR(128),DatabaseName NVARCHAR(128),DatabaseVersion INT,DatabaseCreationDate datetime,BackupSize numeric(20,0),FirstLSN numeric(25,0),LastLSN numeric(25,0),CheckpointLSN numeric(25,0),DatabaseBackupLSN numeric(25,0),BackupStartDate datetime,BackupFinishDate datetime,SortOrder smallint,CodePage smallint,UnicodeLocaleId INT,UnicodeComparisonStyle INT,CompatibilityLevel tinyint,SoftwareVendorId INT,SoftwareVersionMajor INT,SoftwareVersionMinor INT,SoftwareVersionBuild INT,MachineName NVARCHAR(128),Flags INT,BindingID uniqueidentifier,RecoveryForkID uniqueidentifier,Collation NVARCHAR(128),FamilyGUID uniqueidentifier,HasBulkLoggedData INT,IsSnapshot INT,IsReadOnly INT,IsSingleUser INT,HasBackupChecksums INT,IsDamaged INT,BeginsLogChain INT,HasIncompleteMetaData INT,IsForceOffline INT,IsCopyOnly INT,FirstRecoveryForkID uniqueidentifier,ForkPointLSN numeric(25,0),RecoveryModel NVARCHAR(128),DifferentialBaseLSN numeric(25,0),DifferentialBaseGUID uniqueidentifier,BackupTypeDescription NVARCHAR(128),BackupSetGUID uniqueidentifier,CompressedBackupSize bigint,containment tinyint); CREATE TABLE #backupFileInfo (LogicalName varchar(128),PhysicalName varchar(260),Type varchar(1),FileGroupName varchar(128) ,Size numeric(20,0) ,MaxSize numeric(20,0),FileId bigint,CreateLSN numeric(25,0),DropLSN numeric(25,0),UniqueId uniqueidentifier,ReadOnlyLSN numeric(25,0),ReadWriteLSN numeric(25,0),BackupSizeInBytes bigint,SourceBlockSize int,FileGroupId int,LogGroupGUID uniqueidentifier,DifferentialBaseLSN numeric(25,0),DifferentialBaseGUID uniqueidentifier,IsReadOnly bit,IsPresent bit ,TDEThumbprint varbinary(32)); INSERT #backupSetInfo EXEC('RESTORE HEADERONLY FROM DISK=N''' + @backup_path + N''''); INSERT #backupFileInfo EXEC('RESTORE FILELISTONLY FROM DISK=N''' + @backup_path + N''''); DECLARE @backup_set_number smallint; SELECT TOP(1) @backup_set_number = Position FROM #backupSetInfo ORDER BY BackupFinishDate DESC; DECLARE @mdf_name varchar(255); SELECT TOP(1) @mdf_name = LogicalName from #backupFileInfo where Type = 'D'; DECLARE @ldf_name varchar(255); SELECT TOP(1) @ldf_name = LogicalName from #backupFileInfo where Type = 'L'; IF @mdf_path IS NOT NULL BEGIN RESTORE DATABASE SOPHOSPATCH52 FROM DISK = @backup_path WITH FILE = @backup_set_number, REPLACE, RECOVERY, MOVE @mdf_name TO @mdf_path, MOVE @ldf_name TO @ldf_path; END ELSE BEGIN RESTORE DATABASE SOPHOSPATCH52 FROM DISK = @backup_path WITH FILE = @backup_set_number, REPLACE, RECOVERY; END; DROP TABLE #backupFileInfo; DROP TABLE #backupSetInfo;"
Msg 213, Level 16, State 7, Server SERVER1\SOPHOS, Line 1
Column name or number of supplied values does not match table definition.
Msg 3013, Level 16, State 1, Server SERVER1\SOPHOS, Line 1
RESTORE HEADERONLY is terminating abnormally.

(2 rows affected)
Msg 3250, Level 16, State 1, Server SERVER1\SOPHOS, Line 1
The value '0' is not within range for the FILE parameter.
Msg 3013, Level 16, State 1, Server SERVER1\SOPHOS, Line 1
RESTORE DATABASE is terminating abnormally.
Attempting restore with SQL2008/SQL2008R2 backup schema.

C:\ProgramData\Sophos\ManagementServer\Backup\DataBackupRestore>sqlcmd -E -S "(local)\SOPHOS" -d "master" -b -Q "DECLARE @backup_path NVARCHAR(260); SET @backup_path = N'C:\ProgramData\Sophos\TempData\SOPHOSPATCH52.bak'; DECLARE @mdf_path varchar(260); SELECT @mdf_path = physical_name FROM sys.master_files WHERE database_id = DB_ID(N'SOPHOSPATCH52') AND type = 0; DECLARE @ldf_path varchar(260); SELECT @ldf_path = physical_name FROM sys.master_files WHERE database_id = DB_ID(N'SOPHOSPATCH52') AND type = 1; CREATE TABLE #backupSetInfo (BackupName NVARCHAR(128),BackupDescription NVARCHAR(255),BackupType smallint,ExpirationDate datetime,Compressed tinyint,Position smallint,DeviceType tinyint,UserName NVARCHAR(128),ServerName NVARCHAR(128),DatabaseName NVARCHAR(128),DatabaseVersion INT,DatabaseCreationDate datetime,BackupSize numeric(20,0),FirstLSN numeric(25,0),LastLSN numeric(25,0),CheckpointLSN numeric(25,0),DatabaseBackupLSN numeric(25,0),BackupStartDate datetime,BackupFinishDate datetime,SortOrder smallint,CodePage smallint,UnicodeLocaleId INT,UnicodeComparisonStyle INT,CompatibilityLevel tinyint,SoftwareVendorId INT,SoftwareVersionMajor INT,SoftwareVersionMinor INT,SoftwareVersionBuild INT,MachineName NVARCHAR(128),Flags INT,BindingID uniqueidentifier,RecoveryForkID uniqueidentifier,Collation NVARCHAR(128),FamilyGUID uniqueidentifier,HasBulkLoggedData INT,IsSnapshot INT,IsReadOnly INT,IsSingleUser INT,HasBackupChecksums INT,IsDamaged INT,BeginsLogChain INT,HasIncompleteMetaData INT,IsForceOffline INT,IsCopyOnly INT,FirstRecoveryForkID uniqueidentifier,ForkPointLSN numeric(25,0),RecoveryModel NVARCHAR(128),DifferentialBaseLSN numeric(25,0),DifferentialBaseGUID uniqueidentifier,BackupTypeDescription NVARCHAR(128),BackupSetGUID uniqueidentifier,CompressedBackupSize bigint); CREATE TABLE #backupFileInfo (LogicalName varchar(128),PhysicalName varchar(260),Type varchar(1),FileGroupName varchar(128) ,Size numeric(20,0) ,MaxSize numeric(20,0),FileId bigint,CreateLSN numeric(25,0),DropLSN numeric(25,0),UniqueId uniqueidentifier,ReadOnlyLSN numeric(25,0),ReadWriteLSN numeric(25,0),BackupSizeInBytes bigint,SourceBlockSize int,FileGroupId int,LogGroupGUID uniqueidentifier,DifferentialBaseLSN numeric(25,0),DifferentialBaseGUID uniqueidentifier,IsReadOnly bit,IsPresent bit ,TDEThumbprint varbinary(32)); INSERT #backupSetInfo EXEC('RESTORE HEADERONLY FROM DISK=N''' + @backup_path + N''''); INSERT #backupFileInfo EXEC('RESTORE FILELISTONLY FROM DISK=N''' + @backup_path + N''''); DECLARE @backup_set_number smallint; SELECT TOP(1) @backup_set_number = Position FROM #backupSetInfo ORDER BY BackupFinishDate DESC; DECLARE @mdf_name varchar(255); SELECT TOP(1) @mdf_name = LogicalName from #backupFileInfo where Type = 'D'; DECLARE @ldf_name varchar(255); SELECT TOP(1) @ldf_name = LogicalName from #backupFileInfo where Type = 'L'; IF @mdf_path IS NOT NULL BEGIN RESTORE DATABASE SOPHOSPATCH52 FROM DISK = @backup_path WITH FILE = @backup_set_number, REPLACE, RECOVERY, MOVE @mdf_name TO @mdf_path, MOVE @ldf_name TO @ldf_path; END ELSE BEGIN RESTORE DATABASE SOPHOSPATCH52 FROM DISK = @backup_path WITH FILE = @backup_set_number, REPLACE, RECOVERY; END; DROP TABLE #backupFileInfo; DROP TABLE #backupSetInfo;"

(1 rows affected)
Msg 3169, Level 16, State 1, Server SERVER1\SOPHOS, Line 1
The database was backed up on a server running version 10.50.2500. That version is incompatible with this server, which is running version 10.00.4000. Either restore the database on a server that supports the backup, or use a backup that is compatible with this server.
Msg 3013, Level 16, State 1, Server SERVER1\SOPHOS, Line 1
RESTORE DATABASE is terminating abnormally.
Attempting restore with SQL2005 backup schema.

C:\ProgramData\Sophos\ManagementServer\Backup\DataBackupRestore>sqlcmd -E -S "(local)\SOPHOS" -d "master" -b -Q "DECLARE @backup_path NVARCHAR(260); SET @backup_path = N'C:\ProgramData\Sophos\TempData\SOPHOSPATCH52.bak'; DECLARE @mdf_path varchar(260); SELECT @mdf_path = physical_name FROM sys.master_files WHERE database_id = DB_ID(N'SOPHOSPATCH52') AND type = 0; DECLARE @ldf_path varchar(260); SELECT @ldf_path = physical_name FROM sys.master_files WHERE database_id = DB_ID(N'SOPHOSPATCH52') AND type = 1; CREATE TABLE #backupSetInfo (BackupName NVARCHAR(128),BackupDescription NVARCHAR(255),BackupType smallint,ExpirationDate datetime,Compressed tinyint,Position smallint,DeviceType tinyint,UserName NVARCHAR(128),ServerName NVARCHAR(128),DatabaseName NVARCHAR(128),DatabaseVersion INT,DatabaseCreationDate datetime,BackupSize numeric(20,0),FirstLSN numeric(25,0),LastLSN numeric(25,0),CheckpointLSN numeric(25,0),DatabaseBackupLSN numeric(25,0),BackupStartDate datetime,BackupFinishDate datetime,SortOrder smallint,CodePage smallint,UnicodeLocaleId INT,UnicodeComparisonStyle INT,CompatibilityLevel tinyint,SoftwareVendorId INT,SoftwareVersionMajor INT,SoftwareVersionMinor INT,SoftwareVersionBuild INT,MachineName NVARCHAR(128),Flags INT,BindingID uniqueidentifier,RecoveryForkID uniqueidentifier,Collation NVARCHAR(128),FamilyGUID uniqueidentifier,HasBulkLoggedData INT,IsSnapshot INT,IsReadOnly INT,IsSingleUser INT,HasBackupChecksums INT,IsDamaged INT,BeginsLogChain INT,HasIncompleteMetaData INT,IsForceOffline INT,IsCopyOnly INT,FirstRecoveryForkID uniqueidentifier,ForkPointLSN numeric(25,0),RecoveryModel NVARCHAR(128),DifferentialBaseLSN numeric(25,0),DifferentialBaseGUID uniqueidentifier,BackupTypeDescription NVARCHAR(128),BackupSetGUID uniqueidentifier); CREATE TABLE #backupFileInfo (LogicalName varchar(128),PhysicalName varchar(260),Type varchar(1),FileGroupName varchar(128) ,Size numeric(20,0) ,MaxSize numeric(20,0),FileId bigint,CreateLSN numeric(25,0),DropLSN numeric(25,0),UniqueId uniqueidentifier,ReadOnlyLSN numeric(25,0),ReadWriteLSN numeric(25,0),BackupSizeInBytes bigint,SourceBlockSize int,FileGroupId int,LogGroupGUID uniqueidentifier,DifferentialBaseLSN numeric(25,0),DifferentialBaseGUID uniqueidentifier,IsReadOnly bit,IsPresent bit ); INSERT #backupSetInfo EXEC('RESTORE HEADERONLY FROM DISK=N''' + @backup_path + N''''); INSERT #backupFileInfo EXEC('RESTORE FILELISTONLY FROM DISK=N''' + @backup_path + N''''); DECLARE @backup_set_number smallint; SELECT TOP(1) @backup_set_number = Position FROM #backupSetInfo ORDER BY BackupFinishDate DESC; DECLARE @mdf_name varchar(255); SELECT TOP(1) @mdf_name = LogicalName from #backupFileInfo where Type = 'D'; DECLARE @ldf_name varchar(255); SELECT TOP(1) @ldf_name = LogicalName from #backupFileInfo where Type = 'L'; IF @mdf_path IS NOT NULL BEGIN RESTORE DATABASE SOPHOSPATCH52 FROM DISK = @backup_path WITH FILE = @backup_set_number, REPLACE, RECOVERY, MOVE @mdf_name TO @mdf_path, MOVE @ldf_name TO @ldf_path; END ELSE BEGIN RESTORE DATABASE SOPHOSPATCH52 FROM DISK = @backup_path WITH FILE = @backup_set_number, REPLACE, RECOVERY; END; DROP TABLE #backupFileInfo; DROP TABLE #backupSetInfo;"
Msg 213, Level 16, State 7, Server SERVER1\SOPHOS, Line 1
Column name or number of supplied values does not match table definition.
Msg 3013, Level 16, State 1, Server SERVER1\SOPHOS, Line 1
RESTORE HEADERONLY is terminating abnormally.
Msg 213, Level 16, State 7, Server SERVER1\SOPHOS, Line 1
Column name or number of supplied values does not match table definition.
Msg 3013, Level 16, State 1, Server SERVER1\SOPHOS, Line 1
RESTORE FILELIST is terminating abnormally.
Msg 8114, Level 16, State 12, Server SERVER1\SOPHOS, Line 1
Error converting data type varchar to nvarchar.
Failed to restore

C:\ProgramData\Sophos\ManagementServer\Backup\DataBackupRestore>sqlcmd -E -S "(local)\SOPHOS" -d "master" -b -Q "ALTER DATABASE SOPHOSPATCH52 SET ONLINE"

C:\ProgramData\Sophos\ManagementServer\Backup\DataBackupRestore>sqlcmd -E -S "(local)\SOPHOS" -d "SOPHOSPATCH52" -b -i ResetUserMappings.sql
Process 'C:\ProgramData\Sophos\ManagementServer\Backup\DataBackupRestore\TRS.bat (local)\SOPHOS SOPHOSPATCH52 "C:\ProgramData\Sophos\TempData\SOPHOSPATCH52.bak"' returned Error 1

Build FAILED.

Time Elapsed 00:00:57.75
Process 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe "C:\ProgramData\Sophos\ManagementServer\Backup\DataBackupRestore"\BackupRestore.proj /t:restore /clp:NoSummary /p:SubSystem=all;DataSourceType=database;ExcludeDB=False;LocationSpecific=False;SlientMode=False;DBServerInstance=' returned Error 1

C:\ProgramData\Sophos\ManagementServer\Backup\DataBackupRestore>

 

Please Help



This thread was automatically locked due to age.