Solved

SharePoint 2010 Remote Blob Store (RBS) - Deleted Blobstore!

Posted on 2010-11-16
6
1,227 Views
Last Modified: 2013-11-05
Hi All,

I'm trying to implement RBS on my SharePoint 2010 content database. And I have followed the instructions from:
http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=174
and
http://technet.microsoft.com/en-us/library/ee748631.aspx

I configured the databases to use RBS using these SQL statements:

use [WSS_Content]
if not exists (select * from sys.symmetric_keys where name = N'##MS_DatabaseMasterKey##')create master key encryption by password = N'Admin Key Password !2#4'

use [WSS_Content]
if not exists (select groupname from sysfilegroups where groupname=N'RBSFilestreamProvider')alter database [WSS_Content] add filegroup RBSFilestreamProvider contains filestream

use [WSS_Content]
alter database [WSS_Content] add file (name = RBSFilestreamFile, filename = 'D:\Blobstore') to filegroup RBSFilestreamProvider

Immediately, a new folder was created on D: called Blobstore.

I continued with the steps, but failed to get RBS installed at the end. Therefore I tried to delete the blobstore. I first tried to delete the folder D:\Blobstore, but access was denied (i assumed SQL was using it). So then I stopped SQL Server, then shift-deleted the folder D:\Blobstore. After starting up SQL Server again, my content database is inoperable now.

I'm guessing it's a corrupted database now since it can't connect to the D:\Blobstore file. I can't do any actions on this database (I can't detach, backup or anything). I can't expand the database in Management Studio to see it's tables etc, and I can't run any queries against it!

How can I recover this database now?
0
Comment
Question by:Dangeriz
  • 4
  • 2
6 Comments
 
LVL 16

Expert Comment

by:EvilPostIt
ID: 34153186
You may be able to set the database to emergency mode and do a DBCC CHECKDB.

If this works and returns errors then after this run....
DBCC CHECK ([DBNAME],REPAIR_ALLOW_DATA_LOSS) 

Open in new window


Although this could result in you losing more data. The other option would be to restore from a backup.
0
 
LVL 4

Author Comment

by:Dangeriz
ID: 34153419
Thanks for the response.
How do I set the database to emergency mode?
0
 
LVL 16

Expert Comment

by:EvilPostIt
ID: 34153494
ALTER DATABASE DBNAME SET EMERGENCY
GO
DBCC CHECKDB (DBNAME) WITH NO_INFOMSGS
GO

This should show you some errors.
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 4

Accepted Solution

by:
Dangeriz earned 0 total points
ID: 34213467
Hey, all those things I tried (emergency mode, dbcc etc.) didn't work. Thanks for the suggestions though...

I eventually managed to recover the database using the following procedure:

1.      Set the database’s status to “Offline”.
2.      Detach the database.
3.      Move the MDF and LDF to another location.
4.      Create a new database with the exact same name.
5.      Stop the SQL Server Service.
6.      Delete/move the new database’s MDF and LDF files.
7.      Copy the original database’s MDF and LDF back to the default location.
8.      Start the SQL Server Service.

The database status return back to “ONLINE” and all the data and operations are accessible.

This got my database back to a status where I could get all the data back. I wouldn't suggest using this if you have data already in the blob store else you would have lost it all (would have lost it by deleting the folder already).
0
 
LVL 4

Author Comment

by:Dangeriz
ID: 34213476
Author comment.
0
 
LVL 4

Author Closing Comment

by:Dangeriz
ID: 34237225
I eventually found the solution.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now