Solving for x(DB)

Often the most confusing, seemingly complex problems boil down to the simplest of causes. This is such a case (jump to the end for the punchline).

We recently upgraded from Sitecore 7.5 to 8.1, to gain the ability to capture and utilize Sitecore analytics data. We were told that Sitecore 7.5 had all the new MongoDB hotness, and that we should upgrade to that version from 7.2. So we spent a lot of time upgrading, and we soon found out that we had problems with using PaaS in Azure along with the Sitecore Azure Module in 7.5. Something to do with inbound filtering, the Azure Module, and some other things I don’t fully have insight into (what I heard from others).

Anyhow, we went back and forth with Sitecore support for months trying to get analytics data to save to MongoDB from Sitecore, but to no avail. After awhile, the response we kept getting from Sitecore Support was to upgrade to Sitecore 8. We put this off for upwards of a year because we were tired of having to troubleshoot problems that we felt were things that Sitecore Support should be fixing in their product. After many months of deliberation, we decided to upgrade to 8.1 Update-1 soon after it was released, when we were assured that analytics would work with our setup in Azure PaaS.

We opted to host and manage our own MongoDB servers in Azure running on Linux. After some oversights on our part with our 7.5 code and *.config overrides, we got analytics  working in our Dev environment. But QA and Prod were still not showing any data, even after doing what we thought were the same steps in those environments.

Here are the things we checked during our debugging:

  1. Is the MongoDB connection string correct?
  2. Does MongoDB have data in it?
  3. Does SQLServer have the reporting database in it?
  4. Is the SQLServer reporting db connection string correct?
  5. Is there any data in the SQLServer reporting database?
  6. Are we using Glass.Mapper.Sc dll version 4 (yes, v3 breaks analytics – see my other post here:
  7. Are there any old 7.5 *.analytics.* files in our solution overwriting new ones?
  8. Does the MongoDB user specified in our connection strings have the correct permissions to create/update dbs?

Punchline: In our case, #6, 7 and 8 above were our combined culprits. Most were simple things that we will certainly know to look for next time.

Happy analytics-ing!