none
Site Collection Stuck in ReadOnly Mode RRS feed

  • Question

  • I ran Backup-SPSite and it completed without any errors. However, the Site Collection seems to be stuck in read only mode after.

    When I go to Central Admin > Site Collection Quotas and Locks, all the options are grayed out for the Site Collection. I cannot change the status to "Not locked", or anything else. This only happens for the one particular site collection. I am able to update the lock status for any other site collection on the same farm. I am a site collection administrator.

    I tried using PowerShell with the following commands. However, it has no effect.

    $site = Get-SPSite -Identity <SiteURL>
    $site.readonly=$false (Does not output any errors)
    echo $site.readonly (Still outputs true)

    I am able to change the lockstate to "No access" using Set-SPSite. But if I change it to anything else, it sets to Read-only.

    The Content Database is not set to read-only.
    Monday, January 14, 2013 7:10 PM

Answers

  • Hello everybody,

    I have the same issue since 48 hours and I spent 8 hours with Microsoft on the phone !

    They send me different patches: sts2013-kb2767862-fullfile-x64-glb + ubersrvsp2013-kb2767999-fullfile-x64-glb + ubersrv2013-kb2726992-fullfile-x64-glb and applied it on the app server and the web front end server (+ run the config wizard on both servers successfully) but my site collection is still locked to read-only !!!

    I tried everything I know but I cannot unlock the site: 

    PS C:\Users\moss13> $site =Get-SPSite -Identity http://xxx

    PS C:\Users\moss13> $site.MaintenanceMode 

    True

    PS C:\Users\moss13> $Site.ClearMaintenanceMode

    PS C:\Users\moss13> Set-SPSite -Identity "http://xxx" -LockState "Unlock"

    PS C:\Users\moss13> stsadm -o setsitelock -url http://xxx -lock none

    Operation completed successfully.

    Where can we remove this flag which lock the site collection to read-only ???

    Philippe

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

    UPDATE :

    Microsoft called me back and gave me the solution !!! yesssssssssssss

    PS C:\Users\root> $Admin =  new-object Microsoft.SharePoint.Administration.SPS
    iteAdministration('http://root.toto.com')
    PS C:\Users\root> $Admin.ClearMaintenanceMode()
    PS C:\Users\root> $site.MaintenanceMode
    True

    After that, my site collection is not read-only any more ;)

    Hopefully it solves your problem also ;)

    Adios

    Philippe.

    Wednesday, May 1, 2013 2:11 PM
  • We just struggled with an MS engineer for hours too (wonder if same one - they're normally very good!), and were left for the afternoon (after saying he was successfully reproing and escalated at midday, he mailed back without conclusion 1 minute before he clocked off at end of day!) to find our own resolution whilst handling the client going crazy with site down over a day - very embarrasing after merely a stopped backup.

    Our Resolution: Restoring a new (still locked) backup of the site collection succeeds but does not release the read-only lock (actually maintenance mode it turns out). Neither does using Powershell as Phil tried above. So to avoid data loss from previous backups, you need to Export-SPSite, delete the Site Coll and then Import-SPSite - thankfully that works, even with all the Permission Levels, as I've just posted in more detail at http://sharepoint.stackexchange.com/questions/64726/site-collection-locked-stucked-in-read-only-mode. HTH!

    Friday, May 3, 2013 10:18 AM

All replies

  • Any ideas? The site has ReadOnly set to true, ReadLocked = false, WriteLocked = false. I was reading this blog and that combination doesn't appear: http://blogs.c5insight.com/Home/tabid/40/entryid/289/Check-SharePoint-2010-Site-Collection-Locks-with-PowerShell.aspx


    As I mentioned, I cannot update the Lock status through Central Admin (all the options are disabled) and the PowerShell command doesn't actually update it even though it seems to complete successfully.

    Tuesday, January 15, 2013 9:31 PM
  • Hi Rishan.

    I would focus first on the content database.
    Have you checked the Content database in Central Admin? Manage Content Databases...
    Here you will see if the database is set to read-only.

    If it is, then check your SQL server Enterprise maanger, if the database is grey, then it is in read only mode.
    If it is, simply set the database 'read-only' property to false and you are done.

    When doing a backup/restore, you would in some circumstances set the database to read-only so it is likely.

    Regards


    Thomas Balkeståhl - Technical Specialist - SharePoint - http://blog.blksthl.com
    Download 'The SharePoint Branding Project' here
    Download 'The final guide to Alternate Access Mappings' free whitepaper here
    Download 'The final guide to SharePoint 2010 Site Settings' free whitepaper here
    Download 'The final Kerberos guide for SharePoint technicians' free whitepaper here


    Tuesday, January 15, 2013 10:40 PM
  • The content database is not read-only. I checked in Central Admin and SQL server.
    Wednesday, January 16, 2013 2:31 PM
  • I checked the ULS logs and noticed a few errors about the database being nearly full. Would this cause the site collection to be locked in read-only?
    Wednesday, January 16, 2013 10:07 PM
  • I've got the exact same problem. I tried both commands:

    Set-SPSite -Identity "http://web" -LockState "Unlock"

    stsadm -o setsitelock -url http://web -lock none

    and they replied that the opertion was successful, but it wasn't (no change).

    My DB isn't in read-only mode, there are no quotas and plenty of free disk space.

    I suspect that this happened after some SPSite backup (I run them daily with task sheduler) although they all completed without any error.

    How can we fix this ?

    Monday, March 25, 2013 5:10 PM
  • Actually, one of the backup was interrupted, and since then I got the problem. I cannot find a way to get rid of the read only lock. Fortunately I got another backup that is recent enough that I can restore, but it would still be nice to understand why we can't remove this lock when a site collection backup is interrupted.
    Tuesday, March 26, 2013 1:24 PM
  • Have you gone to Central Administration, Site Quota's and lock's and unlocked the DB?

    Tuesday, March 26, 2013 1:33 PM
  • Yes but all options are greyed out.
    Tuesday, March 26, 2013 3:17 PM
  • Ensure that the SQL log file is not full.

    Tuesday, March 26, 2013 3:21 PM
  • It's not and there are a lot of unused space.
    Tuesday, March 26, 2013 4:08 PM
  • Hi

    I have the same problem a site collection is locked and I can not unlock it. It is greyed out with CA and I have tried everything to unlock it.

    Has anyone a fix for this issue?

    Thanks
    Saturday, April 13, 2013 8:48 PM
  • Hi,

    I have the same problem. I hitted CTRL+C during stsadm backup, and no site "readonly" attribute cannot be removed. Restoring some old backup would be the really last option. All data still available in read only mode.

    Any ideas?

    Thank you

    Saturday, April 20, 2013 8:45 PM
  • If the backup has been interrupted as you mention, you should attempt another backup or at least take the Content database and attempt to restore the site collection from a detached database.

    Follow this procedure:

    • (skip if you already know this) Identify which database you need, via Central Administration > Application Management > Manage Content Database
    • Restore that database on the SQL Server in test environment or the new farm (! you would need to create a temporary web application to attach it) - this will do upgrade too if you are moving from 2010 to 2013
    • Use the Move-SPSite (http://technet.microsoft.com/en-us/library/cc825328.aspx) to move into another database if you wish so
    Saturday, April 20, 2013 9:58 PM
  • Rishan,

    Did you ever find a fix for this?

    We are experiencing the exact same problem!

    Tuesday, April 30, 2013 3:52 PM
  • Hello everybody,

    I have the same issue since 48 hours and I spent 8 hours with Microsoft on the phone !

    They send me different patches: sts2013-kb2767862-fullfile-x64-glb + ubersrvsp2013-kb2767999-fullfile-x64-glb + ubersrv2013-kb2726992-fullfile-x64-glb and applied it on the app server and the web front end server (+ run the config wizard on both servers successfully) but my site collection is still locked to read-only !!!

    I tried everything I know but I cannot unlock the site: 

    PS C:\Users\moss13> $site =Get-SPSite -Identity http://xxx

    PS C:\Users\moss13> $site.MaintenanceMode 

    True

    PS C:\Users\moss13> $Site.ClearMaintenanceMode

    PS C:\Users\moss13> Set-SPSite -Identity "http://xxx" -LockState "Unlock"

    PS C:\Users\moss13> stsadm -o setsitelock -url http://xxx -lock none

    Operation completed successfully.

    Where can we remove this flag which lock the site collection to read-only ???

    Philippe

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

    UPDATE :

    Microsoft called me back and gave me the solution !!! yesssssssssssss

    PS C:\Users\root> $Admin =  new-object Microsoft.SharePoint.Administration.SPS
    iteAdministration('http://root.toto.com')
    PS C:\Users\root> $Admin.ClearMaintenanceMode()
    PS C:\Users\root> $site.MaintenanceMode
    True

    After that, my site collection is not read-only any more ;)

    Hopefully it solves your problem also ;)

    Adios

    Philippe.

    Wednesday, May 1, 2013 2:11 PM
  • We just struggled with an MS engineer for hours too (wonder if same one - they're normally very good!), and were left for the afternoon (after saying he was successfully reproing and escalated at midday, he mailed back without conclusion 1 minute before he clocked off at end of day!) to find our own resolution whilst handling the client going crazy with site down over a day - very embarrasing after merely a stopped backup.

    Our Resolution: Restoring a new (still locked) backup of the site collection succeeds but does not release the read-only lock (actually maintenance mode it turns out). Neither does using Powershell as Phil tried above. So to avoid data loss from previous backups, you need to Export-SPSite, delete the Site Coll and then Import-SPSite - thankfully that works, even with all the Permission Levels, as I've just posted in more detail at http://sharepoint.stackexchange.com/questions/64726/site-collection-locked-stucked-in-read-only-mode. HTH!

    Friday, May 3, 2013 10:18 AM
  • Rajan's blog post has the best answer if you are using a current version.  If not, and you are running an older version try my solution.  Another method has worked for me in Central Administration >Quotas & Locks

    I apply (or in this case re-apply) the option to lock the file or even no access and then toggle it back to unlock and it has worked for me to release the file back to read/write mode.  I hope it helps!

    Disclaimer:  I'm still running WSS 3.0

    Friday, November 8, 2013 9:08 PM
  • Thanks for posting this,  this saved me twice.

    regards, Sudhir Kesharwani

    Wednesday, January 22, 2014 7:43 PM
  • PS C:\Users\root> $Admin =  new-object Microsoft.SharePoint.Administration.SPS
    iteAdministration('http://root.toto.com')
    PS C:\Users\root> $Admin.ClearMaintenanceMode()

    worked for me, thanks. If run $site =Get-SPSite -Identity http://xxx again in powershell, and than $site.MaintenanceMode return false.

    Wednesday, February 12, 2014 2:26 AM
  • The fix from Microsoft worked for me as well, beautiful thanks!
    Tuesday, March 11, 2014 9:46 PM
  • To prevent extended site locks due to failed or interrupted backups, use the following switch when doing a backup-spsite:  

          -UseSQLSnapshot

    This has the cmdlet create a snapshot of the contentDB instead of using the live database, and when the backup is complete, it removes the snapshot. So that prevents the read-only lock occurring during backup at all, and if a hiccup occurs during the backup, you have a no harm/no foul situation because it isn't using the live DB. I find this to be a better option than the export-spsite cmdlet. 

    Specifies a SQL Database Snapshot will be created when the backup begins, and all site collection data will be retrieved directly from the database snapshot. This snapshot will be deleted automatically when the backup completes.
    The UseSqlSnapshot parameter is recommended if the database server hosting your content database supports database snapshots such as SQL Server Enterprise Edition and SQL Server Developer Edition. This is because it will ensure a valid backup while allowing users to continue reading and writing to the site collection during the backup. It is not necessary to specify the NoSiteLock parameter when specifying the UseSqlSnapshot parameter.

    More info: http://technet.microsoft.com/en-us/library/ff607901(v=office.15).aspx


    • Edited by BC60 Monday, April 28, 2014 5:29 PM
    Monday, April 28, 2014 5:28 PM
  • Hi , The above solution worked for me too..

    $Admin = new-object Microsoft.SharePoint.Administration.SPSiteAdministration('https://Sitecolelcyion.com/')

    $Admin.ClearMaintenanceMode()

    $site.MaintenanceMode Thanks for your help.

    for 2013 

    http://blogs.msdn.com/b/spses/archive/2013/05/16/sharepoint-2013-site-in-read-only-mode-after-an-interrupted-backup.aspx

    Regards

    Yogesh


    YOGESHA H P(MCTS)


    Thursday, August 14, 2014 7:23 AM
  • That works also for me :-)

    Merci.

    Wednesday, October 15, 2014 2:31 PM
  • This microsoft solution really helped me... Thanks Phil
    Thursday, February 5, 2015 6:22 AM
  • I had the same issue and this command helped me out:

    $Admin =  new-object Microsoft.SharePoint.Administration.SPSiteAdministration('http://root.toto.com')
    $Admin.ClearMaintenanceMode()
    $site.MaintenanceMode
     


    Microsoft manager to programmer: You start coding. I'll go find out what they want ...

    Monday, June 5, 2017 5:14 PM