How to move the PureMessage for Exchange databases to a different location

  • Article ID: 36323
  • Rating:
  • 2 customers rated this article 1.0 out of 6
  • Updated: 27 Feb 2013

In the event that the database files used by Sophos PureMessage for Exchange need to be relocated, for example if the disk is running out of space, the directions below can be followed to move the database files to a new location.

What to do:

The directions below were taken from this Microsoft MSDN article. These steps can be performed using SQL Management studio, or via the command line using SQLCMD. Please note that PureMessage will not be able to quarantine emails during the time the SavexQuar database is offline. These messages will be quarantined after the database comes back online. It is recommended that the steps below be carried out during a scheduled maintenance window.

Using SQL Management Studio:

Open SQL Management Studio and connect to the SQL server and instance that the Sophos PureMessage databases are attached to.

Using SQLCMD and the command prompt:

  1. On the SQL server, open a command prompt (Click Start | Run and type cmd, then press Enter)
  2. Connect to the SQL instance using SQLCMD by typing the following command.
    sqlcmd servername\instance -E -S
Note: The variable 'servername' and 'instance' are the name of the SQL server and the instance the database is attached to. For a default SOPHOS instance that is locally installed, use '.\SOPHOS'.

To relocate the databases follow the steps below. All of the steps are required for each database that is to be moved.

  1. Where 'database_name' is the name of the database you wish to move, execute
  2. Move the physical file or files associated with the database to the new location.
  3. For each file moved, run the following statement. Typically this will be two files per database, the MDF and LDF.
    ALTER DATABASE database_name MODIFY FILE ( NAME = logical_name, FILENAME = 'new_path\os_file_name' );
  4. Run the following statement.
    ALTER DATABASE database_name SET ONLINE;
  5. Verify the files were moved correctly change by running the following query.
    SELECT name, physical_name AS CurrentLocation, state_desc FROM sys.master_files WHERE database_id = DB_ID(N'<database_name>');

The names of the Sophos PureMessage databases are as follows:






If you need more information or guidance, then please contact technical support.

Rate this article

Very poor Excellent