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.

STSADM Export/Import Problems

In the past 1 1/2 month, our team is working on to re-organize the portal site structure. Before we migrated last December, there were more than 150 site collections and more than 700 sub sites. In our plan, we are going to put them into one portal and 9 departmental site collections. From 150 plus to 10 site collections, I believe this is a big efforts to move 85 GB database around multiple databases.

The first tool we consider is, of course, STSADM. This is the out-of-box tool from Microsoft, support by Microsoft and what can go wrong, right?

Actually, lots things can go wrong and so far I haven't found lots information from on line sources. So far the problems we have seen include:

  1. Not all document versions are imported correctly. I did some research through database and so far I have one clue. There is a column called DocFlag in both AllDocs and AllDocVersions tables. If any record in AlldocVersions has a different DocFlag values than the current version, import process skipped this one.
  2. Sometimes all of the versions are replaced by the current one, which means the date and author are also replaced.
  3. Import operation can not process the Project Tracking list properly and I have no clue.
  4. Sometimes not all sub sites, lists, libraries or items are not imported and I have no clue how to predicted. If I redo import or export/import, I can get everything correctly.
  5. The import log does not show you all information. For example, you can find each version of a document is exported from the log, the same information is missing from the import log.
  6. Do I mention all of these problems are hard to predicted? I have no idea if I wrong export/import to the same site collection multiple time, when do I get and which problems.
  7. The biggest one and also no way to predict it: sometime when you import from an site collection to a group of sub sites, the original top-level site does not import to the correct sub site. The whole contents go to the top-level site of the new URL and overwrite the one. I have no clue or information why and how it happened.

After very intensive testing and evaluation, we decided not to use STSADM as the tool to do this re-organization. One major concern is we have no way to predict when and where the problems will strike us.

If you have any way to resolve the problems I just mentioned, I am all ears. Thanks in advanced.