In my previous post I ran you through deploying SQL Server Express if you didn’t already have it installed, and how to ensure that it is properly configured for use with GFI MailArchiver.

Let us now head on to configuring GFI MailArchiver to make use of SQL Express and to automatically roll-over from one database to another when the 4GB size limit of the SQL Express database is reached.

1.    To start off with, we need to pre-populate SQL Server Express with a number of databases for use by GFI MailArchiver. Roll-over by size limit in GFI MailArchiver 6.3 does not yet support the automatic creation of new databases to use when rolling over – the good news is that this feature will be available in GFI MailArchiver 6.4 which will ship later on this year.

  • To create a new database, fire up the SQL Server Management Studio console, expand the node of the SQL instance you’re going to use, right click on ‘Databases’, and click ‘New Database’.

  • Set a database name, and set the initial size for the ‘Rows Data’ to 1 GB and for ‘Log’ to 10 MB.

  • Set autogrowth for the rows data to 100 MB at a time.

  • Set autogrowth for the logs data to 10 MB at a time.

If you’re asking yourself why you should set the initial and autogrowth values so high the answer is that each time SQL Server needs to grow its file, performance is impacted. The less times SQL Server needs to grow its files, the better.

  • We now need to set GFI MailArchiver to make use of the new database we’ve created in the active archive store. But before doing that, go ahead and create a few more databases for GFI MailArchiver to make use of when the 4 GB limit is reached on the first database.

2.    We now need to create an archive store based on SQL Express and set it as the active archive store.

  • Fire up the GFI MailArchiver configuration console, open the node ‘GFI MailArchiver’ > ‘Configuration’ > ‘Archive Stores’ and click ‘Add Archive Store’.
  • Set a name for the new archive store and click ‘Next’.

  • Select ‘Microsoft SQL Server database and file system (including Express Edition)’. Please note this is the only option for which automatic roll-over by size limit is supported. Click ‘Next’.

  • Select the SQL Server instance in which you created the databases for use with GFI MailArchiver. As for credentials, I suggest you use sa credentials for these operations so as not to get stuck on some permissions related issue. Don’t worry, these credentials will only be used to perform the necessary operations and will then be discarded (they are not stored anywhere). Click ‘Next’.

  • Select the database you’re going to use for the active archive store. Click ‘Next’.

  • Select the location on disk where you want to store the emails archived to this archive store (and, unlike me, keep in mind the disk I/O recommendations I made in part 1 of this post – in my case it’s a test environment). Click ‘Next’.

  • You should now get a dialog indicating that database verification is complete. Click ‘Next’.

  • Enter user names and passwords for GFI MailArchiver to create users in SQL Server which it will use to write to the database when emails are being archived, and read from the database when emails are being browsed or searched. Make sure that the password you configure satisfies any password complexity requirements on your machine/domain! Click ‘Next’.

  • You should now get a dialog indicating that login creation was successful. Click ‘Next’.

  • Select the location on disk where you want to store the search index files for this archive store (again, keeping in mind the disk I/O recommendations I made in part 1 of this post). Click ‘Next’.

  • You should now get a dialog indicating that you have completed the archive store wizard. Click ‘Finish’.

  • You should now be back on the ‘Archive Stores’ page. In the ‘Archive in the following store’ drop down menu select the new SQL Express based archive store which you have just created. Finally, don’t forget to click ‘Save Settings’.

  • You have now configured GFI MailArchiver to make use of a SQL Express based archive store as its active archive store.

3.    Now we need to create a number of archive stores based on SQL Express so as to roll-over to them when the size limit on the active archive store is reached.

  • In the GFI MailArchiver configuration console, open the node ‘GFI MailArchiver’ > ‘Configuration’ > ‘Archive Stores Management’ and click ‘Add Archive Store’.

  • You should be pretty familiar with the wizard you get at this point, as it’s the same one we went through to create an archive store based on SQL Express and set it as the active archive store.
  • Go ahead and create a few archive stores in ‘Archive Stores Management’ based on SQL Express.

4.    At this point all that is left for us to do is to configure GFI MailArchiver such that it will automatically roll-over to one of the newly created SQL Express based archive stores when the active SQL Express based archive store reaches its 4GB size limit.

  • Fire up the GFI MailArchiver configuration console.
  • Open the node ‘GFI MailArchiver’ > ‘Configuration’ > ‘Archive Stores Management’ and click ‘Add Archive Store’.
  • Select the ‘Enable the swap archive store schedule’ check box and make sure the ‘Use a new Archive Store when it is full’ radio button is selected. Don’t forget to click ‘Save Settings’.

  • That’s it! You have configured GFI MailArchiver to make use of SQL Express based archive stores and to automatically roll-over to a new SQL Express archive store when the active archive store reaches the 4GB size limit of its SQL Express Database!

  • Please keep in mind that you will not be able to select the option ‘Enable the swap archive store schedule’ should you not set a SQL Express based archive store as the active archive store, or have archive stores in ‘Archive Stores Management’ which are not based on SQL Express.

  • Furthermore, once you’ve enabled the option ‘Use a new Archive Store when it is full’ you will not be able to set the active archive store to one which is not based on SQL Express.

  • As a final note, when the active archive store reaches the 4GB size limit of the SQL Express database it is based on and GFI MailArchiver rolls over to a new SQL Express based archive store, a notification such as the one below will be sent to the administrator’s email address as configured under ‘GFI MailArchiver’ > ‘Configuration’ > ‘General Settings’.

  • Should GFI MailArchiver be rolling over to the last available SQL Express based archive store, the email notification will also notify about this. At this point it is important that you create a few more archive stores for GFI MailArchiver to roll over to once the SQL Express database for this last archive store reaches its 4GB size limit – otherwise email archiving will then stop!

In this 2 part series I have briefly covered deployment and configuration of SQL Express for use with GFI MailArchiver, as well as configuring GFI MailArchiver to make use of SQL Express and automatically roll-over from one database to another when the 4GB size limit of the SQL Express database is reached. Admittedly this could and should be a simpler process – and this is precisely one of the things we will be working on in the next release, GFI MailArchiver 6.4, due later on in Q2 2010.