Commerce Server 2007 Staging Error : "Error occurred with the database StagingLog.mdb"

Yesterday I came across a very strange Commerce Server Staging error at one of the production boxes of the customer am working for. Strangely, for some reason, the Staging server stopped and started to throw out the below error:

 

Event Type:        Error Event Source:    Commerce Server Staging Event Category:                None Event ID:              61208 Date:                     11/10/2008 Time:                     10:33:36 PM User:                     N/A Computer:          STG1 Description:

Error occurred with the database StagingLog.mdb.  Error is: System.Data.OleDb.OleDbException: System resource exceeded.    at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)    at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)    at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)    at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)    at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)    at System.Data.OleDb.OleDbCommand.ExecuteReader()    at Microsoft.CommerceServer.Staging.Internal.ProjectDeploymentLog.GetStatusForReplication(String replicationId).

For more information, see Help and Support Center at https://go.microsoft.com/fwlink/events.asp.

 

So the first thing I did was to look up the Internet and found this wadewegner blog entry which perfectly addressed my issue. To make sure that the entry doesn't get lost somewhere, I am reproducing it:

While this isn't the most explicit error, it provided enough information to track down the problem.

You might be surprised to see that this error refers to an Access database.  CSS makes use of Access database files to store events and information it audits during the staging process.  Specifically, there are these two Access database files:

  • StagingLog.mdb
    • Found here: C:\Program Files\Microsoft Commerce Server 2007\Staging\Data
    • Stores internal replication information used by CSS
  • events.mdb
    • Found here: C:\Program Files\Microsoft Commerce Server 2007\Staging\Events
    • Stores staging information that is made available to reports

Solution: Turns out that the NT AUTHORITY\NETWORK SERVICE has been attempting to open the StagingLog.mdb file to no avail.  After giving the NT AUTHORITY\NETWORK SERVICE the rights to Modify the StagingLog.mdb file

Rather than only giving access to the StagingLog.mdb file, give the NETWORK SERVICE account access to the entire Data folder where the MDB file is located.  Otherwise it will have issues trying to write out an LDF (Access log file) file when updates are made.