locked
How to retrieve previous Versioning Settings for a Document or Image Library? RRS feed

  • Question

  • Hello,

    We have a situation here. We have a Sharepoint 2010 Enterprise version.

    On Production, we ran the script for all workspaces sites(publishing) for making the document/image approval process ON. We updated versioning settings from the script. But now there is a problem. We came to know from Customer that some sites had manually made approval process OFF earlier and now with this new script we accidentally overriden those versioning settings and made the approval process ON. So now we need to find out those sites which earlier had versioning settings OFF and revert settings for only those.

    So my question is now Is there any way to find out previous day versioning settings for the document/image library before running our script? How to get the previous state of versioning settings from the document library?

    Any immediate help would be greatly appreciated.

    Thanks a lot in advance!

    Br,

    Shriram


    Shri07

    Wednesday, January 14, 2015 4:15 AM

Answers

  • Thanks a lot guys for your reply!

    After thinking for some time, we were left with 2 choices to get the desired result.

    Option 1)

    If regular SQL backups are available on Production SQL server, then compare current content databases with old content databases. (Old content databases backup can be restored to other SQL server for e.g. Test SQL server)

    We can then compare values from field "tp_Flags" of AllLists table. Itis an 8-byte unsigned integer bit mask that provides metadata about the list, which can have one or more flags set. It stores changes for Versioning Settings as well.

    For e.g. If we have to find whether the moderation enabled(content approval enabled) on the list then we can find this with this SQL Statement

    select cast(tp_flags as bigint) & 0x000000000 0000400 from allLists where tp_ListID = "<GUID>"

    If value is 0 then its NO and if has some value then its yes.

    Following link provides list of all such values to check from the tp_flags field

    http://msdn.microsoft.com/en-us/library/hh646650%28v=office.12%29.aspx

    Though this option is bit risky and not recommended, it is the faster approach. But provided you have the basic knowledge of SQL and SQL queries.

    Option 2)

    Restore the complete old Production FARM backup to TEST server and then compare settings from UI for those sites.

    This option is little bit time consuming and requires extra efforts but it impose no risk on Production Server and Sites.

    We are currently going with second option.

    Br,

    Shriram


    Shri07

    Tuesday, January 20, 2015 5:44 AM

All replies

  • Hi Shriram,

    By default, SharePoint does not retain the previous state of versioning settings .  

    For a workaround, you can utilize and analyze the document library version history to varify the previous state of versioning settings :

    https://naimmurati.wordpress.com/2013/08/28/effects-of-temporarily-disabling-versioning-for-a-sharepoint-document-library/

    http://www.captechconsulting.com/blog/amarender-peddamalku/sharepoint-2010-retrieve-document-library-version-history-using-client

    But I recommend that you can contact with the customers directly.

    Thanks,

    Eric

    Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Eric Tao
    TechNet Community Support

    Thursday, January 15, 2015 8:49 AM
  • try this link:

    http://www.captechconsulting.com/blog/amarender-peddamalku/sharepoint-2010-retrieve-document-library-version-history-using-client

    ---------------------------------------------------------------------------------------------------------------------------

    Please mark as answer if you find it useful else vote for it if it is close to answer..happy sharepointing

    Friday, January 16, 2015 4:22 AM
  • Thanks a lot guys for your reply!

    After thinking for some time, we were left with 2 choices to get the desired result.

    Option 1)

    If regular SQL backups are available on Production SQL server, then compare current content databases with old content databases. (Old content databases backup can be restored to other SQL server for e.g. Test SQL server)

    We can then compare values from field "tp_Flags" of AllLists table. Itis an 8-byte unsigned integer bit mask that provides metadata about the list, which can have one or more flags set. It stores changes for Versioning Settings as well.

    For e.g. If we have to find whether the moderation enabled(content approval enabled) on the list then we can find this with this SQL Statement

    select cast(tp_flags as bigint) & 0x000000000 0000400 from allLists where tp_ListID = "<GUID>"

    If value is 0 then its NO and if has some value then its yes.

    Following link provides list of all such values to check from the tp_flags field

    http://msdn.microsoft.com/en-us/library/hh646650%28v=office.12%29.aspx

    Though this option is bit risky and not recommended, it is the faster approach. But provided you have the basic knowledge of SQL and SQL queries.

    Option 2)

    Restore the complete old Production FARM backup to TEST server and then compare settings from UI for those sites.

    This option is little bit time consuming and requires extra efforts but it impose no risk on Production Server and Sites.

    We are currently going with second option.

    Br,

    Shriram


    Shri07

    Tuesday, January 20, 2015 5:44 AM