sql - Copying relational data from database to database -


edit: let me rephrase this, because i'm not sure there's xml way describing.

yet edit: needs repeatable process, , has able set in way can called in c# code.

in database a, have set of tables, related pks , fks. parent table, child , grandchild tables, let's say.

i want copy set of rows database database b, has identically named tables , fields. each table, want insert same table in database b. can't constrained use same primary keys. the copy routine must create new pks each row in database b, , must propagate child rows. i'm keeping same relations between data, in other words, not same exact pks , fks.

how solve this? i'm open suggestions. ssis isn't ruled out, doesn't me it'll exact thing. i'm open solution in linq, or using typed datasets, or using xml thing, or that'll work in sql server 2005 and/or c# (.net 3.5). best solution wouldn't require ssis, , wouldn't require writing lot of code. i'll concede "best" solution may not exist.

(i didn't make task myself, nor constraints; how given me.)

i think sql server utility tablediff.exe might looking for.

see this thread.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -