Solved

Restore WSS_Content database

Posted on 2014-07-24
4
682 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 17

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

839 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