Search code examples
sitecoreanalyticssitecore8sitecore-xdb

How do I clean xDB in Sitecore?


Have recently tried working with xDB in Sitecore 8 and now looking for the way of cleaning out current stats from xDB without re-installing Sitecore. I deleted data files for Mongo (as was suggested) but still see figures in Analytics in Sitecore; also did iisreset but also did not help. What am I doing wrong? (I am new to Sitecore so might be missing something).


Solution

  • Have you tried to clean-up only MongoDB files, without Reporting database?

    If yes, I think that is a point of your confusion. The way it works in xDB is that all tracking analytics data is written into Mongo and then by SessionEnd processed and saved into Reporting database, that is SQL database, same way as it was before previously in DMS. In that case you need to clean that database as well.

    If you have access to SQL, you may use __DeleteAllReportingData stored procedure as the quickest:

    enter image description here

    More correct approach that goes well for instances where there is no direct access to DB is using admin tool for that located at /sitecore/admin/RebuildReportingDB.aspx. Also there was a module Analytics Database Manager previously, however I do not know its current state.

    Reference: Walkthrough: Rebuilding the reporting database (from official documentation)