Overview
Archiver might stop Archiving emails for emails sent in a specific time interval, and admin notices that SQL Server created multiple databases for the same Archive Store covering that period.
Root Cause
Duplicate databases are created when Archiver tries to create a new Archive store, and an unexpected error occurs (for example when there is a lack of free space on the drive, which can affect the optimal operation of SQL server, as it requires a certain amount of free space to function properly, or other SQL Server related reasons).
Symptoms of this problem include the presence of duplicate, often empty, databases.
When 11 duplicate Databases are created, GFI Archiver will not attempt to create a new DB again, even if the root cause of the duplication is resolved. Thus the Archiving will stop for any email which should be saved in this time period.
If you notice that SQL Server has less than 11 duplicates for a single store, this should indicate that one of them might have the actual data, which means that the issue was auto resolved, and the emails in this period are being archived correctly. In that case, you can still apply the steps below to delete only the empty Databases as a housekeeping operation.
Solution
To resolve this issue, follow these steps:
- Check in Archiver GUI if a store is created for this period:
- Open
Configuration > Archive Stores > [Select Store for the period] > Summary
:
- If the store is found and the Database status is Online, then this indicates that the DB duplication is not affecting the archiving operations.
In this case, take a note of the database name, and make sure not to delete this DB, since it contains the store data. You can then proceed directly by cleaning up any empty duplicates, as a housekeeping operation, as detailed later in this article. - If the store is not found, this indicates an archiving issue for this period, proceed with the next steps.
- Open
- Check storage drive on the server (mdf/ldf location).
- Using SQL Server Management Studio, check the mdf and ldf location for any of the duplicated Databases
- It is recommended to keep 15% or more free space on the drive holding the DB data files.
- Go through the wizard of Configuring New Archive Store Settings, to make sure that new archive stores can be created without errors.
- Delete unnecessary copies of the database in SQL:
- Before resolving the duplicates, ensure you know which DB should be in use as explained in step 1 above; it's not uncommon for the store to be using one of the "duplicates"
- Having 11 empty (duplicated) Databases for the same store will prevent Archiver from creating a new Database for this store, so you need to delete at least one of the old empty Databases once the cause of the original issue is resolved, in order for Archiver to create a new Database.
- In SQL Server Management Studio (SSMS), expand the duplicate DB > Tables.
- Having no actual tables shown below "Tables" folder indicates an empty DB, for example the following is an empty DB:
- While this is a sample non-empty DB:
-
If the Database is empty, delete it from SQL Server:
- Once the empty duplicates are deleted, and GFI Archiver services start processing any email in this period, Archiver will try to recreate the Database again (if there is no non-empty DB already present for this period). There is no need to restart Archiver services to reprocess the emails.
- If the new non-empty DB is created, then the issue is resolved, and you might consider the steps in the article: Processing Orphaned Files in Core\Queue or MAIS\Queue, to make sure there are no orphaned files due to this issue.
- However; if the empty duplicates are created again, then the root cause is not resolved yet, and you would need to follow these additional steps:
- Check the SQL server logs in SSMS, which may explain why the connection broke and had to recreate multiple stores:
Open SSMS > Choose server > Management > SQL Server Logs
- Report any errors found during Database creation to your DB admin team for review; it is recommended to perform a SQL health check by the DB admin to check possible causes.
- If no SQL errors nor SQL Health issues found, Enable Debug Mode in GFI Archiver (Step 1 in the article Share Troubleshooter Logs for Archiver)
- Delete one of the Empty Duplicate Databases
- Wait until it is created again
- Share Troubleshooter Logs for Archiver and contact the Support team
- Check the SQL server logs in SSMS, which may explain why the connection broke and had to recreate multiple stores:
Summary
By deleting unnecessary databases, ensuring sufficient free space on the drive, and clearing the queue folder, you can resolve issues related to multiple databases and insufficient drive space on SQL Server.
FAQ
-
What is the minimum free space required on the drive for optimal SQL Server operation?
At least 15% free space is recommended for optimal SQL Server operation. -
What are mdf and ldf files in SQL Server?
Mdf and ldf files are the primary data and log files respectively, associated with SQL Server databases. -
What does clearing the queue folder do?
Clearing the queue folder helps in reprocessing the data, which might be caused by different issues preventing emails from being processed.