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 Enterprise database migration issue

Hi guys

I'm trying to migrate our company sophos onto another server

Currently server ( windows server 2003, Running Sophos Enterprise 4.0.0.2362, using sql 2005)

Server I'm planning to upgrade to ( windows server 2008 service pack 2, Running Sophos Enterprise 4.5, using sql 2008)

The issue I get is when I try to import the database I get the following error message

Disabling access to the database ...

c:\Program Files\Sophos\Enterprise Console\DB>osql -E -S "SOPHOS\SOPHOS" -d "mas
ter" -n -b -Q "IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name =
N'SOPHOS45') BEGIN ALTER DATABASE SOPHOS45 SET OFFLINE WITH ROLLBACK AFTER 5 END
"

Restoring the database ...

c:\Program Files\Sophos\Enterprise Console\DB>osql -E -S "SOPHOS\SOPHOS" -d "mas
ter" -n -b -Q "RESTORE DATABASE SOPHOS45 FROM DISK = 'c:\SECBackup\SOPHOS.bak' W
ITH REPLACE, RECOVERY"
Msg 5133, Level 16, State 1, Server SOPHOS\SOPHOS, Line 1
Directory lookup for the file "C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\DATA\SOPHOS4.mdf" failed with the operating system error
3(failed to retrieve text for this error. Reason: 15100).
Msg 3156, Level 16, State 3, Server SOPHOS\SOPHOS, Line 1
File 'SOPHOS4' cannot be restored to 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\DATA\SOPHOS4.mdf'. Use WITH MOVE to identify a valid
location for the file.
Msg 5133, Level 16, State 1, Server SOPHOS\SOPHOS, Line 1
Directory lookup for the file "C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\DATA\SOPHOS4_log.LDF" failed with the operating system
error 3(failed to retrieve text for this error. Reason: 15105).
Msg 3156, Level 16, State 3, Server SOPHOS\SOPHOS, Line 1
File 'SOPHOS4_log' cannot be restored to 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\DATA\SOPHOS4_log.LDF'. Use WITH MOVE to identify a valid
location for the file.
Msg 3119, Level 16, State 1, Server SOPHOS\SOPHOS, Line 1
Problems were identified while planning for the RESTORE statement. Previous
messages provide details.
Msg 3013, Level 16, State 1, Server SOPHOS\SOPHOS, Line 1
RESTORE DATABASE is terminating abnormally.
Failed to restore

I'm not sure If I'm right but I would assume it would have something to do with going from sql 2005 to 2008. Could some please advice whether this is the case or not how to resolve this issue

Thanks

Tom

:smileyhappy:

:7599


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

    the exported SOPHOS4 database must be imported to a SOPHOS4 - not SOPHOS45. Sounds like you've already installed SEC4.5 and now you want to "migrate" the existing database to the new server - i.e. you want to to upgrade SEC and move to a different server? 

    Christian   

    :7601
  • Yeah I have exported the database of the old version running 4.0 and want to import this database on the new machine running 4.5.

    Am I unable to do this would I need to upgrade the old server to 4.5 first

    :7603
  • RestoreDB takes the database name as optional third argument. After you have restored the SOPHOS4 database you must run UpgradeDB.exe. 

    Have you already planned how to "move" the clients to the new server?

    Christian

    :7605
  • Everytime I try to import the old database its fails sophos thought this was a connection issue to my sql server.

    I successfully export and imported my new database without any problems

    Does this point that the database I'm trying to import is corrupt

    :7913
  • Hi, I am also seeing this - attempting to migrate with new identity from a Windows 2k3 server to 2008 R2. Also going from Sophos 4.0 to 4.5 - at the point where I attempt a "restoredb <path>\sophos.bak" I get the same result as Tom. Any clues on this? What additional info should I provide here?

    Any help appreciated,

    James 

    :10491
  • Hello James,

    so you did backup your SOPHOS4 database on the W2k3 server (which SQL version?) and are trying to restore it on the W2k8R2 (again, SQL version?) where SEC 4.5 is already installed? Thus it should be

    restoredb <path>\sophos.bak <server\instance> SOPHOS4

    Note that the database backup contains the path to the database files and if the database to restore does not yet exist it must be valid on the new server (for example C:\Program Files\Microsoft SQL Server\MSSQL$SOPHOS\MSSQL\DATA\). To restore it to a different path simply create the SOPHOS4 database (sqlcmd -E -S <server\instance> -Q "CREATE Database SOPHOS4").  Most likely you'll get messages that the database is being upgraded (Database 'SOPHOS4' running the upgrade step from version <nnn> to version <nnn+1>.)

    HTH

    Christian

    :10499
  • Hi Christian, thanks for the reply.

    Yes, I used backupdb on the 2k3 server (SQL 9.00.3042.00 - 2005 sp2 - build 3790), but the SEC version is 4.0. Have just had a very useful phone conversation, the conclusion being that I should upgrade to SQL 2005 SP3 first, and then SEC 4.5 before attempting another export. Another option would be to manually recreate our AD syncs etc., but I've been asked by my colleague to pursue the upgrade option first. Using VMWare, so potentially rolling back snapshots is a nice safety net!

    First class phone support btw :)

    Many thanks,

    James

    :10501
  • According to SQL view point the backup which you are using to restore becomes corrupted hence inducing error. Well in this case you must try SQL backup recovery software which has reliable and robust technique to recover it. Know more about: - http://www.sqlrecoverysoftware.net/sql-server-bak-file/

    :52935