Part 1 - The BasicsPart 2 - The Basics continuedPart 3 - ConfigurationPart 4 - CommunicationPart 5 - Quick DeploymentPart 6 - LoggingPart 7 - Change Token BasicsPart 8 - Job and Change TokenPart 9 - Job and Timerjob
Incremental deployment allows to deploy all content changes in the source database since the last successful deployment which are in the configured scope of the content deployment job.
To implement this functionality content deployment makes use of so called "change tokens".
A very common issue with content deployment is that incremental content deployment fails with the following error message:
The changeToken refers to a time before the start of the current change log
But what does this actually mean?
What we have seen in the earlier article series about the content deployment and migration API to perform an incremental deployment we have to pass in a change token that will be used as a reference to identify which objects need to be exported.
Using a change token, an application can determine "what content has changed" within a given scope since the change token has been generated.
To do this the information included in the change token is compared against Change log.
The Change log is stored in the EventCache table of the content database. This table stores the information about all content changes in the content database. Each entry in the Change log contains among other things the following information:
The following article contains some more details about these entries:http://msdn.microsoft.com/en-us/library/bb861918.aspx
The change log stores information for a timeframe that can be configured in the Web application general settings:
Each time the change log is queried for changes, it returns the changes together with a Change Token which corresponds to a database entry up to which the querying application has been synchronized. This change token is of the format Int1; Int2; Guid; Time; Int3.
The following scopes are possible for a change token:
Change Token Scope
When it comes to troubleshooting change token problems, it is also important to be able to analyze the change token itself – e.g. to see the date/time of the change it represents.
The following method allows to decrypt the change token into a better readable format:
This code will create output like the following:
The Change log can be queried for changes at four different scopes: Content Database, site collection, site or list scope. Depending on the application and what scope the application is interested in defines which scope needs to be used. For example, if an application is only interested in changes in a specific list, it can query for changes at the list scope. On the other hand, if changes across the entire database need to be monitored, then the change log can be queried at the content database scope.
The GetChanges method can be used to query for changes:
When you have a SPChangeCollection you can evaluate each change individually. Each SPChange object exposes the properties:
You can cast the individual SPChange objects to the exact change to get further information. For example, SPChangeWeb exposes the ID of the changed site. SPChangeFolder exposes the unique ID of the folder and the unique id of the site.
I have been investigating the Change Logs in one of our Content Database due to performance problem. Regarding the "ChangeType", I did check all the ChangeType you point in this blog, but I need to map the EventType Database Value with the ChangeType Enumeration value. Most of the values I can find in the Internet for Add, Delete, Update, etc. But when I querry the Content DB in the EventCache table, (I don't work directly in the Content DB, just a copy of the Backup Database), I have a EventType "134217728", which I cannot find the enumeration mapping anywhere, could you please help me to find an exhaustive mapping between the Database EventType Value (from the EventCache) table, and the ChangeType enumeration?
Thank you in advance for your help.
Here is the mapping:
Event Type Int Value (dec)
Move Into 65536
Thanks for your quick reply; it helps us to interpret the peaks of our curve from the EventCache data. Strangely, during the last 3 months, now and then we have performance issues in our publishing site, each time the problem is related with SQL Server, and the work around consists of watching closely the CPU usage of the SQL Server, when it is too high, we run a SQL job that recalculate the statistic which helps SQL to optimize the use of caching, and this solve the performance issue. We apply this work-around, but still cannot understand what cause the performance issue, and why rerun the statistic optimization job in SQL helps to solve the problem. I am analyzing the EventCache table to find a correlation, and all peaks correspond with "Navigation" events, and those peaks matched with the periods where the performance issues happened. First I guess that when the content manager delete lots of sub sites in the content, the performances issues occur. (This is a direct editing publishing site, because the staging, and production environments strategies cannot survive due to content deployment problems together with variations :-)
Now according to your mapping above, the peaks are really "Navigation" events and not "Delete" events. At this point, I get lost, and don't know what can cause the update of "navigation" to create such peaks recorded in the EventCache?
Have you ever run into such a case? With your experiences, I would hope you can enlighten us, because we are really sinking in the darkness with this recurrent performance issues.
Thank you so much for your time, and for sharing many precious information.
unfortuntelly I haven't looked into the details why Navigation events would be created as I never had a need to look into this. I would need to do some research on this topic. Best would be to open a support case with Microsoft to get this analyzed.
I want to extract values from SP Change Log for audit purpose. I can easily get the changed values but didn't find any way where I can get the 'Before Change' value. Can you pls throw some light on this approach..Pls also let me know if considering SP Change log for auditing purpose is correct approach.
Need your help in resolving below issue:
We have share point authoring and production Global portal setup. We have created below jobs to deploy content from authoring to production
1) Quick deploy Job- Runs every 15 min
2) Full deploy Job - We ran this job initially to move entire content from Authoring to Production.
3) Incremental deploy Job - Runs Every 1 hour
Incremental job is working on schedule basis (every 1hr) without any issues since 1 year (may be some minor issues which got fixed)...Now we are facing below issue for this job when it’s trying to import content into production
(Export is working fine, its able to export the content. But Import is throwing below error)
"Minor Version limit exceeded, publish to major version..."
Below steps we followed
1) We have checked both in authoring and production for minor version limit. We haven’t found any issues.
2) We have created new individual jobs, but its not successful
3) Finally, we have run Full Deploy Job we thought it may fix the issue. It exported all the content but import
getting below error
" FatalError: The URL 'Pages/xxxx.aspx' is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web."
At this stage i have steped in to fix all the issues. Now we are facing new issue with export, when we run incremental job. Its throwing below
[7/26/2013 9:00:08 AM]: Error: The changeToken refers to a time before the start of the current change log.
[7/26/2013 9:00:08 AM]: FatalError: The changeToken refers to a time before the start of the current change log.
at Microsoft.SharePoint.Deployment.SPExport.ThrowInvalidChangeTokenError(DateTime minChangeTime, Int32 minChangeNumber)
I have checked the setting in CA for Change log. It set to "Never" option for "Delete entries in change log". As per my analysis, until change token date refers to any date in change log this issue wont get fixed.
Running Full deploy job will reset change token date. Is there any risk running Full deploy job.
Need your help to solve the change token issue.
Sorry for such a lengthy description!!!
a couple of things:
1) never mix full and incremental deployment. You will end up with load of inconsistencies as full deploys less than incremental.
2) if you have (e.g.) a picture which exists as minor version 1.1 in the source and deploy this to the target it will be imported there with a minor version of 1.1 or similar.
Later when the item is deployed again - e.b. because referenced by a modified page - it will get imported as version 1.2 or similar although the version in the source has not been increased.
That can go on 254 times - then the maximum minor version limit has been reached and you run into this issue.
To avoid such problems you should ensure that referenced documents and items always exist as major version.
If you need additional help, please open a support case with Microsoft.