11

I am doing an upgrade from 7.5 to 8.1-Update 3. I have gotten to the end and just finished the final upgrade to get to 8.1-Update 3. Now I am trying to rebuild the reporting database.

I open the /sitecore/admin/RebuildReportingDB.aspx page and I click the Start button. The Process State changes to "StoppingDataRecording" and then just sits there. It has been running for like 15 minutes and hasn't changed.

In my local testing environment when I ran this, it changed very quickly to the desired "WaitingToReceiveData" state. I am not sure why it is taking so long.

I have looked in my browser console on the Network tab and I so see that the browser is issuing calls to ScriptResource.axd every few seconds and getting responses back with a 200 status. So that seems OK. I don't see any errors anywhere in my logs. For this server we are using a hosted version of MongoDB instead of a local version and this is our production database which has a LOT of data. Would that make this process take a real long time? Basically I am just sitting here watching the screen waiting for it to change and I have no idea if it ever will. Has anyone else ever had this issue where the Rebuild Reporting Database screen seems to be stuck?

  • Have you configured the secondary reporting database before starting the rebuild? – Dmytro Shevchenko Nov 12 '16 at 23:24
  • Yes. I attached a clean copy of the reporting database and configured it as reporting.secondary. – Corey Burnett Nov 12 '16 at 23:26
  • Have you updated the TimeToClearStorage timer for the refresh? – Chris Auer Nov 13 '16 at 3:47
  • Yes. I changed it to 5 minutes. My understanding of that setting is that you want to give yourself enough time to copy over the data from the primary to the secondary reporting database. In my opinion the description of copying "tables" from primary to secondary on this page (doc.sitecore.net/sitecore_experience_platform/81/…) is a bit unclear. Are you supposed to copy full tables or just the data from those tables? – Corey Burnett Nov 13 '16 at 12:24
  • I have a SQL script all ready to go that copies data from the primary to the secondary. So really there is no need to change the TimeToClearStorage setting. I can leave it at 1 minute because it literally takes me like 5 seconds to run the script and transfer the data. But the problem I am having here is that I NEVER get to the place where I can copy the data. I let the rebuild page run all night and it NEVER got to the point where it says "WaitingToReceiveData". – Corey Burnett Nov 13 '16 at 12:27
14

I figured out the problem. Turns out I had Sitecore.Analytics.Processing.Aggregation.Services.config and Sitecore.Analytics.Processing.Services.config files disabled. I had disabled them during the install of another module and never re-enabled them. Once I re-enabled them then the reporting database rebuild worked fine.

4

According to the Official Sitecore Documentation, there is a note that reads

You can only run the RebuildReportingDB.aspx and RedeployMarketingData.aspx pages from a content management server.

However, in a distributed environment, where you have the content management and processing/aggregation servers separated, you should not be running this on the content management server. This process should be run on your processing/aggregation server. As soon as I moved the rebuilding process to my processing and aggregation server, I was able to get past the initial step in this process.

Also, I believe that you only need to copy the data, and not the structure (as was talked about in the comments on the OP). Here's what my SQL Scripts look like to make that happen (I hope that this is helpful for someone):

INSERT INTO Sitecore_reporting_secondary.dbo.CampaignActivityDefinitions
SELECT [Id]
      ,[Version]
      ,[Language]
      ,[IsActive]
      ,[Data]
  FROM [Sitecore_reporting].[dbo].[CampaignActivityDefinitions]

INSERT INTO Sitecore_reporting_secondary.dbo.GoalDefinitions
SELECT [Id]
      ,[Language]
      ,[Version]
      ,[IsActive]
      ,[Data]
  FROM [Sitecore_reporting].[dbo].[GoalDefinitions]

INSERT INTO Sitecore_reporting_secondary.dbo.OutcomeDefinitions
SELECT [Id]
      ,[Language]
      ,[Version]
      ,[IsActive]
      ,[Data]
  FROM [Sitecore_reporting].[dbo].[OutcomeDefinitions]
INSERT INTO Sitecore_reporting_secondary.dbo.MarketingAssetDefinitions
SELECT [Id]
      ,[Language]
      ,[Version]
      ,[IsActive]
      ,[Data]
  FROM [Sitecore_reporting].[dbo].[MarketingAssetDefinitions]

INSERT INTO Sitecore_reporting_secondary.dbo.Taxonomy_TaxonEntity
SELECT [Id]
      ,[ParentId]
      ,[TaxonomyId]
      ,[Type]
      ,[Uri]
      ,[IsDeleted]
  FROM [Sitecore_reporting].[dbo].[Taxonomy_TaxonEntity]

INSERT INTO Sitecore_reporting_secondary.dbo.Taxonomy_TaxonEntityFieldDefinition
SELECT [Id]
      ,[Name]
      ,[IsLanguageInvariant]
  FROM [Sitecore_reporting].[dbo].[Taxonomy_TaxonEntityFieldDefinition]

INSERT INTO Sitecore_reporting_secondary.dbo.Taxonomy_TaxonEntityFieldValue
SELECT [TaxonId]
      ,[FieldId]
      ,[LanguageCode]
      ,[FieldValue]
  FROM [Sitecore_reporting].[dbo].[Taxonomy_TaxonEntityFieldValue]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.