3

Based on my understanding, it's stored in the SharePoint Config DB but I couldn't find it. It's not found in the "Objects" table nor at any other table.

The background is I need to execute this Microsoft-provided PowerShell script. It fixes the SharePoint OOTB Workflow issue that surfaced after applying the Sep 2018 security patches. Before executing the said script, I'm trying to identify the items that I need to backup such as web.config. I was thinking whether I should backup the SharePoint Config DB also.

4 Answers 4

1

You cannot restore the Configuration database. What you can do is create a farm-only backup using Backup-SPFarm -ConfigurationOnly. This will backup the Web Configuration/Web Service configuration.

You should always be using the SPWebConfigurationModification class to store web.config changes; there shouldn't be a need to backup the web.config files themselves as any manual changes will be lost if the Web Application is reprovisioned (e.g. using SPWebApplication.Provision() or .GloballyProvision()).

Lastly, this is resolved in the November 13, 2018, cumulative update for SharePoint Server 2010 (KB4461528), or more specifically, November 13, 2018, update for SharePoint Foundation 2010 (KB4011713). I would suggest patching, instead.

2
  • Thank you Trevor! I just need to understand more; where does SPWebConfigurationModification eventually persist the info that it holds then? In the Objects table as replied earlier by Slaven Semper?
    – Celbester
    Dec 18, 2018 at 6:16
  • Yes, it goes into the Objects table.
    – user6024
    Dec 18, 2018 at 16:03
1

It is highly advisable that donot run the query against the SharePoint DB.

Yes, you need to take the backup of the Web.Config files from all Web front end for all web applications. Script will touch each web.config of each web application on every server.

1

Actually it is in the Objects table.

Try

SELECT [Id]
      ,[ClassId]
      ,[ParentId]
      ,[Name]
      ,[Status]
      ,[Version]
      ,[Properties]
  FROM [SharePoint_Config].[dbo].[Objects]
  WHERE properties like '%SPWebConfigModification%'

As others have mentioned, it is not advisable to query the DB directly.

0

Based on my understanding, as per the article Configuration Management for SharePoint With SPWebConfigModification Class & PowerShell shared by another person, SPWebConfigModification is just a class with properties where you can set your collection of web.config changes, and choose whether to apply this changes across all web applications in the farm, or only within your target web application.

Thank you for all your help, everyone! : )

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.