سؤال

لدي مجموعة موقع SharePoint (2013) عالق في وضع القراءة فقط بسبب النسخ الاحتياطي الذي تمت إما توقف أو لم يتم إنهاءه بشكل صحيح.

أنا غير قادر على فتح من:

  • حصص الموقع وقفل في الإدارة المركزية (الخيار رملي)
  • stsadm: عملية تكمل بنجاح ولكن لا تغيير
  • باستخدام PowerShell: نفس السلوك كما stsadm

    استعرضت قاعدة بيانات المحتوى المرتبطة للتأكد من أنها لم تكن في وضع المستخدم الفردي لا في القراءة فقط والتي لم تكن الحالة. مساحة القرص ليست مشكلة لا.

    أي شخص يعرف كيف يستمر SharePoint في أن المعلومات في قاعدة بيانات المحتوى بحيث يمكنني الحصول على نظرة خاطفة التسلل؟ أي طريقة أخرى لفتح هذه الحالة؟

    إذا أراد أي شخص إعادة إنتاج هذا، فيمكنك كسر عملية النسخ الاحتياطي (STSADM / POWERSHELL GORUDICETAGCODE) أثناء النسخ الاحتياطي للموقع. سيتم ترك خاصية ReadonlyMode (وخاصية Maintenanancode المرتبطة) إلى "صحيح" لمنع أي تحديث.

هل كانت مفيدة؟

المحلول

This is a nightmare situation to be in! Got it escalated in Microsoft who indeed know and have already fixed the source (so terminated backups don't trigger this) in the April CU http://blogs.technet.com/b/stefan_gossner/archive/2013/04/27/april-2013-cu-for-sharepoint-2013-has-been-released.aspx - you have to install March CU first.

However, it does not yet fix the fact that you can't switch the Site Collection back out of read-only, so is still a killer situation to be in, especially with a big site. Worse, it's no good restoring a new completed backup of the locked site coll (even though you know there's nothing actually wrong with it other than the read-only/maintenance-mode flag!) - as after all that, it remains locked! Fortunately though, the flag is at Site Coll level, not Farm, so even if it was your first backup (we had just migrated all the docs into it and go-live went pear-shaped thanks to this!) or you don't want to lose data with a recent backup, we found you can safely use Export-SPWeb to get everything out of that locked Site Coll, delete the Site Coll (painful but necessary!), create new and use Import-SPWeb to bring it all back again.

Tip - Import-SPWeb can just use the original filename of the Export and it will automatically chain together all those multiple .cmp files it split any large site into so you don't have to do them individually.

We've run it a day now and to our relief everything including the item-level permissions mapped to FBA accounts (you'll use -IncludeUserSecurity on the Export-SPWeb of course) is all running fine again. Heart attack over for now!


UPDATE :

Microsoft called me back and gave me the solution!

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!

نصائح أخرى

An alternate solution to the problem of not having upgraded to April 2013 CU is a simple powershell script that uses reflection to set the value of the internal 'MaintenanceMode' property:-

$site = Get-SPSite http://urltofreakinlockedsite/
$site.GetType().GetProperty("MaintenanceMode").GetSetMethod($true).Invoke($site, @($false))

This approach has the advantage of not needing to touch the database. Having used .NET Reflector on the April 2013 CU version of Microsoft.SharePoint.dll, this is in fact what SPSiteAdministration.ClearMaintenanceMode() does!

You will need to run this on the server, and as a farm administrator with write access to the content db.

This will work on pre- and post-April 2013 CU versions of SharePoint 2013

it's seems to be a SharePoint issue. Here is a post which can maybe help you.

EDITED:

Indeed this is a known issue from Microsoft. The only way to fix this is to restore backup of your site overriding locked site collection. This way the flag that is set to read only will be free by restore process and the site collection will be available again

Andrew

Just to make this clear for others who read this. You cannot fix this on SharePoint RTM with the above commands. You must first Upgrade RTM to March and then April. Once complete, run the following two commands on the site in question.

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

That's it.

This is absolute madness that SharePOint 2013 needs two CU upgrades before you can reach the property through Powershell. Atleast there is a solution I suppose.

Excelent, it also works for the SharePoint 2016

PS C:\Users\root> $site = Get-SPSite http://contoso.com
PS C:\Users\root> $site.GetType().GetProperty("MaintenanceMode").GetSetMethod($true).Invoke($site, @($false))
PS C:\Users\root>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى sharepoint.stackexchange
scroll top