0

We have a Symantec backup system that runs through all of the instances on a SQL2008 box and backsup data,

I would like to restore a corrupted document library and am wondering as to how I would attach this .mdf sharepoint config database to the SQl instance??

Could I just drop it in the Data folder of the SQL instance on the server or would I need to do it a different way??

Please advise

3
  • the config database is not holding document (actually it can, but it's uncommon). Can you clarify ? Commented Aug 27, 2012 at 15:04
  • I mean the content database. My fault Commented Aug 27, 2012 at 15:13
  • can elaborate on "corrupted document library"? Commented Aug 27, 2012 at 15:27

1 Answer 1

1

You can't simply drop mdf file in folder to make it available to SQL server. You first have to attach a mdf file.

You next have to make it available to SharePoint. The fastest way is to use the central administration or POwershell (if you are using SP 2010) to attach the DB. Here is a sample snippet :

# get the webapp that should serve the content $webapp = get-spwebapplication http://yourserver # attach the db Mount-SPContentDatabase -Webapplication $webapp -name NameOfYourDB 

This script assume the DB is attached in the default SQL Server instance of the farm.

Behind this point, the web application will be able to serve the document library.

A final note, you talked about a "corrupted" document library. This method will mount a full content database. If you want to restore only one library, you will have to execute these steps in a separate environment, then to export the desired content before reimporting it.

Some solution can do that out of the box.

6
  • Thanks Steve. Thats some good info. What I meant by Corrupted Document library - "modified Infopath form published to the library caused data loss" Commented Aug 27, 2012 at 15:37
  • Shouldnt I be able to rename the backup content database that I have and attach it to the SQl instance? Then I can import whatever I need from CA. Please correct me if I am wrong here. Alternately I could attach this database to my dev environment and just copy the files that I restore and paste(in production) it in windows explorer. Commented Aug 27, 2012 at 15:39
  • the later is probably the simpliest and less risky Commented Aug 27, 2012 at 15:40
  • Thanks again. My only concern on the latter method is whether a content database backup from a live environment with a web application (diff port#) would be compatible with the development environment. My educated guess is yes but could you please confirm? Commented Aug 27, 2012 at 15:43
  • if your dev environment has the level of hotfix (at least) than the production environment, and if the editions of SharePoint are compatible, you should be able to do that. The only truth with Sharepoint however, is that there is no truth. Try and hope. Commented Aug 27, 2012 at 16:38

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.