Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

SharePoint 2010

I've been Googling for days now, trying to find an answer to my issue. My boss wants to see if it's possible to do the following upon feature activation:

  1. Create a custom database to interact with our Silverlight application (we can use SQL scripts).
  2. Have this database show up in the Farm Backup portion of Central Admin.
  3. Be included in a SharePoint backup.

Is this possible? I've created a class that inherits SPDatabase, and upon Feature Activation, it does indeed show when I use Get-SPDatabase.

Thanks for any direction you can provide. I'm a complete SharePoint newb.

share|improve this question
    
My initial feedback is that this question is kind of crazy. If you want to make sure your database is being backed up then you can back it up like a normal SQL Database or find a way to use a SharePoint list for the content storage. I still do not see the embedded Farm Backup feature as a reliable backup and recovery method so even if it can be done, there may not be a good enough reason to do it. –  Mike Oryszak Sep 19 '11 at 21:05
    
I don't agree totally with @MikeOryszak because I think that requirement from your boss is really crazy. Even if it can be done (probably it can) I really don't see any point in it (and I have done some crazy stuff by myself in the past) –  Vedran Rasol Sep 19 '11 at 21:36
1  
Heh yeah the req is very weird, but SPDatabase is indeed ment to be used for creating custom databases that hook into backup etc, so that part is spot on (for example for custom service apps or just custom db where you want to include db in backup) –  Anders Rask Sep 19 '11 at 21:44
1  
@Anders I started to write up the recommendation to create it as a Service App, but thought that was really overkill for this particular request. I think my big exception to this was doing it solely for the purpose of getting the Farm Backup to support it, when I think that feature is very weak. –  Mike Oryszak Sep 19 '11 at 21:50
    
DaleyKD, could you please tell which version of SharePoint you're working with? –  Falak Mahmood Sep 19 '11 at 22:19
show 1 more comment

1 Answer

DaleyKD,

This isn't a crazy request at all, and the tools for carrying this out (specifically, the IBackupRestore interface) have been around since SharePoint 2007. Check out the following link for a good walk-through:

http://msdn.microsoft.com/en-us/library/cc264020.aspx

It's going to take you a bit of development effort for sure, but taking this approach will satisfy the requirements you laid out.

I hope that helps!

  • Sean
share|improve this answer
    
Sean, thanks for the link. I've looked at this article/how-to many times, and it confuses me. Even though my class inherits SPDatabase, I still need to override all of that? This article makes it sound like (IMHO) "if you aren't using SPDatabase, use IBackupRestore and SPPersistedObject, and do all of the following." But if I have to override/implement all of this, that's fine by me. –  DaleyKD Sep 20 '11 at 14:41
    
To tell you the truth, I didn't even notice that SPDatabase already implemented IBackupRestore. Since it already does, and you have a default implementation for the interface, you may already be partway to your goal. The question, though, is what the default implementation for IBackupRestore looks like in SPDatabase. You might want to use something like Reflector to drill into SPDatabase to see how it implements IBackupRestore -- and determine if that implementation works for you. If not, then you'll be overriding with your own code (and the article covers that). –  Sean McDonough Sep 20 '11 at 20:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.