< Return to Feed
Mike Matthes - 06.17.2016

Sitecore 8 Analytics Reports are Empty

Sitecore 8 analytics reports are empty. If this happens, look at your [sitecore]_reporting database and you likely are missing records in these tables: Segments, SegmentRecords and Fact_SegmentMetrics.

To resolve, populate the Segments table and then rebuild the reporting database.

  1. Update Segments Table: /sitecore/admin/redeploymarketingdata.aspx. Click "Redeploy Segments" which adds dimension records to the Segments table. Then open SQL Server Management Studio and then run this query to update the DeployDate field to an older date. This is necessary because Sitecore will aggregate data for each Segment record where the MongoDB date is greater than the Segment.DeployDate.

    UPDATE [dbo].[Segments] SET [DeployDate] = '2001-08-05 08:44:45.500'

    Redeploy Marketing Data

  2. Rebuild the SQL Server reporting database: /sitecore/admin/RebuildReportingDB.aspx. This process will retrieve the raw data from MongoDB and populate the Fact tables in the SQL Server reporting database Once built, make sure you have a few hundred records in SegmentRecords and Fact_SegmentMetrics tables. You'll also see about 35 records in the Segments table

    Rebuild Reporting Database

In order to rebuild the reporting database, you have to create a new reporting database that is empty.

  1. Get the clean mdf/ldf files for the reporting database. If you download and unzip the Sitecore build you'll see a /Databases directory that has SitecoreAnalytics.mdf/ldf
  2. Mount this empty reporting database to SQL Server
  3. If you're using Azure, mount the files to your local SQL Server. Then backup the database to an accpac file using Tasks-->Extract Data-tier Application.
  4. If using Azure, use Import Data-tier Application and upload your accpac file
  5. Update your connection strings and create a new connection called "reporting.secondary". This connection should point to your new database.
  6. Go to /sitecore/admin/RebuildReportingDB.aspx and click Start
  7. When this process completes, open your connection strings file. Delete the "reporting" entry. Rename "reporting.secondary" to "reporting".
  8. Your reports should display in the Sitecore admin tool.