When using Backup Exec 2012 by default will install a rather dated at this point in time version of SQL Server 2005 Express Edition. As time goes with and install the database grows and eventually can lead to errors like: “The Backup Exec Database has almost reached the 4-GB limit that is allowed for SQL Server Express Edition. To ensure that Backup Exec continues to function properly, either clean up the Backup Exec Database or upgrade to the full version of SQL Server.”, also known as V-287-13257.
To correct this there have been two trains of thought one to use the built-in BEUtility and the other is to modify SQL directly. I don’t view this as an either-or approach, I view it as a try this first and if not then try that.
First option, use BEUtility. Why, because it’s using the built-in methods provided by Symantec. Run the following options from the utility:
1. Age database 2. compact database 3. repair database 4. rebuild db indices 5. check db consistency.
The second option is to use the SQL Management Studio to manually perform some cleanup. Usually the source of the problem is the BELog table which can grow to gigabytes in size all by itself.
Lets check and see how many records are older than 6 months old:
SELECT count(username) from [BEDB].[dbo].[BELog] where TimeStamp < DateAdd("m", -6, getDate());
On larger environments don’t be surprised if it returns millions.
Now lets check and see if this is anything we still need.
SELECT * from [BEDB].[dbo].[BELog] where TimeStamp < DateAdd("m", -6, getDate());
Ok, now lets purge logs older than 6 months
delete FROM [BEDB].[dbo].[BELog] where TimeStamp < DateAdd("m", -6, getDate());