Sunday, March 22, 2009

How to Find Which Document Library Has Versioning Control

This was the question I got from my project manager and project lead. They wanted to know which document library had versioning control.

I thought this should be an easy task, 15 minutes in the databases and I should be able to find all of them.

Wrong. It took me 2 and half hours and I still could not tell exactly which library had this feature turned on or not.

What I found out was the Version column in the AllLists table had nothing to do with the versioing control. It represented how many times the settings of this list was changed.

I did some test and found out another column called tp_flag should have the information. When I changed from None to Major Only, to Major and Minor and then back to None. There were only three values shown under each setting. If I got these three integers, I should be able to query the entire table and identified all of them, right?

I was wrong again. The next thing I found out was: there were other group of integers used by different lists.For example, list A used 123, 124 and 125 .List B used 3456, 3789 and 4789 and so on. Not all lists were different and there should be some rules how the numbers were constructed.

However I haven't had time to go back and figure it out. If you have any information, I am more than happy to listen.

Thanks.

No comments: