Surendra Sharma

Surendra Sharma

Search This Blog

Saturday, October 8, 2016

Sitecore database lesson 3 - Changing data from database

You can change field data directly from database. For example let’s change data of rich text editor of Home item.

I am executing below query to update description field as

Update VersionedFields set Value = ' from Surendra Sharma' + Value where Id = '61C78797-DD31-41AB-976B-A6800F2E9403'

As you can check in below query that data is change in database.

Update Field Data
Update Field Data

But you can’t get this data in Sitecore as of now. Why?

Sitecore always fetched data from database and stored in different caches like prefetch, iteminfo etc. So we need to clear this cache so that Sitecore again fetched data from database.

Clear all caches from link http://sitecorelessons/sitecore/admin/cache.aspx where sitecorelessons is the name of my instance.

Now if I tried to access Home item in Sitecore, I can get updated details as

Updated data in Sitecore Field
Updated data in Sitecore Field
Note: - Sitecore not recommending changing data directly from database.

I hope you like this Sitecore database lesson. Stay tune for more Sitecore database related articles. 

Please leave your comments or share this article if it’s useful for you. 

No comments:

Post a Comment