Archiving CSS event reporting data

Commerce Server Staging (CSS) logs data of its actions to two Access databases, events.mdb and StagingLog.mdb.  The data that is viewed in the reports comes from the events.mdb which is what most customers want to keep.  As noted in an earlier blog post you can increase the number of days that the data in the database is retained but some customers have requirements to keep the data for long periods of time such as 6 months or a year.  Although you could increase the number of days that data is retained in the database as I noted in my previous post, I also noted that having a large number of days worth of data stored in the database could cause perfomance issues.

With that in mind it might be simpler for you to simply set the number of days to something like 31 as I have recommended and once you hit the 31st day create a new events.mdb file and then archive the old one somewhere.  This is a very easy process that takes just a few minutes since the CSS service will automatically create a new events.mdb when the service is started if one is not present.

How to go about this:

On the day that you wish to start with a new file, simply stop the Commerce Server Staging service and then go to the directory where the events.mdb file is located.  Typically this would be C:\Program Files\Microsoft Commerce Server 2007\Staging\Events\events.mdb.

Either rename the file or move it to another directory or drive and then start the CSS service back up.  A new file will be created automatically.