Set Site Collection Lock in SharePoint Server 2016

Prior to performing administrative tasks like backups or starting a migration, it is recommended to put the site collection in read only mode, so that the users don’t write into it during the process. If they write into the database, there can be chances of data loss. We can do this out of the box from Central Administration. Select ‘Configure quotas and locks’.

c#

By default, the status of the site collection is ‘Not locked’.

c#

Set the status to Read-only and specify ‘Additional lock information’.

c#

If additional lock information is not present, we will get the error, as shown below-

locked’ Not

Now, when we head over to the site collection, we can see a red highlighted message on top of the site, which states “This site is read only at farm administrator’s request”. Now, the site collection is in read-only mode.

locked’ Not

If we go to the list controls, we can see that all of them are disabled to prevent the modifications.

locked’ Not

Summary - Thus, we saw how to set SharePoint 2016 site collection as read only from Central Administration to carry out the administrative tasks.