Solved

Restore WSS_Content database

Posted on 2014-07-24
4
667 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
4 Comments
 
LVL 31

Assisted Solution

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

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SharePoint 2013 with K2 5 24
Need a SQL Server 2014 plug-in to scan the DB schema 4 42
Union 2 queries to a cte (temp table perhaps) 9 36
MS SQL Delete Query 9 31
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

773 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