views:

33

answers:

2

I have several schemas in my database, and the largest one ("large" meaning disk space consumed) is my "web" schema which is a denormalized copy of data in the operational schemas.

This denormalized data is able to be reconstructed at anytime, and is merely there for extremely fast read purposes. Since the data is redundant, and VERY large - I'd like to exclude it from being backed up. I already have stored procedures that can regenerate all of the data in that schema in a couple of hours - for use in the event of a failure.

I assume I can split the tables in this schema out to another data file or such (ideally even on another drive for faster reads), but is there a way to never have that data file backup, yet still in the event of a failure its structure could be restored (and other DDL stuff like procs, views, etc)?

Somewhat related, can I also have these tables not do transaction logging, if I go to "Full" backup mode for the rest of the database?

A: 

To support all the capabilities you desire you will have to move the denormalized data out into a separate database.

Tom Cabanski
That doesn't support the capability of a structure only backup... Unless I'm missing something.
TheSoftwareJedi
+2  A: 

Take a look at moving your "large" schema entities into a read-only filegroup (see http://msdn.microsoft.com/en-us/library/ms190257.aspx). This will also avoid the locking/transaction overhead on this data.

You can then use partial backup to only backup the primary filegroup and any optional file groups of your choice (see http://msdn.microsoft.com/en-us/library/ms191539.aspx).

Daniel Renshaw
Great links - thanks!
TheSoftwareJedi
exactly what i was thinking.
DForck42
This doesn't help me... It's not readonly. It's updated hourly or so via batch denorm of op data.
TheSoftwareJedi
I'm not sure about this, but you might be able to switch the read-only/read-write flag on a filegroup as needed. Leave it as read-only except when you need the data to be updated andmake sure the partial backups are only done when it is marked as read-only. I've a feeling every user connection needs to be disconected to toggle the flag though...
Daniel Renshaw