WebMarshal “3003” errors

WebMarshal “3003” errors

If, like us, you have WebMarshal, and it’s tied to an SQL Server Express database, you may find it sometimes just… breaks. You’ll get eventlog messages like “3003:  Failed to write session to database” and “PRIMARY filegroup is full” and “Could not allocate space for object ‘dbo.DomainFileLog'”. Chances are, your database is full.

The Express version of SQL Server 2005 is nice because it’s free, but it does limit database sizes to just 4GB. This may sound huge, but for us, that’s only around 4 months worth of internet logs, and we need to clear some space every so often. I always forget how to do it, so this post is a reminder to me as much as anything.

Before you start, to make things easier, get yourself a copy of Microsoft SQL Server Management Studio Express. It’s free, and makes managing your SQL databases much easier. Once installed on your SQL Server machine (and connected to it), you can set about fixing WebMarshal.

Firstly, you need to purge a load of old records from the log. Chances are you don’t need to go back more than a few months anyway. If you do, you might want to backup your database, name it as a “snapshot” of today’s date, and then restore it if you need to have a look at old entries. How you purge depends on the version of WebMarshal you have, but for either 3.x or 6.x you start my clicking open the WebMarshal database from the object explorer on the left.

Now, on the pane on the right, you’ll have an empty command window. In here, you need to paste one of the following commands:

For WebMarshal 3.x:

exec dbo.PurgeLogData @NumDays = 'n'

Where n is the number of days to keep. So, if you want to get rid of anything more 60 days old, replace n with 60.

For WebMarshal 6.x:

exec dbo.PurgeLogData @PurgeDate = 'yyyymmdd', @MaxRecords = 0

Where yyyymmdd is the date from which everything older is deleted. So, if you wanted to get rid of everything from before 10th April 2010, enter yyyymmdd as 20100410.

Whichever command you use, after typing it in, click the “! Execute” button to perform the task, which may take some time.

Unfortunately, all this does is remove the data. It doesn’t shrink the data files, so your 4GB database will still be 4GB. Thankfully, there’s an easy way of doing this.

Back on the object explorer pane, right-click the WebMarshal database and choose Tasks > Shrink > Database, then click OK. Again, this may take a while. Once finished, for good measure, choose Tasks > Shrink > Files, then click OK.

Now your database should be much smaller! To check, right-click the database once more and choose Properties. In the General section, there’s an entry for Database Size. If this is way below 4GB, you’re done. If not, you might want to do a bit more purging!

0 Comments

  1. I would have thought it was, yes. We’re on WM3.7, and SQL Express 2005 isn’t explicitly supported but works fine. We don’t have Server 2008 R2 though – just 2003 at the moment, 2008 in a few months.

    deKay

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.