Moving subsets of data between servers

  • I have a fairly complicated SQL Server database (around 300+) tables and I need to move portions of those tables to another SQL Server database instance.

    My client has all his customer's data in one big database. One of those customers decided that for security reasons, they wanted their database onsite. Now I have to move all the data, for just that customer, to another database. This customer's data is spread all over the 300+ tables and it's fairly normalized so lots of parent-child relationships, etc...

    Has anyone ever tried to do something like this? Do I just have to write scripts/sql to do it manually? I was hoping for something easier than just writing all the sql.

    Cheers,

    Justin

  • There isn't a good way to do this. The export wizard will help, but you'll need to write scripts that would still find the client data based on criteria.

    The easiest way, IMHO, is to flip this around. Restore a copy of the db somewhere and DELETE all the data that doesn't belong to the client. Easier to do for me, and FKs usually prevent you from removing lookup type data that's shared.

  • Check out relationalmigration.com

    I don't know how well it performs with HUGE data sets, but it works well for us. We use it to move configuration data from a development environment to production.

  • At a first glance, Relational Migration looks promising. It does a whole lot of other stuff but it seems to support subset copying as well.

    I'm going to give it a try. I'll post any results a little later.

    Cheers.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply