By default, the Sophos database will restore to the C drive on the server, this cannot be changed during installation. In order to change the drive that the database files are located it is necessary to back up the database, drop it, then restore to the new location. This article will guide you through each of these required steps and should be used when a specific storage location is needed for the database other than the default set by Microsoft SQL Server.
This article does not apply if you want to move the database to another computer, this is covered in the following articles:
Applies to the following Sophos products and versions Enterprise Console
Before proceeding, you will need to have installed SQL Server Management Studio Express and have Sophos Enterprise Console closed to avoid database connection errors during the steps.
1. Backup the database
This will create a backup (.bak file) which we will restore in the desired location in step 3. Refer to Sophos article 17323 to obtain a list of database names based on the installed version, make a note of these as they will be required at various stages in the article.
2. Drop the database
This will delete the database and any connections to the database, it would be advisable to do this out of hours to avoid any possible disruption. The below assumes you are using the default SQL instance named Sophos, please amend .\SOPHOS if you are using a different named instance
sqlcmd -E -S .\SOPHOS -Q "DROP DATABASE SOPHOSXX"
If performing these steps for Enterprise Console 5 and above you will need to repeat the above steps for the additional databases.
3. Restoring the database
C:\Program Files\Microsoft SQL Server\MSSQL10.SOPHOS\MSSQL\DATA\databasename.mdf
C:\Program Files\Microsoft SQL Server\MSSQL10.SOPHOS\MSSQL\DATA\databasename_1.ldf
If you've spotted an error or would like to provide feedback on this article, please use the section below to rate and comment on the article. This is invaluable to us to ensure that we continually strive to give our customers the best information possible.
Every comment submitted here is read (by a human) but we do not reply to specific technical questions. For technical support post a question to the community. Or click here for new feature/product improvements. Alternatively for paid/licensed products open a support ticket.