1
votes

After a bit of investigation, I was able to query the Sitecore master database and generate reports (Sitecore Analytics reports - Is this only for Analytics database, can I use master database to generate reports?).

We have a requirement to query data from archived items. Is this possible with Sitecore? Is the Archive data table design is exactly similar to Master database?

Has anyone got a better solution of achieving this?, reason I am looking into this is that we cant keep them in the master database as content grows very fast in our environment. We need to figure out a way to generate reports on archived data.

1
What version of Sitecore are you using, it sound like a Sitecore 5 something, since from version 6, there are only 3 databases (core, master, web). I think the Archive database is more or less the same, except items are in folder for when they have been deleted (/year/month/day).Holger
It's 6.6 (Update-5), there are only 3 databases. There is no different database for archived items, there are several tables in the in each database. I want to extract data for archived items.Dhanuka777
Ah ok, I read it as databases, which I why i summised it was an older Sitecore. Sorry can't really help you, but add version number to the original question.Holger
I'm not sure if this will do exactly what you need but it might be a good starting place as the source code is available (and it's written by the Sitecore ninja Raul) marketplace.sitecore.net/en/Modules/…Steve Newstead

1 Answers

0
votes

The archive tables are similar, but linked slightly differently. Whereas the standard items are all in the Item table and linked to the UnversionedFields/VersionedFields/SharedFields tables by the Item ID, in the archive, the items go into the ArchivedItems table, the different versions of those items go into the ArchivedVersions table, and all field values go into the ArchivedFields table and are linked together by the ArchivalId.

I don't believe there is a way using the Sitecore API to get a reference to the fields a version of an item by passing in either the Item or Archival ID, but you can get the item IDs. Hopefully this is enough information!