Help!! Extracting content from SQL Server mdf file (Sharepoint V3)

Associate
Joined
19 Jun 2003
Posts
1,680
Location
West Yorks, UK
Hi all,
Disaster! Our SharePoint has automagically destroyed itself, and i'm struggling to get it back up and running.

Is there any way i can extract data from the mdf/ldf files manually, using SQL queries? I'm handy with the SQL language, but just don't know how to hook the actual data files up so i can query them. The DB is Microsoft SQL Server Express Edition, the default that comes with SharePoint 3.0

Any help would be greatly appreciated.

Matt
 
Hi,
Thanks, have figured that out in the meantime. I created a new Virtual Machine running Windows 2003 Std, installed SharePoint and all required updates, downloaded and installed the SQL Management Studio and connected to the SQL Server Express Edition. The trick here is to make sure you've got the Management Studio on the same machine as the SQL Server Express Edition, then connect to it using this string:
np:\\.\pipe\MSSQL$Microsoft##SSEE\sql\query​
(see here for a more in depth guide)

I've then attached the WSS_Content.mdf file from the old Sharepoint, and queried the data out of it (the data is best accessed via a view called dbo.UserData). This left me with a load of data in CSV files for temporary use.

Now i'm wondering whether it's possible to re-attach the WSS_Content.mdf database file to a new SharePoint site, and access the data via SharePoint instead of having to re-create the whole site structure and manually import the data. Anyone know if it's possible to do so?

Cheers,
Matt
 
Back
Top Bottom