Saturday, February 1, 2014

Sitecore IDTable

Recently when I'm trying to clear some of my old documents, I found "Student handbook Web Site .NET developer" handbook. When I go through that document quickly, I saw an entry about "IDTable" in sitecore. Eventhough I have seen this table, I was not aware of the use of that table till now. So, I thought of writing a post regarding the IDTable table.


The IDTable
You can store persistent mappings of arbitrary keys to Sitecore IDs in the Sitecore IDTable. 

By default, this is only used by the Sitecore CMS WebDAV functionality to keep locks on media items in the CM environment and does not need to be synchronized with the CD environment
You configure the location of the IDTable in the web.config file in the IDTable section in the connectionStringName parameter:
<IDTable type="Sitecore.Data.$(database).$(database)IDTable, Sitecore.Kernel" singleInstance="true">   <param connectionStringName="master" />
  <param desc="cacheSize">500KB</param>
</IDTable>
To synchronize the contents of the IDTable between the CM and CD environments, change the connectionStringName parameter in the IDTable configuration section to point to a Core database that is shared or replicated between the environments. Alternatively, it can point to a shared Web database
          Quote "Sitecore CMS 6.6 or later - Scaling Guide"
          http://sdn.sitecore.net/upload/sitecore6/66/scaling_guide_sc66-a4.pdf


IDTable can be used for tasks like keeping track of duplicate items when doing a custom import from another third-party application to sitecore.
   Sitecore.Data.IDTables.IDTable.Add(string prefix, string key, ID id);
By keeping IDs of items that has already imported to sitecore, if you run the import more than once, you have the option of skipping the IDs that already had imported to the system by keeping/monitoring the IDTable entries.

You can find an old blog entry about IDTable from following url :
http://sitecoredev.blogspot.com/2005/11/idtable.html

Updated:
http://sitecorejunkie.com/2014/03/01/synchronize-idtable-entries-across-multiple-sitecore-databases-using-a-composite-idtableprovider/


3 comments:

  1. You can also synchronize IDTable entries across your CM and CD environments by using a custom publishItem pipeline processor:

    http://sitecorejunkie.com/2014/03/02/synchronize-idtable-entries-across-multiple-sitecore-databases-using-a-custom-publishitem-pipeline-processor/

    -Mike

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete