Solved

Restore WSS_Content database

Posted on 2014-07-24
4
732 Views
Last Modified: 2014-08-05
Try to restore a WSS content database from the backup and it can't. Guessing that the SharePoint is still hosting the content.

"Restore failed for Server'Portal'. (Microsoft.SqlServer.SmoExtended)
System.Data.SqlClient.SqlError:Exclusive access could not be obtained because the database is in use. (Microsoft.SqlServer.Smo)

Tks
0
Comment
Question by:AXISHK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 32

Assisted Solution

by:Jamie McAllister MVP
Jamie McAllister MVP earned 150 total points
ID: 40216156
0
 
LVL 18

Assisted Solution

by:Walter Curtis
Walter Curtis earned 150 total points
ID: 40217392
If restoring via SQL Server Management Tool, (whatever it is called), you can force an overwrite. Take the db off line first, and remember, if the restore is older then current, you will overwrite newer data. If this is disaster recovery it may be your only option. BUT BE CAREFUL PLEASE
0
 
LVL 8

Accepted Solution

by:
Jayaraja Jayaraman earned 200 total points
ID: 40217947
Did you make sure the DB you are trying to attach is not being used by any other services? if yes please stop other services being using it and try to attach it via powershell
eg:
Mount-SPContentDatabase “MyDatabase” -DatabaseServer "MyServer" -WebApplication http://sitename
or
Mount-SPContentDatabase “MyDatabase” -DatabaseServer "MyServer" -WebApplication http://sitename -NoB2BSiteUpgrade
0
 

Author Closing Comment

by:AXISHK
ID: 40243033
Tks
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
When using a search centre, I'm going to show you how to configure Sharepoint's search to only return results from the current site collection. Very useful when using Office 365 with multiple site collections.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question