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:
- On the SQL server, open a command prompt (Click Start | Run and type
cmd, then press Enter)
- 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.
- Where 'database_name' is the name of the database you wish to move, execute
ALTER DATABASE database_name SET OFFLINE;
- Move the physical file or files associated with the database to the new location.
- 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' );
- Run the following statement.
ALTER DATABASE database_name SET ONLINE;
- 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: