SharePoint Site Collection backup failed–site left locked.
February 21, 2011 12 Comments
Ran into an issue the other day. Was running a site collection backup from Central Administration, when it just flat out failed with a generic error. Didn’t think much of it, until a user could not add any data, nor see the Site Actions menu within a site under that site collection.
I started to investigate – all signs pointed to the content database being locked, but no matter where I looked, I was unable to find just where it was locked up.
First, in Central Administration, I checked to see the status of the site collection. This can be found under Application Management > Site Collections > Configure quotas and locks
The site collection was showing as "Not locked”.
Then, while in Central Admin, I checked to see if the database itself was locked. Under Application Management > Manage content databases
As you can see above – it was not Read-Only.
I then took a look at the database, seeing if it was set to single user, read-only, or if the database was not in ‘NORMAL’ state.
Everything looked fine here. I did some troubleshooting, and could not find the source of the problem. So, I threw out an #SPHelp request on twitter, and sure enough, twitter saves the day again. Sean McDonough (@spmcdonough) replied with the following suggestion.
This is the STSADM equivalent of setting the site collection lock status under Application Management > Site Collections > Configure quotas and locks which we first looked at. I set the database read-only. And then set it back to none, and everything was back and working again! Thanks Sean!
So, in closing, this post has two objectives to it. Number 1 is to show you where you can check/set lock statuses for site collections and content databases. And number 2, if you encounter the same issue I did, how to resolve it, so hopefully after a bit of searching if you run into this error, you can save some sweat and hair, and get your site collection back up and functional.
And then plan to perform the site collection backup off-hours, just in case 🙂
That’s a good reason to use PowerShell. Backup-SPSite cmdlet has the -UseSQLSnapShot parameter not exposed in Central Admin UI, which guarantees no site lock – and still ensures consistent backup.
(Of course it only works for those lucky folks with SQL Enterprise.)
Great comment – thank you for sharing!
I had this before with Sp2007 and in the end built in using stsadm -o setsitelock into my batch scripts in the event of error.
I don’t recall it ever showing as unlocked when it was locked tho, something new in SP2010? 😎
Ilia beat me to the punch! You should have watched my “One Thing” video, Jeff: http://www.youtube.com/watch?v=AlXlb5-0nFM
🙂
I guess I should have!
Pingback: SharePoint Daily
Thanks!!!!
Thanks…this post saved me today.
Thanks this saved me today.
This saved my day. Great. it worked for me.
O, Jeoff, you saved me! This is a life-saver. Thank you! Thank you!! Thank you!!!. I was scratching the head what to do after realizing the site (SP 2010) was locked due to an interrupted DB backup task. All back to normal. Happy users, happy CFO. 🙂
Awesome! Glad I was able to help!