SharePoint Site Collection backup failed–site left locked.

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.

image

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

image

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
image

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.

image

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.

image

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!

image

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 🙂

Advertisement

About Geoff Varosky
Geoff Varosky is a Senior Architect for Insight, based out of Watertown, MA. He has been architecting and developing web based applications his entire career, and has been working with SharePoint for the past 15 years. Geoff is an active member of the SharePoint community, Co-Founder and Co-Organizer of the Boston Area SharePoint Users Group, co-founder for the Boston Office 365 Users Group, co-organizer for SharePoint Saturday Boston and speaks regularly at SharePoint events and user groups.

12 Responses to SharePoint Site Collection backup failed–site left locked.

  1. 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.)

  2. 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? 😎

  3. Sean McDonough says:

    Ilia beat me to the punch! You should have watched my “One Thing” video, Jeff: http://www.youtube.com/watch?v=AlXlb5-0nFM

    🙂

  4. Pingback: SharePoint Daily

  5. Thanks…this post saved me today.

  6. baroninparson says:

    Thanks this saved me today.

  7. Subbu says:

    This saved my day. Great. it worked for me.

  8. 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. 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: